Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d93f443
update inventory item terminology for clarity and consistency
MightyMCoder Jul 14, 2025
6d0a7e0
Merge branch 'master' into module-inventory-changes
MightyMCoder Jul 29, 2025
db52de3
feat: replace lend item logic with borrow item logic and redesign dat…
MightyMCoder Jul 31, 2025
9fdb3f0
implement 'DROPDOWN_MULTISELECT' field
MightyMCoder Jul 31, 2025
ede2492
feat: add possibility for system fields to SelectOptions
MightyMCoder Jul 31, 2025
43c0a9b
feat: replace retiredproperty with a status field to exend possible i…
MightyMCoder Jul 31, 2025
bf64780
fix: selectOptions Tables
MightyMCoder Jul 31, 2025
d1a353e
fix: log actual status text instead of option id
MightyMCoder Aug 1, 2025
e56a6ae
small fixes
MightyMCoder Aug 1, 2025
01f0fbe
fix: import items
MightyMCoder Aug 1, 2025
e78f153
feat: remove 'IN_INVENTORY' field
MightyMCoder Aug 1, 2025
77192c5
fix: correct spelling of 'separator' in form methods and templates
MightyMCoder Aug 1, 2025
52a2dfb
fix: improve field visibility handling in inventory preferences
MightyMCoder Aug 1, 2025
6969681
fix: update inventory filter parameters for consistency and clarity a…
MightyMCoder Aug 1, 2025
b0124d1
fix: inventory profile view
MightyMCoder Aug 1, 2025
f316914
feat: last receiver filer
MightyMCoder Aug 1, 2025
8201e5f
fix: actions visibility in profile view
MightyMCoder Aug 1, 2025
221252f
feat: implement item pictures
MightyMCoder Aug 1, 2025
0c74488
fix: item pictures
MightyMCoder Aug 1, 2025
e8454ca
Merge branch 'master' into module-inventory-changes
MightyMCoder Aug 1, 2025
16a2911
fix: improve status log entries for item status changes
MightyMCoder Aug 2, 2025
5ab0964
fix: update inventory picture URLs to use the correct path
MightyMCoder Aug 2, 2025
7f783e5
feat: replace HtmlTable with smarty templating for PDF export
MightyMCoder Aug 2, 2025
1b1719e
feat: provide possibility to disable item pictures and enable seting …
MightyMCoder Aug 2, 2025
10b687c
fix: clean up JSON response formatting and improve error handling
MightyMCoder Aug 3, 2025
f990285
fix: correct typo in category system name in ChangelogService
MightyMCoder Aug 3, 2025
102416b
refactor
MightyMCoder Aug 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo_data/db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ DROP TABLE IF EXISTS %PREFIX%_inventory_fields CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_field_select_options CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_data CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_items CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_lend_data CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_borrow_data CASCADE;



Expand Down
88 changes: 55 additions & 33 deletions install/db_scripts/db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DROP TABLE IF EXISTS %PREFIX%_menu CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_fields CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_field_select_options CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_data CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_lend_data CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_item_borrow_data CASCADE;
DROP TABLE IF EXISTS %PREFIX%_inventory_items CASCADE;
DROP TABLE IF EXISTS %PREFIX%_saml_clients CASCADE;
DROP TABLE IF EXISTS %PREFIX%_sso_keys CASCADE;
Expand Down Expand Up @@ -916,6 +916,23 @@ COLLATE = utf8_unicode_ci;
CREATE UNIQUE INDEX %PREFIX%_idx_usf_name_intern ON %PREFIX%_user_fields (usf_name_intern);
CREATE UNIQUE INDEX %PREFIX%_idx_usf_uuid ON %PREFIX%_user_fields (usf_uuid);

/*==============================================================*/
/* Table: adm_user_field_select_options */
/*==============================================================*/
CREATE TABLE %PREFIX%_user_field_select_options
(
ufo_id integer unsigned NOT NULL AUTO_INCREMENT,
ufo_usf_id integer unsigned NOT NULL, -- Connected user field id
ufo_value varchar(255) NOT NULL, -- option value
ufo_system boolean NOT NULL DEFAULT false, -- If true, the option is a system option an not editable
ufo_sequence smallint NOT NULL, -- Position in the list
ufo_obsolete boolean NOT NULL DEFAULT false, -- If true, the option is not available for new entries, but still exists in the database
PRIMARY KEY (ufo_id)
)
ENGINE = InnoDB
DEFAULT character SET = utf8
COLLATE = utf8_unicode_ci;

/*==============================================================*/
/* Table: adm_user_data */
/*==============================================================*/
Expand Down Expand Up @@ -1042,6 +1059,23 @@ COLLATE = utf8_unicode_ci;
CREATE UNIQUE INDEX %PREFIX%_idx_inf_name_intern ON %PREFIX%_inventory_fields (inf_org_id, inf_name_intern);
CREATE UNIQUE INDEX %PREFIX%_idx_inf_uuid ON %PREFIX%_inventory_fields (inf_uuid);

/*==============================================================*/
/* Table: adm_inventory_field_select_options */
/*==============================================================*/
CREATE TABLE %PREFIX%_inventory_field_select_options
(
ifo_id integer unsigned NOT NULL AUTO_INCREMENT,
ifo_inf_id integer unsigned NOT NULL, -- Connected inventory field id
ifo_value varchar(255) NOT NULL, -- option value
ifo_system boolean NOT NULL DEFAULT false, -- If true, the option is a system option an not editable
ifo_sequence smallint NOT NULL, -- Position in the list
ifo_obsolete boolean NOT NULL DEFAULT false, -- If true, the option is not available for new entries, but still exists in the database
PRIMARY KEY (ifo_id)
)
ENGINE = InnoDB
DEFAULT character SET = utf8
COLLATE = utf8_unicode_ci;

/*==============================================================*/
/* Table: adm_inventory_item_data */
/*==============================================================*/
Expand All @@ -1060,21 +1094,22 @@ COLLATE = utf8_unicode_ci;
CREATE UNIQUE INDEX %PREFIX%_idx_ind_inf_ini_id ON %PREFIX%_inventory_item_data (ind_inf_id, ind_ini_id);

/*==============================================================*/
/* Table: adm_inventory_item_lend_data */
/* Table: adm_inventory_item_borrow_data */
/*==============================================================*/
CREATE TABLE %PREFIX%_inventory_item_lend_data
CREATE TABLE %PREFIX%_inventory_item_borrow_data
(
inl_id integer unsigned NOT NULL AUTO_INCREMENT,
inl_inf_id integer unsigned NOT NULL,
inl_ini_id integer unsigned NOT NULL,
inl_value varchar(4000),
PRIMARY KEY (inl_id)
inb_id integer unsigned NOT NULL AUTO_INCREMENT,
inb_ini_id integer unsigned NOT NULL,
inb_last_receiver varchar(255) NULL DEFAULT NULL,
inb_borrow_date varchar(100) NULL DEFAULT NULL,
inb_return_date varchar(100) NULL DEFAULT NULL,
PRIMARY KEY (inb_id)
)
ENGINE = InnoDB
DEFAULT character SET = utf8
COLLATE = utf8_unicode_ci;

CREATE UNIQUE INDEX %PREFIX%_idx_inl_inf_ini_id ON %PREFIX%_inventory_item_lend_data (inl_inf_id, inl_ini_id);
CREATE UNIQUE INDEX %PREFIX%_idx_inb_ini_id ON %PREFIX%_inventory_item_borrow_data (inb_ini_id);

/*==============================================================*/
/* Table: adm_inventory_items */
Expand All @@ -1085,7 +1120,8 @@ CREATE TABLE %PREFIX%_inventory_items
ini_uuid varchar(36) NOT NULL,
ini_cat_id integer unsigned NOT NULL,
ini_org_id integer unsigned NOT NULL,
ini_former boolean NOT NULL DEFAULT false,
ini_status integer unsigned NOT NULL,
ini_picture blob NULL DEFAULT NULL,
ini_usr_id_create integer unsigned,
ini_timestamp_create timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
ini_usr_id_change integer unsigned,
Expand Down Expand Up @@ -1142,22 +1178,6 @@ ENGINE = InnoDB
DEFAULT character SET = utf8
COLLATE = utf8_unicode_ci;

/*==============================================================*/
/* Table: adm_user_field_select_options */
/*==============================================================*/
CREATE TABLE %PREFIX%_user_field_select_options
(
ufo_id integer unsigned NOT NULL AUTO_INCREMENT,
ufo_usf_id integer unsigned NOT NULL, -- Connected user field id
ufo_value varchar(255) NOT NULL, -- option value
ufo_sequence smallint NOT NULL, -- Position in the list
ufo_obsolete boolean NOT NULL DEFAULT false, -- If true, the option is not available for new entries, but still exists in the database
PRIMARY KEY (ufo_id)
)
ENGINE = InnoDB
DEFAULT character SET = utf8
COLLATE = utf8_unicode_ci;

/*==============================================================*/
/* Foreign Key Constraints */
/*==============================================================*/
Expand Down Expand Up @@ -1324,6 +1344,9 @@ ALTER TABLE %PREFIX%_user_fields
ADD CONSTRAINT %PREFIX%_fk_usf_usr_create FOREIGN KEY (usf_usr_id_create) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_usf_usr_change FOREIGN KEY (usf_usr_id_change) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_user_field_select_options
ADD CONSTRAINT %PREFIX%_fk_ufo_usf FOREIGN KEY (ufo_usf_id) REFERENCES %PREFIX%_user_fields (usf_id) ON DELETE RESTRICT ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_user_data
ADD CONSTRAINT %PREFIX%_fk_usd_usf FOREIGN KEY (usd_usf_id) REFERENCES %PREFIX%_user_fields (usf_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_usd_usr FOREIGN KEY (usd_usr_id) REFERENCES %PREFIX%_users (usr_id) ON DELETE RESTRICT ON UPDATE RESTRICT;
Expand All @@ -1344,23 +1367,22 @@ ALTER TABLE %PREFIX%_user_relations
ADD CONSTRAINT %PREFIX%_fk_ure_usr_change FOREIGN KEY (ure_usr_id_change) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_ure_usr_create FOREIGN KEY (ure_usr_id_create) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_user_field_select_options
ADD CONSTRAINT %PREFIX%_fk_ufo_usf FOREIGN KEY (ufo_usf_id) REFERENCES %PREFIX%_user_fields (usf_id) ON DELETE RESTRICT ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_inventory_fields
ADD CONSTRAINT %PREFIX%_fk_inf_org FOREIGN KEY (inf_org_id) REFERENCES %PREFIX%_organizations (org_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_inf_usr_create FOREIGN KEY (inf_usr_id_create) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_inf_usr_change FOREIGN KEY (inf_usr_id_change) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_inventory_field_select_options
ADD CONSTRAINT %PREFIX%_fk_ifo_inf FOREIGN KEY (ifo_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE CASCADE ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_inventory_item_data
ADD CONSTRAINT %PREFIX%_fk_ind_inf FOREIGN KEY (ind_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_ind_ini FOREIGN KEY (ind_ini_id) REFERENCES %PREFIX%_inventory_items (ini_id) ON DELETE RESTRICT ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_inventory_item_lend_data
ADD CONSTRAINT %PREFIX%_fk_inl_inf FOREIGN KEY (inl_inf_id) REFERENCES %PREFIX%_inventory_fields (inf_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_inl_ini FOREIGN KEY (inl_ini_id) REFERENCES %PREFIX%_inventory_items (ini_id) ON DELETE RESTRICT ON UPDATE RESTRICT;

ALTER TABLE %PREFIX%_inventory_item_borrow_data
ADD CONSTRAINT %PREFIX%_fk_inb_ini FOREIGN KEY (inb_ini_id) REFERENCES %PREFIX%_inventory_items (ini_id) ON DELETE RESTRICT ON UPDATE RESTRICT;
ALTER TABLE %PREFIX%_inventory_items
ADD CONSTRAINT %PREFIX%_fk_ini_cat FOREIGN KEY (ini_cat_id) REFERENCES %PREFIX%_categories (cat_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_ini_status FOREIGN KEY (ini_status) REFERENCES %PREFIX%_inventory_field_select_options (ifo_id) ON DELETE RESTRICT ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_ini_usr_create FOREIGN KEY (ini_usr_id_create) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT,
ADD CONSTRAINT %PREFIX%_fk_ini_usr_change FOREIGN KEY (ini_usr_id_change) REFERENCES %PREFIX%_users (usr_id) ON DELETE SET NULL ON UPDATE RESTRICT;
10 changes: 7 additions & 3 deletions install/db_scripts/preferences.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
'changelog_table_inventory_field_select_options' => '0',
'changelog_table_inventory_items' => '0',
'changelog_table_inventory_item_data' => '0',
'changelog_table_inventory_item_lend_data' => '0',
'changelog_table_inventory_item_borrow_data' => '0',
'changelog_table_saml_clients' => '0',
'changelog_table_oidc_clients' => '0',
'changelog_table_others' => '0',
Expand Down Expand Up @@ -150,15 +150,19 @@
'inventory_module_enabled' => '2',
'inventory_items_per_page' => '25',
'inventory_field_history_days' => '365',
'inventory_item_picture_enabled' => '1',
'inventory_item_picture_storage' => '0',
'inventory_item_picture_width' => '130',
'inventory_item_picture_height' => '170',
'inventory_show_obsolete_select_field_options' => '1',
'inventory_system_field_names_editable' => '0',
'inventory_allow_keeper_edit' => '0',
'inventory_allowed_keeper_edit_fields' => 'IN_INVENTORY,LAST_RECEIVER,RECEIVED_ON,RECEIVED_BACK_ON',
'inventory_allowed_keeper_edit_fields' => 'LAST_RECEIVER,BORROW_DATE,RETURN_DATE',
'inventory_current_user_default_keeper' => '0',
'inventory_allow_negative_numbers' => '1',
'inventory_decimal_places' => '1',
'inventory_field_date_time_format' => 'date',
'inventory_items_disable_lending' => '0',
'inventory_items_disable_borrowing' => '0',
'inventory_profile_view_enabled' => '1',
'inventory_profile_view' => 'LAST_RECEIVER',
'inventory_export_filename' => $GLOBALS['gL10n']->get('SYS_INVENTORY'),
Expand Down
Loading