From 3820ee8a8839a30622d594e50a0ce36d49425fbf Mon Sep 17 00:00:00 2001 From: TemuulenBM Date: Wed, 15 Nov 2023 18:04:39 +0800 Subject: [PATCH] created crud of warehouses,products,suppliers --- addon/components/product-form-panel.hbs | 106 +- addon/components/product-panel/details.hbs | 41 +- addon/components/warehouse-form-panel.hbs | 58 +- addon/components/warehouse-form-panel.js | 197 +- addon/components/warehouse-panel.hbs | 50 +- addon/components/warehouse-panel.js | 2 +- addon/components/warehouse-panel/details.hbs | 85 + addon/controllers/products/index.js | 172 +- addon/controllers/products/index/edit.js | 2 +- addon/controllers/products/index/new.js | 6 +- addon/controllers/suppliers/index.js | 5 +- addon/controllers/suppliers/index/details.js | 54 +- addon/controllers/suppliers/index/edit.js | 109 +- addon/controllers/suppliers/index/new.js | 87 +- addon/controllers/warehouses/index.js | 193 +- addon/controllers/warehouses/index/details.js | 54 +- addon/controllers/warehouses/index/edit.js | 110 +- addon/controllers/warehouses/index/new.js | 87 +- addon/helpers/point-coordinates.js | 10 + addon/helpers/point-to-coordinates.js | 28 + addon/models/warehouse.js | 4 +- addon/routes.js | 8 +- addon/routes/products/index.js | 15 +- addon/routes/products/index/details.js | 2 +- addon/routes/products/index/edit.js | 2 +- addon/routes/suppliers/index.js | 14 + addon/routes/suppliers/index/details.js | 13 +- addon/routes/suppliers/index/edit.js | 9 +- addon/routes/warehouses/index.js | 12 +- addon/routes/warehouses/index/details.js | 13 +- addon/routes/warehouses/index/edit.js | 9 +- addon/serializers/pallet-product.js | 4 + addon/serializers/supplier.js | 12 + addon/serializers/warehouse.js | 13 + addon/templates/suppliers/index/details.hbs | 3 +- addon/templates/suppliers/index/edit.hbs | 3 +- addon/templates/suppliers/index/new.hbs | 3 +- addon/templates/warehouses/index/details.hbs | 3 +- addon/templates/warehouses/index/edit.hbs | 3 +- addon/templates/warehouses/index/new.hbs | 3 +- addon/utils/extract-coordinates.js | 1 + addon/utils/geojson/geo-json.js | 17 + app/helpers/point-coordinates.js | 1 + app/helpers/point-to-coordinates.js | 1 + app/serializers/supplier.js | 1 + app/serializers/warehouse.js | 1 + app/utils/extract-coordinates.js | 1 + app/utils/geojson/geo-json.js | 1 + composer.json | 3 +- g.sh | 44 + package.json | 13 +- pnpm-lock.yaml | 3067 ++++++++--------- ...7_025307_create_payment_gateways_table.php | 44 - .../2023_07_17_025307_create_plans_table.php | 43 - ...7_17_025307_create_subscriptions_table.php | 43 - ...23_07_17_025308_create_customers_table.php | 39 - ...025308_create_subscription_items_table.php | 38 - ...foreign_keys_to_payment_gateways_table.php | 32 - ...025310_add_foreign_keys_to_plans_table.php | 38 - ...dd_foreign_keys_to_subscriptions_table.php | 40 - ...11_add_foreign_keys_to_customers_table.php | 36 - ...reign_keys_to_subscription_items_table.php | 32 - .../2023_11_15_023331_create_audits_table.php | 39 + ...2023_11_15_023340_create_batches_table.php | 38 + ...23_11_15_023348_create_inventory_table.php | 37 + ...15_023356_create_purchase_orders_table.php | 36 + ...11_15_023404_create_sales_orders_table.php | 36 + ...023411_create_stock_transactions_table.php | 40 + ...5_034937_create_stock_adjustment_table.php | 36 + server/src/Http/Filter/ProductFilter.php | 78 + server/src/Models/Audit.php | 43 +- server/src/Models/Batch.php | 15 +- server/src/Models/Inventory.php | 14 +- server/src/Models/Product.php | 2 +- server/src/Models/PurchaseOrder.php | 16 +- server/src/Models/SalesOrder.php | 14 +- server/src/Models/StockAdjustment.php | 13 +- server/src/Models/StockTransaction.php | 17 +- server/src/routes.php | 8 +- .../helpers/point-coordinates-test.js | 17 + .../helpers/point-to-coordinates-test.js | 17 + tests/unit/serializers/supplier-test.js | 23 + tests/unit/serializers/warehouse-test.js | 23 + tests/unit/utils/extract-coordinates-test.js | 10 + tests/unit/utils/geojson/geo-json-test.js | 10 + 85 files changed, 3642 insertions(+), 2080 deletions(-) create mode 100644 addon/helpers/point-coordinates.js create mode 100644 addon/helpers/point-to-coordinates.js create mode 100644 addon/serializers/supplier.js create mode 100644 addon/serializers/warehouse.js create mode 100644 addon/utils/extract-coordinates.js create mode 100644 addon/utils/geojson/geo-json.js create mode 100644 app/helpers/point-coordinates.js create mode 100644 app/helpers/point-to-coordinates.js create mode 100644 app/serializers/supplier.js create mode 100644 app/serializers/warehouse.js create mode 100644 app/utils/extract-coordinates.js create mode 100644 app/utils/geojson/geo-json.js create mode 100644 g.sh delete mode 100644 server/migrations/2023_07_17_025307_create_payment_gateways_table.php delete mode 100644 server/migrations/2023_07_17_025307_create_plans_table.php delete mode 100644 server/migrations/2023_07_17_025307_create_subscriptions_table.php delete mode 100644 server/migrations/2023_07_17_025308_create_customers_table.php delete mode 100644 server/migrations/2023_07_17_025308_create_subscription_items_table.php delete mode 100644 server/migrations/2023_07_17_025310_add_foreign_keys_to_payment_gateways_table.php delete mode 100644 server/migrations/2023_07_17_025310_add_foreign_keys_to_plans_table.php delete mode 100644 server/migrations/2023_07_17_025310_add_foreign_keys_to_subscriptions_table.php delete mode 100644 server/migrations/2023_07_17_025311_add_foreign_keys_to_customers_table.php delete mode 100644 server/migrations/2023_07_17_025311_add_foreign_keys_to_subscription_items_table.php create mode 100644 server/migrations/2023_11_15_023331_create_audits_table.php create mode 100644 server/migrations/2023_11_15_023340_create_batches_table.php create mode 100644 server/migrations/2023_11_15_023348_create_inventory_table.php create mode 100644 server/migrations/2023_11_15_023356_create_purchase_orders_table.php create mode 100644 server/migrations/2023_11_15_023404_create_sales_orders_table.php create mode 100644 server/migrations/2023_11_15_023411_create_stock_transactions_table.php create mode 100644 server/migrations/2023_11_15_034937_create_stock_adjustment_table.php create mode 100644 tests/integration/helpers/point-coordinates-test.js create mode 100644 tests/integration/helpers/point-to-coordinates-test.js create mode 100644 tests/unit/serializers/supplier-test.js create mode 100644 tests/unit/serializers/warehouse-test.js create mode 100644 tests/unit/utils/extract-coordinates-test.js create mode 100644 tests/unit/utils/geojson/geo-json-test.js diff --git a/addon/components/product-form-panel.hbs b/addon/components/product-form-panel.hbs index c505ca31..6be28136 100644 --- a/addon/components/product-form-panel.hbs +++ b/addon/components/product-form-panel.hbs @@ -10,7 +10,7 @@
{{#if this.product.id}} -
@@ -68,5 +68,107 @@
- + +
+ {{this.product.name}} + +
+
+ +
+ + + +
+ +