diff --git a/admin/forms/manufacturer.xml b/admin/forms/manufacturer.xml new file mode 100644 index 0000000..e2ff4ad --- /dev/null +++ b/admin/forms/manufacturer.xml @@ -0,0 +1,93 @@ + +
diff --git a/admin/forms/stock.xml b/admin/forms/stock.xml new file mode 100644 index 0000000..0dda35e --- /dev/null +++ b/admin/forms/stock.xml @@ -0,0 +1,93 @@ + + diff --git a/admin/language/en-GB/com_depot.ini b/admin/language/en-GB/com_depot.ini index 58625d9..c160278 100644 --- a/admin/language/en-GB/com_depot.ini +++ b/admin/language/en-GB/com_depot.ini @@ -18,8 +18,13 @@ COM_DEPOT_FIELD_QUANTITY_EXP_LABEL="Quantity Exponent" COM_DEPOT_FIELD_QUANTITY_EXP_DESC="Exponent (10^x of the number, usually 0, i.e. 10⁰)" COM_DEPOT_FIELD_SELECT_MANUFACTURER="Manufacturer" COM_DEPOT_FIELD_SELECT_STOCK="Stock Location" -COM_DEPOT_LEGEND_DETAILS="Component Details" -COM_DEPOT_LEGEND_STATISTICS="Component Statistics" +COM_DEPOT_LEGEND_MANUFACTURER_DETAILS="Manufacturer Details" +COM_DEPOT_LEGEND_PART_DETAILS="Component Details" +COM_DEPOT_LEGEND_STOCK_DETAILS="Stock Location Details" +COM_DEPOT_LEGEND_STATISTICS="Statistics" +COM_DEPOT_MANAGER_MANUFACTURERS="Manager Manufacturers" +COM_DEPOT_MANAGER_PARTS="Manager Components" +COM_DEPOT_MANAGER_STOCKS="Manager Stock Locations" COM_DEPOT_N_ITEMS_DELETED_1="One component deleted" COM_DEPOT_N_ITEMS_DELETED_MORE="%d components deleted" COM_DEPOT_N_ITEMS_PUBLISHED_1="One component published" @@ -28,8 +33,16 @@ COM_DEPOT_N_ITEMS_UNPUBLISHED_1="One component unpublished" COM_DEPOT_N_ITEMS_UNPUBLISHED_MORE="%d components unpublished" COM_DEPOT_SELECT_YOUR_OPTION="Select your option" COM_DEPOT_TAB_NEW_PART="New Component" +COM_DEPOT_TAB_NEW_MANUFACTURER="New Manufacturer" COM_DEPOT_TAB_EDIT_PART="Component Details" -COM_DEPOT_TAB_STATISTICS="Component Statistics" +COM_DEPOT_TAB_EDIT_MANUFACTURER="Manufacturer Details" +COM_DEPOT_TAB_STATISTICS="Statistics" COM_DEPOT_TABLE_HEAD_ID="ID" COM_DEPOT_TABLE_HEAD_NAME="Component Name" +COM_DEPOT_TABLE_HEAD_MANUFACTURER="Manufacturer" +COM_DEPOT_TABLE_HEAD_MANUFACTURER_ACRONYM="Acronym" +COM_DEPOT_TABLE_HEAD_STOCK="Stock Location" +COM_DEPOT_TABLE_HEAD_QUANTITY="Quantity" +COM_DEPOT_TABLE_HEAD_QUANTITY_EXP="Exponent" +COM_DEPOT_TABLE_HEAD_DESCRIPTION="Description" COM_DEPOT_XML_DESCRIPTION="Depot, the component warehouse" diff --git a/admin/sql/install.mysql.utf8.sql b/admin/sql/install.mysql.utf8.sql index ac57fe6..5a38ea7 100644 --- a/admin/sql/install.mysql.utf8.sql +++ b/admin/sql/install.mysql.utf8.sql @@ -46,15 +46,16 @@ CREATE TABLE `#__depot` ( DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `#__depot` (`component_name`,`alias`,`description`,`quantity`,`created`, - `ordering`,`state`,`manufacturer_id`) VALUES - ('1N5404','1n5404','diode, rectifier 3A',9,'2023-09-25 15:00:00',1,1,1), - ('1N4148','1n4148','diode, general purpose',1234,'2023-09-25 15:15:15',2,1,2); + `ordering`,`state`,`manufacturer_id`,`stock_id`) VALUES + ('1N5404','1n5404','diode, rectifier 3A',9,'2023-09-25 15:00:00',1,1,1,1), + ('1N4148','1n4148','diode, general purpose',1234,'2023-09-25 15:15:15',2,1,2,1); DROP TABLE IF EXISTS `#__depot_manufacturer`; CREATE TABLE `#__depot_manufacturer` ( `id` SERIAL, `name_short` CHAR(25) CHARACTER SET ascii COLLATE ascii_general_ci NULL DEFAULT NULL COMMENT 'unique manufacturer name or abbriviation', + `alias` VARCHAR(127) NOT NULL DEFAULT '', `name_long` VARCHAR(1024) NOT NULL DEFAULT '', `url` VARCHAR(1024) NOT NULL DEFAULT '', `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', @@ -74,17 +75,17 @@ CREATE TABLE `#__depot_manufacturer` ( DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `#__depot_manufacturer` (`name_short`, `name_long`, `url`, - `description`, `image`) VALUES + `description`, `image`, `state`) VALUES ('TSC','Taiwan Semiconductor','https://www.taiwansemi.com', - 'Diodes, ECAD Models, ICs, MOSFETs, Protection Devices, AEC-Q qualified',''), + 'Diodes, ECAD Models, ICs, MOSFETs, Protection Devices, AEC-Q qualified','',1), ('ST','STMicroelectronics','https://www.st.com', - 'Microprocessors, Audio ICs, OPamps, Diodes, Memories, MEMS, NFCs, Transistors, Wireless, Automotive electronics, etc.',''); + 'Microprocessors, Audio ICs, OPamps, Diodes, Memories, MEMS, NFCs, Transistors, Wireless, Automotive electronics, etc.','',1); -DROP TABLE IF EXISTS `#__jron_stock`; -CREATE TABLE `#__jron_stock` ( +DROP TABLE IF EXISTS `#__depot_stock`; +CREATE TABLE `#__depot_stock` ( `id` SERIAL, `name` VARCHAR(1024) NOT NULL DEFAULT '', - -- `alias` VARCHAR(1024) NOT NULL DEFAULT '', + `alias` VARCHAR(1024) NOT NULL DEFAULT '', `owner` INT(10) UNSIGNED NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` INT(10) UNSIGNED NOT NULL DEFAULT 0, @@ -106,7 +107,7 @@ CREATE TABLE `#__jron_stock` ( AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -INSERT INTO `#__jron_stock`(`name`, `location`, `description`, `state`, `access`) VALUES +INSERT INTO `#__depot_stock`(`name`, `location`, `description`, `state`, `access`) VALUES ('Semiconductors workshop cabinet depot', 'Tom''s office, Martinstr. 58a, 3400 Klosterneuburg', 'MARS Svratka Workshop Depot 5x12 (60) compartments à 54 x 35 x 140 mm',1,0), ('Resistors workshop cabinet depot', 'Tom''s office, Martinstr. 58a, 3400 Klosterneuburg', diff --git a/admin/sql/updates/mysql/0.0.5.sql b/admin/sql/updates/mysql/0.0.5.sql index e5c5376..3d3236d 100644 --- a/admin/sql/updates/mysql/0.0.5.sql +++ b/admin/sql/updates/mysql/0.0.5.sql @@ -28,8 +28,8 @@ CREATE TABLE IF NOT EXISTS `#__depot_manufacturer` ( DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; INSERT INTO `#__depot_manufacturer` (`name_short`, `name_long`, `url`, - `description`, `image`) VALUES + `description`, `image`, `state`) VALUES ('TSC','Taiwan Semiconductor','https://www.taiwansemi.com', - 'Diodes, ECAD Models, ICs, MOSFETs, Protection Devices, AEC-Q qualified',''), + 'Diodes, ECAD Models, ICs, MOSFETs, Protection Devices, AEC-Q qualified','',1), ('ST','STMicroelectronics','https://www.st.com', - 'Microprocessors, Audio ICs, OPamps, Diodes, Memories, MEMS, NFCs, Transistors, Wireless, Automotive electronics, etc.',''); + 'Microprocessors, Audio ICs, OPamps, Diodes, Memories, MEMS, NFCs, Transistors, Wireless, Automotive electronics, etc.','',1); diff --git a/admin/sql/updates/mysql/0.9.0.sql b/admin/sql/updates/mysql/0.9.0.sql index d29ebbd..ce31d51 100644 --- a/admin/sql/updates/mysql/0.9.0.sql +++ b/admin/sql/updates/mysql/0.9.0.sql @@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `#__depot_stock` ( `id` SERIAL, `name` VARCHAR(1024) NOT NULL DEFAULT '', - -- `alias` VARCHAR(1024) NOT NULL DEFAULT '', + `alias` VARCHAR(1024) NOT NULL DEFAULT '', `owner` INT(10) UNSIGNED NOT NULL DEFAULT 0, `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `created_by` INT(10) UNSIGNED NOT NULL DEFAULT 0, diff --git a/admin/src/Controller/ManufacturerController.php b/admin/src/Controller/ManufacturerController.php new file mode 100644 index 0000000..a383b36 --- /dev/null +++ b/admin/src/Controller/ManufacturerController.php @@ -0,0 +1,19 @@ + + * @copyright (C) 2023 KW4NZ,