diff --git a/src/frontend/src/store/error.js b/src/frontend/src/store/error.js index 015d8c1..e1a503e 100644 --- a/src/frontend/src/store/error.js +++ b/src/frontend/src/store/error.js @@ -129,28 +129,28 @@ export function setupErrorBuffer() { const errorStore = useErrorStore() //Unhandled Promise Rejections - window.addEventListener('unhandledrejection', (event) => { + // window.addEventListener('unhandledrejection', (event) => { - const error = { - code: "Unhandled rejection", - title: "Frontend error", - message: event.reason?.message || 'Unhandled Promise Rejection', - traceCombined: event.reason?.stack, - }; + // const error = { + // code: "Unhandled rejection", + // title: "Frontend error", + // message: event.reason?.message || 'Unhandled Promise Rejection', + // traceCombined: event.reason?.stack, + // }; - errorStore.addError(error, {global: true}).then(r => {} ); - }) + // errorStore.addError(error, {global: true}).then(r => {} ); + // }) - // JavaScript Errors - window.addEventListener('error', (event) => { - const error = { - code: "General error", - title: "Frontend error", - message: event.reason?.message || 'Unhandled Promise Rejection', - traceCombined: event.reason?.stack, - }; - errorStore.addError(error, {global: true}).then(r => {} ); - }) + // // JavaScript Errors + // window.addEventListener('error', (event) => { + // const error = { + // code: "General error", + // title: "Frontend error", + // message: event.reason?.message || 'Unhandled Promise Rejection', + // traceCombined: event.reason?.stack, + // }; + // errorStore.addError(error, {global: true}).then(r => {} ); + // }) window.addEventListener('beforeunload', () => { errorStore.submitOnBeforeUnload(); diff --git a/src/main/resources/master_data/01-properties.sql b/src/main/resources/master_data/01-properties.sql index 457a43f..177236c 100644 --- a/src/main/resources/master_data/01-properties.sql +++ b/src/main/resources/master_data/01-properties.sql @@ -5,52 +5,52 @@ -- Description -> name -- =================================================== -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Reference route segment start node mapping id', 'START_REF', 'TEXT', '{}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Reference route segment end node mapping id', 'END_REF', 'TEXT', '{}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'The historically highest rate for the reference route segment for 40ft containers [EUR]', 'RISK_REF', 'CURRENCY', '{"GT":0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'The historically lowest rate for the reference route segment for 40ft containers [EUR]', 'CHANCE_REF', 'CURRENCY', '{"GT":0}'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Reference route: Port of origin', 'START_REF', 'TEXT', '{}','Reference route used to demonstrate sea freight fluctuation, port in country of origin','Reference route','1'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Reference route: Port of destination', 'END_REF', 'TEXT', '{}','Reference route used to demonstrate sea freight fluctuation, port in country of destination','Reference route','2'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'All-time-high container rate (40 ft.) [EUR]', 'RISK_REF', 'CURRENCY', '{"GT":0}','Highest container rate to be used to demnastrate sea freight fluctuation, cost for 40 Ft. (FEU) general purpose container','Reference route','3'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'All-time-low container rate (40 ft.) [EUR]', 'CHANCE_REF', 'CURRENCY', '{"GT":0}','Lowest container rate to be used to demnastrate sea freight fluctuation, cost for 40 Ft. (FEU) general purpose container','Reference route','4'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Payment terms [days]', 'PAYMENT_TERMS', 'INT', '{}','Payment target [days] agreed with suppliers','General','3'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Annual working days', 'WORKDAYS', 'INT', '{"GT": 0, "LT": 366}','Annual working days (production)','General','2'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Interest rate inventory [%]', 'INTEREST_RATE', 'PERCENTAGE', '{"GTE": 0}','Calculatory interest rate for inventories and payment targets','General','4'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'FCA fee [%]', 'FCA_FEE', 'PERCENTAGE', '{"GTE": 0}','FCA fee to be added on EXW prices (MEK_A)','General','5'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Default customs rate [%]', 'TARIFF_RATE', 'PERCENTAGE', '{"GTE":0}','Customs rate to be applied, if no exact value is available','General','6'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Customs clearance fee per import & HS code [EUR]', 'CUSTOM_FEE', 'CURRENCY', '{"GTE":0}','Average customs clearance fee charged for the import of one HS code per import (mixed container)','General','7'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Standard reporting format', 'REPORTING', 'ENUMERATION', '{"ENUM":["MEK_B","MEK_C"]}','Defines standard format for reports (MEK_B = excl. Risks, MEK_C = incl. risks)','General','1'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( '40 ft.', 'FEU', 'BOOLEAN', '{}','To be activated, if calculation shall be possible with this container size. Container rates to be maintained.','Sea and road transport','1'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( '20 ft.', 'TEU', 'BOOLEAN', '{}','To be activated, if calculation shall be possible with this container size. Container rates to be maintained.','Sea and road transport','2'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( '40 ft. HC', 'FEU_HQ', 'BOOLEAN', '{}','To be activated, if calculation shall be possible with this container size. Container rates to be maintained.','Sea and road transport','3'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Container utilization in mixed containers [%]', 'CONTAINER_UTIL', 'PERCENTAGE', '{"GTE":0,"LTE":1}','Defines, to which degree the volume of a mixed container shall be utilized (loss due to inefficient stacking and different packaging sizes).','Sea and road transport','6'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Truck utilization road transport EMEA [%]', 'TRUCK_UTIL', 'PERCENTAGE', '{"GTE":0,"LTE":1}','Defines, to which degree the volume of a truck shall be utilized (loss due to inefficient stacking and different packaging sizes).','Sea and road transport','8'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Max validity period of container freight rates [days]', 'VALID_DAYS', 'INT', '{"GT": 0}','Defines the maximum period of time, after which container freight rates cannot be used for calculations anymore.','General','8'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Metropolition region size (diameter) [km]', 'RADIUS_REGION', 'INT', '{"GT": 0}','Defines the average distance a supplier may have from a defined source (e.g. center of metropolitan area), for which a container rate is maintained.','General','9'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Min delivery frequency / year for containter transports', 'FREQ_MIN', 'INT', '{"GT": 0, "LT": 366}','Relevant for low runners; defines into how many deliveries a HU shall be split, if HU content >= yearly demand (e.g. 4 = 1/4 of yearly demand is allocated to a shipment)','General','10'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Max delivery frequency / year for containter transport', 'FREQ_MAX', 'INT', '{"GT": 0, "LT": 366}','Relevant for high runners; defines the maximum shipping frequency for sea shipments (e.g. 52 = weekly, 104 = 2x/week, 12 = monthly etc.)','General','11'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Max load 20 ft. container [kg]', 'TEU_LOAD', 'INT', '{"GT": 0}','Defines the weight limit of a TEU container.','Sea and road transport','4'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Max load 40 ft. container [kg]', 'FEU_LOAD', 'INT', '{"GT": 0}','Defines the weight limit of a FEU container. Can be also limited by local law (e.g. road transport weight in CN limited to 21 tons).','Sea and road transport','5'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Max load truck [kg]', 'TRUCK_LOAD', 'INT', '{"GT": 0}','Defines the weight limit of a truck (use standard type, usually 40-ton truck)','Sea and road transport','7'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Pre-carriage [EUR/kg]', 'AIR_PRECARRIAGE', 'CURRENCY', '{"GTE": 0}','For air transports only: cost per kg for pre-carriage to airport in country of origin','Air transport','1'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Pre-carriage handling [EUR]', 'AIR_HANDLING', 'CURRENCY', '{"GTE": 0}','For air transports only: one time costs for handling of air shipments (documents)','Air transport','2'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Main carriage [EUR/kg]', 'AIR_MAINCARRIAGE', 'CURRENCY', '{"GTE": 0}','For air transports only: cost per kg for flight. (use as reference route the flight route with the highest traffic, e.g. CN-DE)','Air transport','3'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Hand over fee [EUR]', 'AIR_HANDOVER_FEE', 'CURRENCY', '{"GTE": 0}','For air transports only: one time cost for handover of air shipment ','Air transport','4'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Customs clearance fee [EUR]', 'AIR_CUSTOM_FEE', 'CURRENCY', '{"GTE": 0}','For air transports only: one time cost for customs clearance of air shipment ','Air transport','5'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'On-carriage [EUR/kg]', 'AIR_ONCARRIAGE', 'CURRENCY', '{"GTE": 0}','For air transports only: cost per kg for on-carriage from airport to destination','Air transport','6'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Terminal handling fee [EUR/kg]', 'AIR_TERMINAL_FEE', 'CURRENCY', '{"GTE": 0}','For air transports only: cost per kg for handling of shipment in airport terminal','Air transport','7'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GR handling KLT [EUR/HU] (DE)', 'KLT_HANDLING', 'CURRENCY', '{"GTE": 0}','Cost per KLT for the handling in the Goods Receipt area of a warehouse or plant; reference country: Germany','Warehouse','4'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GR handling GLT [EUR/HU] (DE)', 'GLT_HANDLING', 'CURRENCY', '{"GTE": 0}','Cost per KLT for the handling in the Goods Receipt area of a warehouse or plant; reference country: Germany','Warehouse','5'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GLT booking & document handling [EUR/GR] (DE)', 'BOOKING', 'CURRENCY', '{"GTE": 0}','One time document handling fee for 1 GLT; reference country: Germany','Warehouse','2'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GLT release from storage [EUR/GLT release] (DE)', 'GLT_RELEASE', 'CURRENCY', '{"GTE": 0}','Cost to release one GLT from the storage; reference country: Germany','Warehouse','11'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'KLT release from storage [EUR/KLT release] (DE)', 'KLT_RELEASE', 'CURRENCY', '{"GTE": 0}','Cost to release one KLT from the storage; reference country: Germany','Warehouse','12'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GLT dispatch [EUR/GLT dispatch] (DE)', 'GLT_DISPATCH', 'CURRENCY', '{"GTE": 0}','Cost to release one GLT from the storage; reference country: Germany','Warehouse','13'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'KLT dispacth [EUR/KLT dispatch] (DE)', 'KLT_DISPATCH', 'CURRENCY', '{"GTE": 0}','Cost to release one KLT from the storage; reference country: Germany','Warehouse','14'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Repacking KLT, HU <15kg [EUR/HU] (DE)', 'KLT_REPACK_S', 'CURRENCY', '{"GTE": 0}','Cost to repack one KLT (<15 kg) from one-way to returnable empty; reference country: Germany','Warehouse','6'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Repacking KLT, HU >=15kg [EUR/HU] (DE)', 'KLT_REPACK_M', 'CURRENCY', '{"GTE": 0}','Cost to repack one KLT (>=15 kg) from one-way to returnable empty with crane handling; reference country: Germany','Warehouse','7'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Repacking GLT, HU <15kg [EUR/HU] (DE)', 'GLT_REPACK_S', 'CURRENCY', '{"GTE": 0}','Cost to repack one GLT (<15 kg) from oneway to returnable empty; reference country: Germany','Warehouse','8'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Repacking GLT, HU 15 - 2000kg [EUR/HU] (DE)', 'GLT_REPACK_M', 'CURRENCY', '{"GTE": 0}','Cost to repack one GLT (>=15 - 2000 kg) from one-way to returnable empty with crane handling; reference country: Germany','Warehouse','9'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Repacking GLT, HU >2000kg [EUR/HU] (DE)', 'GLT_REPACK_L', 'INT', '{"GTE": 0}','Cost to repack one GLT (> 2000 kg, e.g. counterweight) from one-way to returnable empty with crane handling; reference country: Germany','Warehouse','10'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'GLT disposal [EUR/GLT] (DE)', 'DISPOSAL', 'INT', '{"GTE": 0}','Cost to dispose one wooden pallet (value valid for all countries)','Warehouse','15'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'Space costs per cbm per night [EUR/cbm] (DE)', 'SPACE_COST', 'CURRENCY', '{"GTE": 0}','Cost per month for a standard storage bin (1,20 x 0,80 x 1,00 m)','Warehouse','1'); +INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule, description, property_group, sort_id) VALUES ( 'KLT booking & document handling [EUR/GR] (DE)', 'BOOKING_KLT', 'CURRENCY', '{"GTE": 0}','One time document handling fee for 1 KLT; reference country: Germany','Warehouse','3'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Payment terms [days]', 'PAYMENT_TERMS', 'INT', '{}'); - -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Annual working days', 'WORKDAYS', 'INT', '{"GT": 0, "LT": 366}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Interest rate inventory [%]', 'INTEREST_RATE', 'PERCENTAGE', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'FCA fee [%]', 'FCA_FEE', 'PERCENTAGE', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Default customs duty [%]', 'TARIFF_RATE', 'PERCENTAGE', '{"GTE":0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Customs clearance fee per import & HS code', 'CUSTOM_FEE', 'CURRENCY', '{"GTE":0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Standard-Report Format', 'REPORTING', 'ENUMERATION', '{"ENUM":["MEK_B","MEK_C"]}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( '40''', 'FEU', 'BOOLEAN', '{}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( '20''', 'TEU', 'BOOLEAN', '{}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( '40''HC', 'FEU_HQ', 'BOOLEAN', '{}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Container utilization in mixed containers [%]', 'CONTAINER_UTIL', 'PERCENTAGE', '{"GTE":0,"LTE":1}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Truck utilization road transport EMEA [%]', 'TRUCK_UTIL', 'PERCENTAGE', '{"GTE":0,"LTE":1}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Max validity of container freight rates [days]', 'VALID_DAYS', 'INT', '{"GT": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Metropolition region size (diameter) [km]', 'RADIUS_REGION', 'INT', '{"GT": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Min delivery frequency / year for containtrer transports', 'FREQ_MIN', 'INT', '{"GT": 0, "LT": 366}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Max delivery frequency / year for containtrer transports', 'FREQ_MAX', 'INT', '{"GT": 0, "LT": 366}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Max load of 20'' container [kg]', 'TEU_LOAD', 'INT', '{"GT": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Max load of 40'' container [kg]', 'FEU_LOAD', 'INT', '{"GT": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Max load of a truck [kg]', 'TRUCK_LOAD', 'INT', '{"GT": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Pre-carriage [EUR/kg]', 'AIR_PRECARRIAGE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Pre-carriage handling [EUR]', 'AIR_HANDLING', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Main carriage [EUR/kg]', 'AIR_MAINCARRIAGE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Hand over fee [EUR]', 'AIR_HANDOVER_FEE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Customs clearance fee [EUR]', 'AIR_CUSTOM_FEE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'On-carriage [EUR/kg]', 'AIR_ONCARRIAGE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Terminal handling fee [EUR/kg]', 'AIR_TERMINAL_FEE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GR handling KLT [EUR/HU]', 'KLT_HANDLING', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GR handling GLT [EUR/HU]', 'GLT_HANDLING', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GLT/KLT booking & document handling [EUR/GR]', 'BOOKING', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GLT release from storage [EUR/GLT release]', 'GLT_RELEASE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'KLT release from storage [EUR/KLT release]', 'KLT_RELEASE', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GLT dispatch [EUR/GLT dispatch]', 'GLT_DISPATCH', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'KLT dispacth [EUR/KLT dispatch]', 'KLT_DISPATCH', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Repacking KLT, HU <15kg [EUR/HU]', 'KLT_REPACK_S', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Repacking KLT, HU >=15kg [EUR/HU]', 'KLT_REPACK_M', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Repacking GLT, HU <15kg [EUR/HU]', 'GLT_REPACK_S', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Repacking GLT, HU 15 - 2000kg [EUR/HU]', 'GLT_REPACK_M', 'CURRENCY', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Repacking GLT, HU > 2000kg [EUR/HU]', 'GLT_REPACK_L', 'INT', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'GLT disposal [EUR/GLT]', 'DISPOSAL', 'INT', '{"GTE": 0}'); -INSERT INTO system_property_type ( name, external_mapping_id, data_type, validation_rule) VALUES ( 'Space costs / m3 per night [EUR/m3]', 'SPACE_COST', 'CURRENCY', '{"GTE": 0}'); -- =================================================== -- INSERT Statements für system_property @@ -456,6 +456,19 @@ VALUES ( '3.5' ); +INSERT INTO system_property (property_set_id, system_property_type_id, property_value) +VALUES ( + (SELECT ps.id FROM `property_set` ps + WHERE ps.state = 'VALID' + AND ps.start_date <= NOW() + AND (ps.end_date IS NULL OR ps.end_date > NOW()) + ORDER BY ps.start_date DESC + LIMIT 1), + (SELECT spt.id FROM system_property_type spt WHERE spt.external_mapping_id = 'BOOKING_KLT'), + '0.35' + ); + + INSERT INTO system_property (property_set_id, system_property_type_id, property_value) VALUES ( (SELECT ps.id FROM `property_set` ps diff --git a/src/main/resources/schema.sql b/src/main/resources/schema.sql index 6a9931e..91a4d20 100644 --- a/src/main/resources/schema.sql +++ b/src/main/resources/schema.sql @@ -20,6 +20,9 @@ CREATE TABLE IF NOT EXISTS `system_property_type` `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` VARCHAR(255) NOT NULL, `external_mapping_id` VARCHAR(16), + `description` VARCHAR(255) NOT NULL, + `property_group` VARCHAR(32) NOT NULL, + `sort_id` INT, `data_type` VARCHAR(16) NOT NULL, `validation_rule` VARCHAR(64), UNIQUE KEY `idx_external_mapping` (`external_mapping_id`),