@things-factory/operato-pms 3.8.0 → 3.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/bootstrap.js +20 -7
- package/client/component/block-selector-popup.js +125 -24
- package/client/component/driver-selector-popup.js +223 -0
- package/client/component/mill-selector-popup.js +200 -0
- package/client/component/tracked-plantation-setting.js +113 -0
- package/client/component/truck-selector-popup.js +202 -0
- package/client/menu.js +34 -2
- package/client/pages/constants/index.js +1 -0
- package/client/pages/constants/organization.js +5 -0
- package/client/pages/dispatchment/daily-dispatch-detail.js +57 -18
- package/client/pages/dispatchment/dispatchment-create-record.js +140 -13
- package/client/pages/dispatchment/dispatchment-list.js +26 -34
- package/client/pages/harvesting/daily-harvesting-detail.js +55 -18
- package/client/pages/harvesting/edit-harvesting-record.js +89 -23
- package/client/pages/harvesting/harvesting-create-record.js +102 -16
- package/client/pages/harvesting/harvesting-list.js +58 -12
- package/client/pages/inventory/inventory-field-bunches.js +6 -4
- package/client/pages/loading/daily-loading-detail.js +47 -93
- package/client/pages/loading/edit-loading-record.js +75 -294
- package/client/pages/loading/loading-create-record.js +52 -329
- package/client/pages/loading/loading-list.js +20 -83
- package/client/pages/master/block.js +1 -0
- package/client/pages/master/company.js +26 -13
- package/client/pages/master/home.js +67 -65
- package/client/pages/master/ramp.js +1 -0
- package/client/pages/master/staff.js +54 -3
- package/client/pages/master/truck.js +416 -0
- package/client/pages/report/home.js +72 -65
- package/client/pages/report/report-daily-ffb-dispatch-and-production.js +393 -0
- package/client/pages/report/report-daily-production.js +38 -6
- package/client/pages/report/report-daily-staff-harvest.js +50 -5
- package/client/pages/report/report-ffb-tonnage-between-individual-block.js +393 -0
- package/client/pages/report/report-monthly-ffb-sale.js +413 -0
- package/client/pages/report/report-monthly-production.js +33 -4
- package/client/pages/report/report-yearly-production.js +24 -8
- package/client/pages/setting/home.js +107 -0
- package/client/pages/setting/plantation-setting.js +109 -0
- package/client/route.js +25 -0
- package/dist-server/constants/index.js +1 -0
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/organization.js +9 -0
- package/dist-server/constants/organization.js.map +1 -0
- package/dist-server/controllers/render-dispatchment.js +1 -1
- package/dist-server/controllers/render-dispatchment.js.map +1 -1
- package/dist-server/entities/daily-dispatch.js +19 -4
- package/dist-server/entities/daily-dispatch.js.map +1 -1
- package/dist-server/entities/daily-harvest-detail.js +9 -11
- package/dist-server/entities/daily-harvest-detail.js.map +1 -1
- package/dist-server/entities/daily-harvest.js +16 -6
- package/dist-server/entities/daily-harvest.js.map +1 -1
- package/dist-server/entities/daily-loading-detail.js +14 -6
- package/dist-server/entities/daily-loading-detail.js.map +1 -1
- package/dist-server/entities/daily-loading.js +3 -11
- package/dist-server/entities/daily-loading.js.map +1 -1
- package/dist-server/entities/index.js +7 -1
- package/dist-server/entities/index.js.map +1 -1
- package/dist-server/entities/organization-staff.js +5 -1
- package/dist-server/entities/organization-staff.js.map +1 -1
- package/dist-server/entities/plantation-inventory.js +4 -10
- package/dist-server/entities/plantation-inventory.js.map +1 -1
- package/dist-server/entities/plantation-setting.js +76 -0
- package/dist-server/entities/plantation-setting.js.map +1 -0
- package/dist-server/entities/truck.js +77 -0
- package/dist-server/entities/truck.js.map +1 -0
- package/dist-server/graphql/resolvers/daily-dispatch/daily-dispatch-query.js +13 -2
- package/dist-server/graphql/resolvers/daily-dispatch/daily-dispatch-query.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.js +25 -11
- package/dist-server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-dispatch/update-daily-dispatch.js +3 -2
- package/dist-server/graphql/resolvers/daily-dispatch/update-daily-dispatch.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-harvest/daily-harvest-query.js +3 -1
- package/dist-server/graphql/resolvers/daily-harvest/daily-harvest-query.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-harvest/generate-daily-harvest.js +21 -2
- package/dist-server/graphql/resolvers/daily-harvest/generate-daily-harvest.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-harvest/update-daily-harvest.js +8 -2
- package/dist-server/graphql/resolvers/daily-harvest/update-daily-harvest.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-loading/daily-loading-query.js +4 -6
- package/dist-server/graphql/resolvers/daily-loading/daily-loading-query.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-loading/generate-daily-loading.js +20 -54
- package/dist-server/graphql/resolvers/daily-loading/generate-daily-loading.js.map +1 -1
- package/dist-server/graphql/resolvers/daily-loading/update-daily-loading.js +17 -105
- package/dist-server/graphql/resolvers/daily-loading/update-daily-loading.js.map +1 -1
- package/dist-server/graphql/resolvers/dashboard/dashboard-query.js +82 -0
- package/dist-server/graphql/resolvers/dashboard/dashboard-query.js.map +1 -0
- package/dist-server/graphql/resolvers/dashboard/index.js +8 -0
- package/dist-server/graphql/resolvers/dashboard/index.js.map +1 -0
- package/dist-server/graphql/resolvers/index.js +9 -6
- package/dist-server/graphql/resolvers/index.js.map +1 -1
- package/dist-server/graphql/resolvers/organization-staff/organization-staff-query.js +7 -3
- package/dist-server/graphql/resolvers/organization-staff/organization-staff-query.js.map +1 -1
- package/dist-server/graphql/resolvers/plantation-setting/create-plantation-setting.js +12 -0
- package/dist-server/graphql/resolvers/plantation-setting/create-plantation-setting.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/delete-plantation-setting.js +13 -0
- package/dist-server/graphql/resolvers/plantation-setting/delete-plantation-setting.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/delete-plantation-settings.js +16 -0
- package/dist-server/graphql/resolvers/plantation-setting/delete-plantation-settings.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/index.js +15 -0
- package/dist-server/graphql/resolvers/plantation-setting/index.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/plantation-setting-query.js +33 -0
- package/dist-server/graphql/resolvers/plantation-setting/plantation-setting-query.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.js +31 -0
- package/dist-server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.js.map +1 -0
- package/dist-server/graphql/resolvers/plantation-setting/update-plantation-setting.js +16 -0
- package/dist-server/graphql/resolvers/plantation-setting/update-plantation-setting.js.map +1 -0
- package/dist-server/graphql/resolvers/report/daily-production-reports.js +46 -33
- package/dist-server/graphql/resolvers/report/daily-production-reports.js.map +1 -1
- package/dist-server/graphql/resolvers/report/daily-staff-harvest-reports.js +21 -10
- package/dist-server/graphql/resolvers/report/daily-staff-harvest-reports.js.map +1 -1
- package/dist-server/graphql/resolvers/report/index.js +4 -1
- package/dist-server/graphql/resolvers/report/index.js.map +1 -1
- package/dist-server/graphql/resolvers/report/monthly-block-dispatch-reports.js +89 -0
- package/dist-server/graphql/resolvers/report/monthly-block-dispatch-reports.js.map +1 -0
- package/dist-server/graphql/resolvers/report/monthly-dispatch-summary-reports.js +89 -0
- package/dist-server/graphql/resolvers/report/monthly-dispatch-summary-reports.js.map +1 -0
- package/dist-server/graphql/resolvers/report/monthly-ffb-sale-reports.js +87 -0
- package/dist-server/graphql/resolvers/report/monthly-ffb-sale-reports.js.map +1 -0
- package/dist-server/graphql/resolvers/report/monthly-production-reports.js +46 -31
- package/dist-server/graphql/resolvers/report/monthly-production-reports.js.map +1 -1
- package/dist-server/graphql/resolvers/report/yearly-production-reports.js +38 -28
- package/dist-server/graphql/resolvers/report/yearly-production-reports.js.map +1 -1
- package/dist-server/graphql/resolvers/truck/delete-trucks.js +18 -0
- package/dist-server/graphql/resolvers/truck/delete-trucks.js.map +1 -0
- package/dist-server/graphql/resolvers/truck/index.js +12 -0
- package/dist-server/graphql/resolvers/truck/index.js.map +1 -0
- package/dist-server/graphql/resolvers/truck/truck-query.js +46 -0
- package/dist-server/graphql/resolvers/truck/truck-query.js.map +1 -0
- package/dist-server/graphql/resolvers/truck/update-multiple-truck.js +40 -0
- package/dist-server/graphql/resolvers/truck/update-multiple-truck.js.map +1 -0
- package/dist-server/graphql/types/daily-dispatch/daily-dispatch-patch.js +4 -1
- package/dist-server/graphql/types/daily-dispatch/daily-dispatch-patch.js.map +1 -1
- package/dist-server/graphql/types/daily-dispatch/daily-dispatch.js +4 -1
- package/dist-server/graphql/types/daily-dispatch/daily-dispatch.js.map +1 -1
- package/dist-server/graphql/types/daily-dispatch/index.js +6 -1
- package/dist-server/graphql/types/daily-dispatch/index.js.map +1 -1
- package/dist-server/graphql/types/daily-dispatch/new-daily-dispatch.js +4 -1
- package/dist-server/graphql/types/daily-dispatch/new-daily-dispatch.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest/daily-harvest-patch.js +5 -2
- package/dist-server/graphql/types/daily-harvest/daily-harvest-patch.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest/daily-harvest.js +3 -0
- package/dist-server/graphql/types/daily-harvest/daily-harvest.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest/new-daily-harvest.js +4 -1
- package/dist-server/graphql/types/daily-harvest/new-daily-harvest.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.js +1 -0
- package/dist-server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest-detail/daily-harvest-detail.js +1 -0
- package/dist-server/graphql/types/daily-harvest-detail/daily-harvest-detail.js.map +1 -1
- package/dist-server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.js +1 -0
- package/dist-server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.js.map +1 -1
- package/dist-server/graphql/types/daily-loading/daily-loading-patch.js +0 -2
- package/dist-server/graphql/types/daily-loading/daily-loading-patch.js.map +1 -1
- package/dist-server/graphql/types/daily-loading/daily-loading.js +0 -2
- package/dist-server/graphql/types/daily-loading/daily-loading.js.map +1 -1
- package/dist-server/graphql/types/daily-loading/new-daily-loading.js +0 -2
- package/dist-server/graphql/types/daily-loading/new-daily-loading.js.map +1 -1
- package/dist-server/graphql/types/daily-loading-detail/daily-loading-detail-patch.js +6 -3
- package/dist-server/graphql/types/daily-loading-detail/daily-loading-detail-patch.js.map +1 -1
- package/dist-server/graphql/types/daily-loading-detail/daily-loading-detail.js +3 -0
- package/dist-server/graphql/types/daily-loading-detail/daily-loading-detail.js.map +1 -1
- package/dist-server/graphql/types/daily-loading-detail/new-daily-loading-detail.js +6 -3
- package/dist-server/graphql/types/daily-loading-detail/new-daily-loading-detail.js.map +1 -1
- package/dist-server/graphql/types/dashboard/bunches-count.js +15 -0
- package/dist-server/graphql/types/dashboard/bunches-count.js.map +1 -0
- package/dist-server/graphql/types/dashboard/index.js +32 -0
- package/dist-server/graphql/types/dashboard/index.js.map +1 -0
- package/dist-server/graphql/types/dashboard/productions-overview.js +15 -0
- package/dist-server/graphql/types/dashboard/productions-overview.js.map +1 -0
- package/dist-server/graphql/types/dashboard/tonnage-bunches-inventories.js +14 -0
- package/dist-server/graphql/types/dashboard/tonnage-bunches-inventories.js.map +1 -0
- package/dist-server/graphql/types/dashboard/tonnage-production.js +17 -0
- package/dist-server/graphql/types/dashboard/tonnage-production.js.map +1 -0
- package/dist-server/graphql/types/dashboard/yield-production.js +17 -0
- package/dist-server/graphql/types/dashboard/yield-production.js.map +1 -0
- package/dist-server/graphql/types/index.js +9 -6
- package/dist-server/graphql/types/index.js.map +1 -1
- package/dist-server/graphql/types/organization-staff/organization-staff-patch.js +2 -0
- package/dist-server/graphql/types/organization-staff/organization-staff-patch.js.map +1 -1
- package/dist-server/graphql/types/organization-staff/organization-staff.js +3 -0
- package/dist-server/graphql/types/organization-staff/organization-staff.js.map +1 -1
- package/dist-server/graphql/types/plantation-setting/index.js +36 -0
- package/dist-server/graphql/types/plantation-setting/index.js.map +1 -0
- package/dist-server/graphql/types/plantation-setting/new-plantation-setting.js +16 -0
- package/dist-server/graphql/types/plantation-setting/new-plantation-setting.js.map +1 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting-list.js +14 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting-list.js.map +1 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting-patch.js +18 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting-patch.js.map +1 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting.js +22 -0
- package/dist-server/graphql/types/plantation-setting/plantation-setting.js.map +1 -0
- package/dist-server/graphql/types/report/index.js +20 -0
- package/dist-server/graphql/types/report/index.js.map +1 -1
- package/dist-server/graphql/types/report/monthly-block-dispatch-report-list.js +14 -0
- package/dist-server/graphql/types/report/monthly-block-dispatch-report-list.js.map +1 -0
- package/dist-server/graphql/types/report/monthly-block-dispatch-report.js +19 -0
- package/dist-server/graphql/types/report/monthly-block-dispatch-report.js.map +1 -0
- package/dist-server/graphql/types/report/monthly-dispatch-summary-report-list.js +14 -0
- package/dist-server/graphql/types/report/monthly-dispatch-summary-report-list.js.map +1 -0
- package/dist-server/graphql/types/report/monthly-dispatch-summary-report.js +25 -0
- package/dist-server/graphql/types/report/monthly-dispatch-summary-report.js.map +1 -0
- package/dist-server/graphql/types/report/monthly-ffb-sale-report-list.js +14 -0
- package/dist-server/graphql/types/report/monthly-ffb-sale-report-list.js.map +1 -0
- package/dist-server/graphql/types/report/monthly-ffb-sale-report.js +24 -0
- package/dist-server/graphql/types/report/monthly-ffb-sale-report.js.map +1 -0
- package/dist-server/graphql/types/truck/index.js +33 -0
- package/dist-server/graphql/types/truck/index.js.map +1 -0
- package/dist-server/graphql/types/truck/new-truck.js +14 -0
- package/dist-server/graphql/types/truck/new-truck.js.map +1 -0
- package/dist-server/graphql/types/truck/truck-list.js +14 -0
- package/dist-server/graphql/types/truck/truck-list.js.map +1 -0
- package/dist-server/graphql/types/truck/truck-patch.js +17 -0
- package/dist-server/graphql/types/truck/truck-patch.js.map +1 -0
- package/dist-server/graphql/types/truck/truck.js +22 -0
- package/dist-server/graphql/types/truck/truck.js.map +1 -0
- package/package.json +2 -2
- package/server/constants/index.ts +1 -0
- package/server/constants/organization.ts +5 -0
- package/server/controllers/render-dispatchment.ts +1 -1
- package/server/entities/daily-dispatch.ts +21 -5
- package/server/entities/daily-harvest-detail.ts +10 -11
- package/server/entities/daily-harvest.ts +16 -7
- package/server/entities/daily-loading-detail.ts +14 -6
- package/server/entities/daily-loading.ts +7 -11
- package/server/entities/index.ts +6 -0
- package/server/entities/organization-staff.ts +6 -1
- package/server/entities/plantation-inventory.ts +6 -10
- package/server/entities/plantation-setting.ts +60 -0
- package/server/entities/truck.ts +58 -0
- package/server/graphql/resolvers/daily-dispatch/daily-dispatch-query.ts +15 -2
- package/server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.ts +40 -14
- package/server/graphql/resolvers/daily-dispatch/update-daily-dispatch.ts +6 -2
- package/server/graphql/resolvers/daily-harvest/daily-harvest-query.ts +7 -2
- package/server/graphql/resolvers/daily-harvest/generate-daily-harvest.ts +50 -4
- package/server/graphql/resolvers/daily-harvest/update-daily-harvest.ts +12 -2
- package/server/graphql/resolvers/daily-loading/daily-loading-query.ts +6 -6
- package/server/graphql/resolvers/daily-loading/generate-daily-loading.ts +27 -109
- package/server/graphql/resolvers/daily-loading/update-daily-loading.ts +27 -213
- package/server/graphql/resolvers/dashboard/dashboard-query.ts +96 -0
- package/server/graphql/resolvers/dashboard/index.ts +5 -0
- package/server/graphql/resolvers/index.ts +10 -6
- package/server/graphql/resolvers/organization-staff/organization-staff-query.ts +13 -4
- package/server/graphql/resolvers/plantation-setting/create-plantation-setting.ts +16 -0
- package/server/graphql/resolvers/plantation-setting/delete-plantation-setting.ts +13 -0
- package/server/graphql/resolvers/plantation-setting/delete-plantation-settings.ts +16 -0
- package/server/graphql/resolvers/plantation-setting/index.ts +19 -0
- package/server/graphql/resolvers/plantation-setting/plantation-setting-query.ts +38 -0
- package/server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.ts +46 -0
- package/server/graphql/resolvers/plantation-setting/update-plantation-setting.ts +19 -0
- package/server/graphql/resolvers/report/daily-production-reports.ts +55 -44
- package/server/graphql/resolvers/report/daily-staff-harvest-reports.ts +28 -20
- package/server/graphql/resolvers/report/index.ts +7 -1
- package/server/graphql/resolvers/report/monthly-block-dispatch-reports.ts +112 -0
- package/server/graphql/resolvers/report/monthly-dispatch-summary-reports.ts +110 -0
- package/server/graphql/resolvers/report/monthly-ffb-sale-reports.ts +107 -0
- package/server/graphql/resolvers/report/monthly-production-reports.ts +54 -40
- package/server/graphql/resolvers/report/yearly-production-reports.ts +43 -38
- package/server/graphql/resolvers/truck/delete-trucks.ts +21 -0
- package/server/graphql/resolvers/truck/index.ts +12 -0
- package/server/graphql/resolvers/truck/truck-query.ts +52 -0
- package/server/graphql/resolvers/truck/update-multiple-truck.ts +55 -0
- package/server/graphql/types/daily-dispatch/daily-dispatch-patch.ts +4 -1
- package/server/graphql/types/daily-dispatch/daily-dispatch.ts +4 -1
- package/server/graphql/types/daily-dispatch/index.ts +6 -1
- package/server/graphql/types/daily-dispatch/new-daily-dispatch.ts +4 -1
- package/server/graphql/types/daily-harvest/daily-harvest-patch.ts +5 -2
- package/server/graphql/types/daily-harvest/daily-harvest.ts +3 -0
- package/server/graphql/types/daily-harvest/new-daily-harvest.ts +4 -1
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.ts +1 -0
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail.ts +1 -0
- package/server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.ts +1 -0
- package/server/graphql/types/daily-loading/daily-loading-patch.ts +0 -2
- package/server/graphql/types/daily-loading/daily-loading.ts +0 -2
- package/server/graphql/types/daily-loading/new-daily-loading.ts +0 -2
- package/server/graphql/types/daily-loading-detail/daily-loading-detail-patch.ts +6 -3
- package/server/graphql/types/daily-loading-detail/daily-loading-detail.ts +3 -0
- package/server/graphql/types/daily-loading-detail/new-daily-loading-detail.ts +6 -3
- package/server/graphql/types/dashboard/bunches-count.ts +9 -0
- package/server/graphql/types/dashboard/index.ts +17 -0
- package/server/graphql/types/dashboard/productions-overview.ts +9 -0
- package/server/graphql/types/dashboard/tonnage-bunches-inventories.ts +8 -0
- package/server/graphql/types/dashboard/tonnage-production.ts +11 -0
- package/server/graphql/types/dashboard/yield-production.ts +11 -0
- package/server/graphql/types/index.ts +10 -6
- package/server/graphql/types/organization-staff/organization-staff-patch.ts +2 -0
- package/server/graphql/types/organization-staff/organization-staff.ts +3 -0
- package/server/graphql/types/plantation-setting/index.ts +21 -0
- package/server/graphql/types/plantation-setting/new-plantation-setting.ts +10 -0
- package/server/graphql/types/plantation-setting/plantation-setting-list.ts +8 -0
- package/server/graphql/types/plantation-setting/plantation-setting-patch.ts +12 -0
- package/server/graphql/types/plantation-setting/plantation-setting.ts +16 -0
- package/server/graphql/types/report/index.ts +20 -0
- package/server/graphql/types/report/monthly-block-dispatch-report-list.ts +7 -0
- package/server/graphql/types/report/monthly-block-dispatch-report.ts +13 -0
- package/server/graphql/types/report/monthly-dispatch-summary-report-list.ts +7 -0
- package/server/graphql/types/report/monthly-dispatch-summary-report.ts +19 -0
- package/server/graphql/types/report/monthly-ffb-sale-report-list.ts +7 -0
- package/server/graphql/types/report/monthly-ffb-sale-report.ts +18 -0
- package/server/graphql/types/truck/index.ts +18 -0
- package/server/graphql/types/truck/new-truck.ts +8 -0
- package/server/graphql/types/truck/truck-list.ts +8 -0
- package/server/graphql/types/truck/truck-patch.ts +11 -0
- package/server/graphql/types/truck/truck.ts +16 -0
- package/things-factory.config.js +27 -1
- package/translations/en.json +78 -16
- package/translations/ko.json +77 -48
- package/translations/ms.json +74 -45
- package/translations/zh.json +77 -48
|
@@ -1,23 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '../../component/driver-selector-popup'
|
|
2
|
+
import '../../component/truck-selector-popup'
|
|
3
|
+
import '../../component/mill-selector-popup'
|
|
2
4
|
import '@things-factory/grist-ui'
|
|
5
|
+
|
|
6
|
+
import gql from 'graphql-tag'
|
|
7
|
+
import { css, html } from 'lit-element'
|
|
8
|
+
|
|
9
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
10
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
11
|
+
import { openPopup } from '@things-factory/layout-base'
|
|
4
12
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
5
|
-
import gql from 'graphql-tag'
|
|
6
13
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
7
14
|
import { isMobileDevice } from '@things-factory/utils'
|
|
8
|
-
import { css, html } from 'lit-element'
|
|
9
15
|
|
|
10
16
|
class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
11
17
|
static get properties() {
|
|
12
18
|
return {
|
|
13
19
|
dispatchmentGristConfig: Object,
|
|
14
|
-
dispatchmentData: Object
|
|
20
|
+
dispatchmentData: Object,
|
|
21
|
+
selectedDriverName: String,
|
|
22
|
+
selectedDriverID: String,
|
|
23
|
+
selectedTruckName: String,
|
|
24
|
+
selectedMillName: String,
|
|
25
|
+
selectedTruckID: String,
|
|
26
|
+
selectedMillID: String
|
|
15
27
|
}
|
|
16
28
|
}
|
|
17
29
|
|
|
18
30
|
constructor() {
|
|
19
31
|
super()
|
|
20
32
|
this.dispatchmentData = { records: [] }
|
|
33
|
+
this.selectedDriverName = ''
|
|
34
|
+
this.selectedMillName = ''
|
|
35
|
+
this.selectedMillID = ''
|
|
36
|
+
this.selectedDriverID = ''
|
|
37
|
+
this.selectedTruckName = ''
|
|
38
|
+
this.selectedTruckID = ''
|
|
21
39
|
}
|
|
22
40
|
|
|
23
41
|
static get styles() {
|
|
@@ -93,17 +111,38 @@ class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
|
93
111
|
<label>${i18next.t('label.dispatchment_date')}</label>
|
|
94
112
|
<input type="datetime-local" name="dispatchAt" required />
|
|
95
113
|
|
|
96
|
-
<label>${i18next.t('label.
|
|
97
|
-
<input
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
114
|
+
<label>${i18next.t('label.driver')}</label>
|
|
115
|
+
<input
|
|
116
|
+
name="driver"
|
|
117
|
+
readonly
|
|
118
|
+
@click="${this._openDriverSelector.bind(this)}"
|
|
119
|
+
value=${this.selectedDriverName}
|
|
120
|
+
required
|
|
121
|
+
/>
|
|
122
|
+
|
|
123
|
+
<label>${i18next.t('label.lorry_no')}</label>
|
|
124
|
+
<input
|
|
125
|
+
name="transport"
|
|
126
|
+
readonly
|
|
127
|
+
@click="${this._openTruckSelector.bind(this)}"
|
|
128
|
+
value=${this.selectedTruckName}
|
|
129
|
+
required
|
|
130
|
+
/>
|
|
104
131
|
|
|
105
132
|
<label>${i18next.t('label.destination')}</label>
|
|
106
|
-
<input
|
|
133
|
+
<input
|
|
134
|
+
name="dispatchTo"
|
|
135
|
+
readonly
|
|
136
|
+
@click="${this._openMillSelector.bind(this)}"
|
|
137
|
+
value=${this.selectedMillName}
|
|
138
|
+
required
|
|
139
|
+
/>
|
|
140
|
+
|
|
141
|
+
<label>${i18next.t('label.chit_no')}</label>
|
|
142
|
+
<input name="chitNo" />
|
|
143
|
+
|
|
144
|
+
<label>${i18next.t('label.percentage')}</label>
|
|
145
|
+
<input name="percentage" type="number" min="0" />
|
|
107
146
|
</fieldset>
|
|
108
147
|
</form>
|
|
109
148
|
|
|
@@ -132,6 +171,27 @@ class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
|
132
171
|
return this.shadowRoot.querySelector('data-grist#dispatchment-grist')
|
|
133
172
|
}
|
|
134
173
|
|
|
174
|
+
get driverInput() {
|
|
175
|
+
return this.shadowRoot.querySelector('input[name=driver]')
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
get percentageInput() {
|
|
179
|
+
return this.shadowRoot.querySelector('input[name=percentage]')
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
get truckInput() {
|
|
183
|
+
return this.shadowRoot.querySelector('input[name=transport]')
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
pageUpdated() {
|
|
187
|
+
this.selectedDriverName = ''
|
|
188
|
+
this.selectedDriverID = ''
|
|
189
|
+
this.selectedTruckName = ''
|
|
190
|
+
this.selectedTruckID = ''
|
|
191
|
+
this.selectedMillName = ''
|
|
192
|
+
this.selectedMillID = ''
|
|
193
|
+
}
|
|
194
|
+
|
|
135
195
|
pageInitialized() {
|
|
136
196
|
this.dispatchmentGristConfig = {
|
|
137
197
|
pagination: { infinite: true },
|
|
@@ -295,6 +355,13 @@ class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
|
295
355
|
let dailyDispatch = this._getFormInfo()
|
|
296
356
|
dailyDispatch.dailyDispatchDetails = this._getDispatchDetails()
|
|
297
357
|
|
|
358
|
+
dailyDispatch = {
|
|
359
|
+
...dailyDispatch,
|
|
360
|
+
driver: { id: this.selectedDriverID, name: this.selectedDriverName },
|
|
361
|
+
transport: { id: this.selectedTruckID, name: this.selectedTruckName },
|
|
362
|
+
dispatchTo: { id: this.selectedMillID, name: this.selectedMillName }
|
|
363
|
+
}
|
|
364
|
+
|
|
298
365
|
const response = await client.mutate({
|
|
299
366
|
mutation: gql`
|
|
300
367
|
mutation generateDailyDispatch($dailyDispatch: NewDailyDispatch!) {
|
|
@@ -319,6 +386,12 @@ class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
|
319
386
|
|
|
320
387
|
_validateForm() {
|
|
321
388
|
if (!this.dispatchmentForm.checkValidity()) throw new Error(i18next.t('text.dispatch_record_invalid'))
|
|
389
|
+
|
|
390
|
+
if (this.percentageInput?.value) {
|
|
391
|
+
if (isNaN(this.percentageInput.value) || this.percentageInput?.value <= 0) {
|
|
392
|
+
throw new Error(i18next.t('text.x_has_invalid_value', { state: 'label.percentage' }))
|
|
393
|
+
}
|
|
394
|
+
}
|
|
322
395
|
}
|
|
323
396
|
|
|
324
397
|
_validateDispatchmentData() {
|
|
@@ -365,6 +438,60 @@ class DispatchmentCreateRecord extends localize(i18next)(PageView) {
|
|
|
365
438
|
return obj
|
|
366
439
|
}
|
|
367
440
|
|
|
441
|
+
_openDriverSelector() {
|
|
442
|
+
openPopup(
|
|
443
|
+
html`
|
|
444
|
+
<driver-selector-popup
|
|
445
|
+
@selected="${e => {
|
|
446
|
+
this.selectedDriverID = e.detail.id
|
|
447
|
+
this.selectedDriverName = `${e.detail.name} (${e.detail.idNumber})`
|
|
448
|
+
}}"
|
|
449
|
+
></driver-selector-popup>
|
|
450
|
+
`,
|
|
451
|
+
{
|
|
452
|
+
backdrop: true,
|
|
453
|
+
size: 'large',
|
|
454
|
+
title: i18next.t('title.select_driver')
|
|
455
|
+
}
|
|
456
|
+
)
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
_openMillSelector() {
|
|
460
|
+
openPopup(
|
|
461
|
+
html`
|
|
462
|
+
<mill-selector-popup
|
|
463
|
+
@selected="${e => {
|
|
464
|
+
this.selectedMillID = e.detail.id
|
|
465
|
+
this.selectedMillName = `${e.detail.name}`
|
|
466
|
+
}}"
|
|
467
|
+
></mill-selector-popup>
|
|
468
|
+
`,
|
|
469
|
+
{
|
|
470
|
+
backdrop: true,
|
|
471
|
+
size: 'large',
|
|
472
|
+
title: i18next.t('title.select_destination')
|
|
473
|
+
}
|
|
474
|
+
)
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
_openTruckSelector() {
|
|
478
|
+
openPopup(
|
|
479
|
+
html`
|
|
480
|
+
<truck-selector-popup
|
|
481
|
+
@selected="${e => {
|
|
482
|
+
this.selectedTruckID = e.detail.id
|
|
483
|
+
this.selectedTruckName = `${e.detail.name}`
|
|
484
|
+
}}"
|
|
485
|
+
></truck-selector-popup>
|
|
486
|
+
`,
|
|
487
|
+
{
|
|
488
|
+
backdrop: true,
|
|
489
|
+
size: 'large',
|
|
490
|
+
title: i18next.t('title.select_lorry')
|
|
491
|
+
}
|
|
492
|
+
)
|
|
493
|
+
}
|
|
494
|
+
|
|
368
495
|
_showToast({ type, message }) {
|
|
369
496
|
document.dispatchEvent(
|
|
370
497
|
new CustomEvent('notify', {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
|
+
|
|
4
|
+
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html } from 'lit-element'
|
|
6
|
+
|
|
3
7
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
8
|
import { client, navigate, PageView } from '@things-factory/shell'
|
|
5
9
|
import { ScrollbarStyles } from '@things-factory/styles'
|
|
6
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
7
|
-
import gql from 'graphql-tag'
|
|
8
|
-
import { css, html } from 'lit-element'
|
|
9
11
|
|
|
10
12
|
class DispatchmentList extends localize(i18next)(PageView) {
|
|
11
13
|
static get properties() {
|
|
@@ -73,18 +75,12 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
73
75
|
name: 'dispatchAt',
|
|
74
76
|
type: 'date',
|
|
75
77
|
props: { searchOper: 'eq' }
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
label: i18next.t('field.truck_no'),
|
|
79
|
-
name: 'transportNo',
|
|
80
|
-
type: 'string',
|
|
81
|
-
props: { searchOper: 'i_like' }
|
|
82
78
|
}
|
|
83
79
|
]
|
|
84
80
|
|
|
85
81
|
this.config = {
|
|
86
82
|
list: {
|
|
87
|
-
fields: ['dispatchAt', 'totalTonnageRelease', 'transportNo', '
|
|
83
|
+
fields: ['dispatchAt', 'totalTonnageRelease', 'driver', 'transportNo', 'dispatchTo', 'updatedAt', 'updater']
|
|
88
84
|
},
|
|
89
85
|
rows: { appendable: false, selectable: { multiple: true } },
|
|
90
86
|
columns: [
|
|
@@ -104,6 +100,7 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
104
100
|
name: 'dispatchAt',
|
|
105
101
|
header: i18next.t('field.dispatchment_date'),
|
|
106
102
|
sortable: true,
|
|
103
|
+
label: true,
|
|
107
104
|
width: 150
|
|
108
105
|
},
|
|
109
106
|
{
|
|
@@ -111,13 +108,15 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
111
108
|
name: 'totalTonnageRelease',
|
|
112
109
|
header: i18next.t('field.total_tonnage_release'),
|
|
113
110
|
sortable: true,
|
|
111
|
+
label: true,
|
|
114
112
|
width: 150
|
|
115
113
|
},
|
|
116
114
|
{
|
|
117
|
-
type: '
|
|
118
|
-
name: '
|
|
115
|
+
type: 'object',
|
|
116
|
+
name: 'driver',
|
|
119
117
|
header: i18next.t('field.transport_driver'),
|
|
120
118
|
sortable: true,
|
|
119
|
+
label: true,
|
|
121
120
|
width: 150
|
|
122
121
|
},
|
|
123
122
|
{
|
|
@@ -125,22 +124,31 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
125
124
|
name: 'transportNo',
|
|
126
125
|
header: i18next.t('field.truck_no'),
|
|
127
126
|
sortable: true,
|
|
127
|
+
label: true,
|
|
128
|
+
width: 150
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
type: 'object',
|
|
132
|
+
name: 'dispatchTo',
|
|
133
|
+
header: i18next.t('field.destination'),
|
|
134
|
+
sortable: true,
|
|
135
|
+
label: true,
|
|
128
136
|
width: 150
|
|
129
137
|
},
|
|
130
138
|
{
|
|
131
139
|
type: 'datetime',
|
|
132
140
|
name: 'updatedAt',
|
|
133
141
|
header: i18next.t('field.updated_at'),
|
|
134
|
-
record: { align: 'left' },
|
|
135
142
|
sortable: true,
|
|
143
|
+
label: true,
|
|
136
144
|
width: 160
|
|
137
145
|
},
|
|
138
146
|
{
|
|
139
147
|
type: 'object',
|
|
140
148
|
name: 'updater',
|
|
141
149
|
header: i18next.t('field.updater'),
|
|
142
|
-
record: { align: 'left' },
|
|
143
150
|
sortable: true,
|
|
151
|
+
label: true,
|
|
144
152
|
width: 200
|
|
145
153
|
}
|
|
146
154
|
]
|
|
@@ -172,14 +180,17 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
172
180
|
id
|
|
173
181
|
name
|
|
174
182
|
dispatchAt
|
|
175
|
-
dispatchTo
|
|
183
|
+
dispatchTo {
|
|
184
|
+
id
|
|
185
|
+
name
|
|
186
|
+
description
|
|
187
|
+
}
|
|
176
188
|
transportNo
|
|
177
189
|
driver {
|
|
178
190
|
id
|
|
179
191
|
name
|
|
180
192
|
description
|
|
181
193
|
}
|
|
182
|
-
externalDriver
|
|
183
194
|
totalTonnageRelease
|
|
184
195
|
deletedAt
|
|
185
196
|
createdAt
|
|
@@ -210,25 +221,6 @@ class DispatchmentList extends localize(i18next)(PageView) {
|
|
|
210
221
|
}
|
|
211
222
|
}
|
|
212
223
|
|
|
213
|
-
_compareValues(key, order = 'asc') {
|
|
214
|
-
return function innerSort(a, b) {
|
|
215
|
-
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) {
|
|
216
|
-
return 0
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
const varA = typeof a[key] === 'string' ? a[key].toUpperCase() : a[key]
|
|
220
|
-
const varB = typeof b[key] === 'string' ? b[key].toUpperCase() : b[key]
|
|
221
|
-
|
|
222
|
-
let comparison = 0
|
|
223
|
-
if (varA > varB) {
|
|
224
|
-
comparison = 1
|
|
225
|
-
} else if (varA < varB) {
|
|
226
|
-
comparison = -1
|
|
227
|
-
}
|
|
228
|
-
return order === 'desc' ? comparison * -1 : comparison
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
224
|
_exportableData() {
|
|
233
225
|
return this.dataGrist.exportRecords()
|
|
234
226
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
2
1
|
import '@things-factory/grist-ui'
|
|
2
|
+
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html } from 'lit-element'
|
|
5
|
+
|
|
6
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
7
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
8
|
import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
|
|
5
9
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
6
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
7
|
-
|
|
8
|
-
import { css, html } from 'lit-element'
|
|
11
|
+
|
|
9
12
|
import { RECORD_STATUS } from '../constants'
|
|
10
13
|
|
|
11
14
|
class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
@@ -95,7 +98,7 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
return {
|
|
98
|
-
title: i18next.t('title.
|
|
101
|
+
title: i18next.t('title.harvesting_contractors_daily_harvesting_record'),
|
|
99
102
|
actions
|
|
100
103
|
}
|
|
101
104
|
}
|
|
@@ -105,7 +108,7 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
105
108
|
<form name="dailyHarvest" class="multi-column-form" autocomplete="off">
|
|
106
109
|
<fieldset>
|
|
107
110
|
<legend>${i18next.t('title.harvest_no')}: ${this._harvestNo}</legend>
|
|
108
|
-
<label>${i18next.t('label.
|
|
111
|
+
<label>${i18next.t('label.date')}</label>
|
|
109
112
|
<input type="date" name="harvestDate" readonly />
|
|
110
113
|
|
|
111
114
|
<label>${i18next.t('label.block')}</label>
|
|
@@ -114,13 +117,22 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
114
117
|
<label>${i18next.t('label.harvesting_round')}</label>
|
|
115
118
|
<input type="number" name="harvestingRound" readonly />
|
|
116
119
|
|
|
117
|
-
<label>${i18next.t('label.
|
|
120
|
+
<label>${i18next.t('label.total_task_covered')}</label>
|
|
118
121
|
<input type="number" name="coverage" readonly />
|
|
119
122
|
</fieldset>
|
|
120
123
|
<fieldset>
|
|
121
|
-
<legend>${i18next.t('title.
|
|
122
|
-
<label>${i18next.t('label.
|
|
124
|
+
<legend>${i18next.t('title.summary')}</legend>
|
|
125
|
+
<label>${i18next.t('label.yesterday_balance_in_field')}</label>
|
|
126
|
+
<input type="number" name="yesterdayBalanceBunchInField" readonly />
|
|
127
|
+
|
|
128
|
+
<label>${i18next.t('label.harvested_today')}</label>
|
|
123
129
|
<input type="number" name="totalBunchHarvested" readonly />
|
|
130
|
+
|
|
131
|
+
<label>${i18next.t('label.collected_today')}</label>
|
|
132
|
+
<input type="number" name="collectedBunch" readonly />
|
|
133
|
+
|
|
134
|
+
<label>${i18next.t('label.total_number_of_bunches')}</label>
|
|
135
|
+
<input type="number" name="balanceBunchInField" readonly />
|
|
124
136
|
</fieldset>
|
|
125
137
|
</form>
|
|
126
138
|
|
|
@@ -156,7 +168,7 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
156
168
|
this.harvestGristConfig = {
|
|
157
169
|
pagination: { infinite: true },
|
|
158
170
|
list: {
|
|
159
|
-
fields: ['organizationStaff', 'totalBunchHarvested', 'remark']
|
|
171
|
+
fields: ['organizationStaff', 'organizationName', 'totalTonnageHarvested', 'totalBunchHarvested', 'remark']
|
|
160
172
|
},
|
|
161
173
|
rows: { appendable: false },
|
|
162
174
|
columns: [
|
|
@@ -165,18 +177,35 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
165
177
|
type: 'string',
|
|
166
178
|
name: 'staffName',
|
|
167
179
|
header: i18next.t('field.task_no'),
|
|
180
|
+
label: true,
|
|
181
|
+
width: 300
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'string',
|
|
185
|
+
name: 'organizationName',
|
|
186
|
+
header: i18next.t('field.contractor'),
|
|
187
|
+
label: true,
|
|
168
188
|
width: 300
|
|
169
189
|
},
|
|
170
190
|
{
|
|
171
191
|
type: 'float',
|
|
172
192
|
name: 'totalBunchHarvested',
|
|
173
193
|
header: i18next.t('field.total_no_of_bunches'),
|
|
194
|
+
label: true,
|
|
195
|
+
width: 150
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'float',
|
|
199
|
+
name: 'totalTonnageHarvested',
|
|
200
|
+
header: i18next.t('field.total_tonnage_harvested'),
|
|
201
|
+
label: true,
|
|
174
202
|
width: 150
|
|
175
203
|
},
|
|
176
204
|
{
|
|
177
205
|
type: 'string',
|
|
178
206
|
name: 'remark',
|
|
179
207
|
header: i18next.t('field.remarks'),
|
|
208
|
+
label: true,
|
|
180
209
|
width: 300
|
|
181
210
|
}
|
|
182
211
|
]
|
|
@@ -192,13 +221,7 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
192
221
|
}
|
|
193
222
|
|
|
194
223
|
async _fetchHarvestRecord() {
|
|
195
|
-
if (!this._harvestNo)
|
|
196
|
-
CustomAlert({
|
|
197
|
-
title: i18next.t('text.no_records'),
|
|
198
|
-
text: i18next.t('text.unable_to_find_harvest_record')
|
|
199
|
-
})
|
|
200
|
-
}
|
|
201
|
-
|
|
224
|
+
if (!this._harvestNo) return
|
|
202
225
|
const response = await client.query({
|
|
203
226
|
query: gql`
|
|
204
227
|
query dailyHarvest($name: String!) {
|
|
@@ -211,16 +234,24 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
211
234
|
}
|
|
212
235
|
harvestDate
|
|
213
236
|
totalBunchHarvested
|
|
237
|
+
yesterdayBalanceBunchInField
|
|
238
|
+
balanceBunchInField
|
|
239
|
+
collectedBunch
|
|
214
240
|
coverage
|
|
215
241
|
rainfall
|
|
216
242
|
harvestingRound
|
|
217
243
|
status
|
|
218
244
|
dailyHarvestDetails {
|
|
219
245
|
totalBunchHarvested
|
|
246
|
+
totalTonnageHarvested
|
|
220
247
|
remark
|
|
221
248
|
organizationStaff {
|
|
222
249
|
id
|
|
223
250
|
name
|
|
251
|
+
organization {
|
|
252
|
+
id
|
|
253
|
+
name
|
|
254
|
+
}
|
|
224
255
|
}
|
|
225
256
|
}
|
|
226
257
|
}
|
|
@@ -232,13 +263,19 @@ class DailyHarvestingDetail extends localize(i18next)(PageView) {
|
|
|
232
263
|
if (!response.errors) {
|
|
233
264
|
const dailyHarvest = response.data.dailyHarvest
|
|
234
265
|
const dailyHarvestDetails = dailyHarvest.dailyHarvestDetails
|
|
235
|
-
|
|
266
|
+
|
|
267
|
+
this._fillupHarvestForm({
|
|
268
|
+
...dailyHarvest,
|
|
269
|
+
blockName: dailyHarvest.block.name
|
|
270
|
+
})
|
|
271
|
+
|
|
236
272
|
this._status = dailyHarvest.status
|
|
237
273
|
this.harvestData = {
|
|
238
274
|
records: dailyHarvestDetails.map(detail => {
|
|
239
275
|
return {
|
|
240
276
|
...detail,
|
|
241
|
-
staffName: detail.organizationStaff && detail.organizationStaff.name
|
|
277
|
+
staffName: detail.organizationStaff && detail.organizationStaff.name,
|
|
278
|
+
organizationName: detail.organizationStaff.organization && detail.organizationStaff.organization.name
|
|
242
279
|
}
|
|
243
280
|
})
|
|
244
281
|
}
|