@things-factory/operato-pms 6.1.83 → 6.1.85
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/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -34
- package/server/constants/block.ts +0 -4
- package/server/constants/index.ts +0 -8
- package/server/constants/inventory.ts +0 -9
- package/server/constants/master.ts +0 -9
- package/server/constants/organization.ts +0 -5
- package/server/constants/ramp.ts +0 -9
- package/server/constants/record.ts +0 -4
- package/server/constants/template.ts +0 -3
- package/server/constants/transaction.ts +0 -9
- package/server/controllers/index.ts +0 -1
- package/server/controllers/render-dispatchment.ts +0 -53
- package/server/entities/block-detail.ts +0 -59
- package/server/entities/block.ts +0 -49
- package/server/entities/daily-block-detail.ts +0 -54
- package/server/entities/daily-dispatch-detail.ts +0 -64
- package/server/entities/daily-dispatch.ts +0 -90
- package/server/entities/daily-harvest-detail.ts +0 -56
- package/server/entities/daily-harvest.ts +0 -89
- package/server/entities/daily-loading-detail.ts +0 -68
- package/server/entities/daily-loading-ramp.ts +0 -56
- package/server/entities/daily-loading.ts +0 -70
- package/server/entities/index.ts +0 -57
- package/server/entities/organization-staff.ts +0 -60
- package/server/entities/organization.ts +0 -43
- package/server/entities/plantation-inventory.ts +0 -56
- package/server/entities/plantation-setting.ts +0 -60
- package/server/entities/ramp.ts +0 -47
- package/server/entities/record-transaction.ts +0 -76
- package/server/entities/truck.ts +0 -58
- package/server/graphql/index.ts +0 -9
- package/server/graphql/resolvers/block/block-query.ts +0 -36
- package/server/graphql/resolvers/block/delete-blocks.ts +0 -39
- package/server/graphql/resolvers/block/index.ts +0 -11
- package/server/graphql/resolvers/block/update-multiple-block.ts +0 -69
- package/server/graphql/resolvers/block-detail/block-detail-query.ts +0 -55
- package/server/graphql/resolvers/block-detail/delete-block-details.ts +0 -20
- package/server/graphql/resolvers/block-detail/index.ts +0 -12
- package/server/graphql/resolvers/block-detail/update-multiple-block-detail.ts +0 -55
- package/server/graphql/resolvers/daily-block-detail/create-daily-block-detail.ts +0 -14
- package/server/graphql/resolvers/daily-block-detail/daily-block-detail-query.ts +0 -36
- package/server/graphql/resolvers/daily-block-detail/delete-daily-block-detail.ts +0 -14
- package/server/graphql/resolvers/daily-block-detail/delete-daily-block-details.ts +0 -17
- package/server/graphql/resolvers/daily-block-detail/index.ts +0 -18
- package/server/graphql/resolvers/daily-block-detail/update-daily-block-detail.ts +0 -17
- package/server/graphql/resolvers/daily-block-detail/update-multiple-daily-block-detail.ts +0 -44
- package/server/graphql/resolvers/daily-dispatch/daily-dispatch-query.ts +0 -48
- package/server/graphql/resolvers/daily-dispatch/delete-daily-dispatch.ts +0 -34
- package/server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.ts +0 -131
- package/server/graphql/resolvers/daily-dispatch/index.ts +0 -14
- package/server/graphql/resolvers/daily-dispatch/update-daily-dispatch.ts +0 -36
- package/server/graphql/resolvers/daily-dispatch-detail/daily-dispatch-detail-query.ts +0 -37
- package/server/graphql/resolvers/daily-dispatch-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-harvest/daily-harvest-query.ts +0 -46
- package/server/graphql/resolvers/daily-harvest/delete-daily-harvest.ts +0 -65
- package/server/graphql/resolvers/daily-harvest/generate-daily-harvest.ts +0 -205
- package/server/graphql/resolvers/daily-harvest/index.ts +0 -14
- package/server/graphql/resolvers/daily-harvest/update-daily-harvest.ts +0 -153
- package/server/graphql/resolvers/daily-harvest-detail/daily-harvest-detail-query.ts +0 -35
- package/server/graphql/resolvers/daily-harvest-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-loading/daily-loading-query.ts +0 -43
- package/server/graphql/resolvers/daily-loading/delete-daily-loading.ts +0 -38
- package/server/graphql/resolvers/daily-loading/generate-daily-loading.ts +0 -149
- package/server/graphql/resolvers/daily-loading/index.ts +0 -14
- package/server/graphql/resolvers/daily-loading/update-daily-loading.ts +0 -154
- package/server/graphql/resolvers/daily-loading-detail/daily-loading-detail-query.ts +0 -35
- package/server/graphql/resolvers/daily-loading-detail/index.ts +0 -6
- package/server/graphql/resolvers/daily-loading-ramp/daily-loading-ramp-query.ts +0 -34
- package/server/graphql/resolvers/daily-loading-ramp/delete-daily-loading-ramp.ts +0 -15
- package/server/graphql/resolvers/daily-loading-ramp/index.ts +0 -12
- package/server/graphql/resolvers/daily-loading-ramp/update-daily-loading-ramp.ts +0 -18
- package/server/graphql/resolvers/dashboard/dashboard-query.ts +0 -245
- package/server/graphql/resolvers/dashboard/index.ts +0 -5
- package/server/graphql/resolvers/index.ts +0 -20
- package/server/graphql/resolvers/organization/delete-organizations.ts +0 -40
- package/server/graphql/resolvers/organization/index.ts +0 -11
- package/server/graphql/resolvers/organization/organization-query.ts +0 -35
- package/server/graphql/resolvers/organization/update-multiple-organization.ts +0 -48
- package/server/graphql/resolvers/organization-staff/delete-organization-staffs.ts +0 -20
- package/server/graphql/resolvers/organization-staff/index.ts +0 -12
- package/server/graphql/resolvers/organization-staff/organization-staff-query.ts +0 -43
- package/server/graphql/resolvers/organization-staff/update-multiple-organization-staff.ts +0 -60
- package/server/graphql/resolvers/plantation-inventory/index.ts +0 -6
- package/server/graphql/resolvers/plantation-inventory/plantation-inventory-query.ts +0 -43
- package/server/graphql/resolvers/plantation-setting/create-plantation-setting.ts +0 -16
- package/server/graphql/resolvers/plantation-setting/delete-plantation-setting.ts +0 -13
- package/server/graphql/resolvers/plantation-setting/delete-plantation-settings.ts +0 -18
- package/server/graphql/resolvers/plantation-setting/index.ts +0 -19
- package/server/graphql/resolvers/plantation-setting/plantation-setting-query.ts +0 -38
- package/server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.ts +0 -46
- package/server/graphql/resolvers/plantation-setting/update-plantation-setting.ts +0 -20
- package/server/graphql/resolvers/ramp/delete-ramps.ts +0 -24
- package/server/graphql/resolvers/ramp/index.ts +0 -12
- package/server/graphql/resolvers/ramp/ramp-query.ts +0 -34
- package/server/graphql/resolvers/ramp/update-multiple-ramp.ts +0 -61
- package/server/graphql/resolvers/record-transaction/index.ts +0 -6
- package/server/graphql/resolvers/record-transaction/record-transaction-query.ts +0 -34
- package/server/graphql/resolvers/report/daily-ffb-dispatch-production-reports.ts +0 -149
- package/server/graphql/resolvers/report/daily-production-reports.ts +0 -167
- package/server/graphql/resolvers/report/daily-staff-harvest-reports.ts +0 -84
- package/server/graphql/resolvers/report/index.ts +0 -22
- package/server/graphql/resolvers/report/monthly-block-dispatch-reports.ts +0 -122
- package/server/graphql/resolvers/report/monthly-dispatch-summary-reports.ts +0 -114
- package/server/graphql/resolvers/report/monthly-ffb-sale-reports.ts +0 -111
- package/server/graphql/resolvers/report/monthly-production-reports.ts +0 -117
- package/server/graphql/resolvers/report/yearly-production-reports.ts +0 -101
- package/server/graphql/resolvers/truck/delete-trucks.ts +0 -21
- package/server/graphql/resolvers/truck/index.ts +0 -12
- package/server/graphql/resolvers/truck/truck-query.ts +0 -50
- package/server/graphql/resolvers/truck/update-multiple-truck.ts +0 -55
- package/server/graphql/types/block/block-list.ts +0 -8
- package/server/graphql/types/block/block-patch.ts +0 -13
- package/server/graphql/types/block/block.ts +0 -18
- package/server/graphql/types/block/index.ts +0 -18
- package/server/graphql/types/block/new-block.ts +0 -8
- package/server/graphql/types/block-detail/block-detail-list.ts +0 -8
- package/server/graphql/types/block-detail/block-detail-patch.ts +0 -16
- package/server/graphql/types/block-detail/block-detail.ts +0 -21
- package/server/graphql/types/block-detail/index.ts +0 -18
- package/server/graphql/types/block-detail/new-block-detail.ts +0 -13
- package/server/graphql/types/daily-block-detail/daily-block-detail-list.ts +0 -8
- package/server/graphql/types/daily-block-detail/daily-block-detail-patch.ts +0 -10
- package/server/graphql/types/daily-block-detail/daily-block-detail.ts +0 -18
- package/server/graphql/types/daily-block-detail/index.ts +0 -21
- package/server/graphql/types/daily-block-detail/new-daily-block-detail.ts +0 -8
- package/server/graphql/types/daily-dispatch/daily-dispatch-list.ts +0 -8
- package/server/graphql/types/daily-dispatch/daily-dispatch-patch.ts +0 -22
- package/server/graphql/types/daily-dispatch/daily-dispatch.ts +0 -27
- package/server/graphql/types/daily-dispatch/index.ts +0 -24
- package/server/graphql/types/daily-dispatch/new-daily-dispatch.ts +0 -20
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-list.ts +0 -8
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-patch.ts +0 -16
- package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail.ts +0 -21
- package/server/graphql/types/daily-dispatch-detail/index.ts +0 -14
- package/server/graphql/types/daily-dispatch-detail/new-daily-dispatch-detail.ts +0 -12
- package/server/graphql/types/daily-harvest/daily-harvest-list.ts +0 -8
- package/server/graphql/types/daily-harvest/daily-harvest-patch.ts +0 -17
- package/server/graphql/types/daily-harvest/daily-harvest.ts +0 -27
- package/server/graphql/types/daily-harvest/index.ts +0 -19
- package/server/graphql/types/daily-harvest/new-daily-harvest.ts +0 -15
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-list.ts +0 -8
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.ts +0 -11
- package/server/graphql/types/daily-harvest-detail/daily-harvest-detail.ts +0 -20
- package/server/graphql/types/daily-harvest-detail/index.ts +0 -14
- package/server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.ts +0 -10
- package/server/graphql/types/daily-loading/daily-loading-list.ts +0 -8
- package/server/graphql/types/daily-loading/daily-loading-patch.ts +0 -8
- package/server/graphql/types/daily-loading/daily-loading.ts +0 -21
- package/server/graphql/types/daily-loading/index.ts +0 -19
- package/server/graphql/types/daily-loading/new-daily-loading.ts +0 -8
- package/server/graphql/types/daily-loading-detail/daily-loading-detail-list.ts +0 -8
- package/server/graphql/types/daily-loading-detail/daily-loading-detail-patch.ts +0 -14
- package/server/graphql/types/daily-loading-detail/daily-loading-detail.ts +0 -23
- package/server/graphql/types/daily-loading-detail/index.ts +0 -14
- package/server/graphql/types/daily-loading-detail/new-daily-loading-detail.ts +0 -13
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-list.ts +0 -8
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-patch.ts +0 -13
- package/server/graphql/types/daily-loading-ramp/daily-loading-ramp.ts +0 -17
- package/server/graphql/types/daily-loading-ramp/index.ts +0 -18
- package/server/graphql/types/daily-loading-ramp/new-daily-loading-ramp.ts +0 -11
- package/server/graphql/types/dashboard/bunches-count.ts +0 -9
- package/server/graphql/types/dashboard/index.ts +0 -17
- package/server/graphql/types/dashboard/productions-overview.ts +0 -9
- package/server/graphql/types/dashboard/tonnage-bunches-inventories.ts +0 -8
- package/server/graphql/types/dashboard/tonnage-production.ts +0 -11
- package/server/graphql/types/dashboard/yield-production.ts +0 -11
- package/server/graphql/types/index.ts +0 -20
- package/server/graphql/types/organization/index.ts +0 -18
- package/server/graphql/types/organization/new-organization.ts +0 -9
- package/server/graphql/types/organization/organization-list.ts +0 -8
- package/server/graphql/types/organization/organization-patch.ts +0 -11
- package/server/graphql/types/organization/organization.ts +0 -16
- package/server/graphql/types/organization-staff/index.ts +0 -19
- package/server/graphql/types/organization-staff/new-organization-staff.ts +0 -8
- package/server/graphql/types/organization-staff/organization-staff-list.ts +0 -8
- package/server/graphql/types/organization-staff/organization-staff-patch.ts +0 -15
- package/server/graphql/types/organization-staff/organization-staff.ts +0 -21
- package/server/graphql/types/plantation-inventory/index.ts +0 -14
- package/server/graphql/types/plantation-inventory/new-plantation-inventory.ts +0 -8
- package/server/graphql/types/plantation-inventory/plantation-inventory-list.ts +0 -8
- package/server/graphql/types/plantation-inventory/plantation-inventory-patch.ts +0 -10
- package/server/graphql/types/plantation-inventory/plantation-inventory.ts +0 -22
- package/server/graphql/types/plantation-setting/index.ts +0 -21
- package/server/graphql/types/plantation-setting/new-plantation-setting.ts +0 -10
- package/server/graphql/types/plantation-setting/plantation-setting-list.ts +0 -8
- package/server/graphql/types/plantation-setting/plantation-setting-patch.ts +0 -12
- package/server/graphql/types/plantation-setting/plantation-setting.ts +0 -16
- package/server/graphql/types/ramp/index.ts +0 -18
- package/server/graphql/types/ramp/new-ramp.ts +0 -8
- package/server/graphql/types/ramp/ramp-list.ts +0 -8
- package/server/graphql/types/ramp/ramp-patch.ts +0 -12
- package/server/graphql/types/ramp/ramp.ts +0 -17
- package/server/graphql/types/record-transaction/index.ts +0 -14
- package/server/graphql/types/record-transaction/new-record-transaction.ts +0 -8
- package/server/graphql/types/record-transaction/record-transaction-list.ts +0 -8
- package/server/graphql/types/record-transaction/record-transaction-patch.ts +0 -10
- package/server/graphql/types/record-transaction/record-transaction.ts +0 -24
- package/server/graphql/types/report/daily-ffb-dispatch-production-report-list.ts +0 -8
- package/server/graphql/types/report/daily-ffb-dispatch-production-report.ts +0 -9
- package/server/graphql/types/report/daily-production-report-list.ts +0 -8
- package/server/graphql/types/report/daily-production-report.ts +0 -23
- package/server/graphql/types/report/daily-staff-harvest-report-list.ts +0 -8
- package/server/graphql/types/report/daily-staff-harvest-report.ts +0 -10
- package/server/graphql/types/report/index.ts +0 -62
- package/server/graphql/types/report/monthly-block-dispatch-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-block-dispatch-report.ts +0 -13
- package/server/graphql/types/report/monthly-dispatch-summary-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-dispatch-summary-report.ts +0 -19
- package/server/graphql/types/report/monthly-ffb-sale-report-list.ts +0 -7
- package/server/graphql/types/report/monthly-ffb-sale-report.ts +0 -18
- package/server/graphql/types/report/monthly-production-report-list.ts +0 -8
- package/server/graphql/types/report/monthly-production-report.ts +0 -25
- package/server/graphql/types/report/yearly-production-report-list.ts +0 -8
- package/server/graphql/types/report/yearly-production-report.ts +0 -18
- package/server/graphql/types/truck/index.ts +0 -18
- package/server/graphql/types/truck/new-truck.ts +0 -8
- package/server/graphql/types/truck/truck-list.ts +0 -8
- package/server/graphql/types/truck/truck-patch.ts +0 -11
- package/server/graphql/types/truck/truck.ts +0 -16
- package/server/index.ts +0 -6
- package/server/middlewares/index.ts +0 -3
- package/server/migrations/index.ts +0 -9
- package/server/routes.ts +0 -7
- package/server/utils/core-values.ts +0 -98
- package/server/utils/datetime-util.ts +0 -39
- package/server/utils/index.ts +0 -4
- package/server/utils/no-generator.ts +0 -64
- package/server/utils/transaction-util.ts +0 -101
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const PlantationSetting = gql`
|
|
4
|
-
type PlantationSetting {
|
|
5
|
-
id: String
|
|
6
|
-
name: String
|
|
7
|
-
domain: Domain
|
|
8
|
-
description: String
|
|
9
|
-
category: String
|
|
10
|
-
value: String
|
|
11
|
-
updater: User
|
|
12
|
-
creator: User
|
|
13
|
-
updatedAt: String
|
|
14
|
-
createdAt: String
|
|
15
|
-
}
|
|
16
|
-
`
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export * from './ramp'
|
|
4
|
-
export * from './ramp-list'
|
|
5
|
-
export * from './ramp-patch'
|
|
6
|
-
export * from './new-ramp'
|
|
7
|
-
|
|
8
|
-
export const RampResolver = gql`
|
|
9
|
-
extend type Mutation {
|
|
10
|
-
updateMultipleRamp(patches: [RampPatch]!): [Ramp] @transaction
|
|
11
|
-
deleteRamps(ids: [String]!): Boolean @transaction
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
extend type Query {
|
|
15
|
-
ramps(filters: [Filter], pagination: Pagination, sortings: [Sorting]): RampList @transaction
|
|
16
|
-
ramp(name: String!): Ramp @transaction
|
|
17
|
-
}
|
|
18
|
-
`
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const Ramp = gql`
|
|
4
|
-
type Ramp {
|
|
5
|
-
id: String
|
|
6
|
-
name: String
|
|
7
|
-
domain: Domain
|
|
8
|
-
description: String
|
|
9
|
-
status: String
|
|
10
|
-
block: Block
|
|
11
|
-
deletedAt: String
|
|
12
|
-
updater: User
|
|
13
|
-
creator: User
|
|
14
|
-
updatedAt: String
|
|
15
|
-
createdAt: String
|
|
16
|
-
}
|
|
17
|
-
`
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export * from './record-transaction'
|
|
4
|
-
export * from './record-transaction-list'
|
|
5
|
-
export * from './record-transaction-patch'
|
|
6
|
-
export * from './new-record-transaction'
|
|
7
|
-
|
|
8
|
-
export const RecordTransactionResolver = gql`
|
|
9
|
-
extend type Query {
|
|
10
|
-
recordTransactions(filters: [Filter], pagination: Pagination, sortings: [Sorting]): RecordTransactionList
|
|
11
|
-
@transaction
|
|
12
|
-
recordTransaction(name: String!): RecordTransaction @transaction
|
|
13
|
-
}
|
|
14
|
-
`
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const RecordTransaction = gql`
|
|
4
|
-
type RecordTransaction {
|
|
5
|
-
id: String
|
|
6
|
-
name: String
|
|
7
|
-
domain: Domain
|
|
8
|
-
plantationInventory: PlantationInventory
|
|
9
|
-
description: String
|
|
10
|
-
block: Block
|
|
11
|
-
ramp: Ramp
|
|
12
|
-
transactionType: String
|
|
13
|
-
transactionDate: String
|
|
14
|
-
refActionId: String
|
|
15
|
-
refRecordNo: String
|
|
16
|
-
fieldBunches: Float
|
|
17
|
-
rampWeight: Float
|
|
18
|
-
deletedAt: String
|
|
19
|
-
updater: User
|
|
20
|
-
creator: User
|
|
21
|
-
updatedAt: String
|
|
22
|
-
createdAt: String
|
|
23
|
-
}
|
|
24
|
-
`
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const DailyProductionReport = gql`
|
|
4
|
-
type DailyProductionReport {
|
|
5
|
-
date: String
|
|
6
|
-
prevBunchBalInField: String
|
|
7
|
-
prevWeightBalInRamp: String
|
|
8
|
-
todayBunchHarvest: String
|
|
9
|
-
toDateBunchHarvest: String
|
|
10
|
-
todayBunchInField: String
|
|
11
|
-
todayBunchCollected: String
|
|
12
|
-
todayBunchBalInField: String
|
|
13
|
-
todayWeightDispatch: String
|
|
14
|
-
toDateWeightDispatch: String
|
|
15
|
-
todayOutTurn: String
|
|
16
|
-
toDateOutTurn: String
|
|
17
|
-
block: String
|
|
18
|
-
todayHarvestingRound: String
|
|
19
|
-
todayHectareCover: String
|
|
20
|
-
todayWeightBalInRamp: String
|
|
21
|
-
diffInBunches: String
|
|
22
|
-
}
|
|
23
|
-
`
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export * from './daily-production-report-list'
|
|
4
|
-
export * from './daily-production-report'
|
|
5
|
-
export * from './daily-staff-harvest-report-list'
|
|
6
|
-
export * from './daily-staff-harvest-report'
|
|
7
|
-
export * from './monthly-block-dispatch-report-list'
|
|
8
|
-
export * from './monthly-block-dispatch-report'
|
|
9
|
-
export * from './monthly-dispatch-summary-report-list'
|
|
10
|
-
export * from './monthly-dispatch-summary-report'
|
|
11
|
-
export * from './monthly-production-report-list'
|
|
12
|
-
export * from './monthly-production-report'
|
|
13
|
-
export * from './yearly-production-report-list'
|
|
14
|
-
export * from './yearly-production-report'
|
|
15
|
-
export * from './daily-ffb-dispatch-production-report'
|
|
16
|
-
export * from './daily-ffb-dispatch-production-report-list'
|
|
17
|
-
|
|
18
|
-
export const ReportResolver = gql`
|
|
19
|
-
extend type Query {
|
|
20
|
-
dailyProductionReports(filters: [Filter], pagination: Pagination, sortings: [Sorting]): DailyProductionReportList
|
|
21
|
-
@transaction
|
|
22
|
-
|
|
23
|
-
monthlyProductionReports(
|
|
24
|
-
filters: [Filter]
|
|
25
|
-
pagination: Pagination
|
|
26
|
-
sortings: [Sorting]
|
|
27
|
-
): MonthlyProductionReportList @transaction
|
|
28
|
-
|
|
29
|
-
yearlyProductionReports(filters: [Filter], pagination: Pagination, sortings: [Sorting]): YearlyProductionReportList
|
|
30
|
-
@transaction
|
|
31
|
-
dailyStaffHarvestReports(
|
|
32
|
-
filters: [Filter]
|
|
33
|
-
pagination: Pagination
|
|
34
|
-
sortings: [Sorting]
|
|
35
|
-
): DailyStaffHarvestReportList @transaction
|
|
36
|
-
|
|
37
|
-
monthlyDispatchSummaryReports(
|
|
38
|
-
filters: [Filter],
|
|
39
|
-
pagination: Pagination,
|
|
40
|
-
sortings: [Sorting]
|
|
41
|
-
): MonthlyDispatchSummaryReportList @transaction
|
|
42
|
-
|
|
43
|
-
monthlyBlockDispatchReports(
|
|
44
|
-
filters: [Filter],
|
|
45
|
-
pagination: Pagination,
|
|
46
|
-
sortings: [Sorting]
|
|
47
|
-
): MonthlyBlockDispatchReportList @transaction
|
|
48
|
-
|
|
49
|
-
monthlyFfbSaleReports(
|
|
50
|
-
filters: [Filter],
|
|
51
|
-
pagination: Pagination,
|
|
52
|
-
sortings: [Sorting]
|
|
53
|
-
): MonthlyDispatchSummaryReportList @transaction
|
|
54
|
-
|
|
55
|
-
dailyFfbDispatchProductionReports(
|
|
56
|
-
filters: [Filter],
|
|
57
|
-
pagination: Pagination,
|
|
58
|
-
sortings: [Sorting]
|
|
59
|
-
): DailyFfbDispatchProductionReportList @transaction
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
`
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const MonthlyDispatchSummaryReport = gql`
|
|
4
|
-
type MonthlyDispatchSummaryReport {
|
|
5
|
-
no: Int
|
|
6
|
-
id: String
|
|
7
|
-
dispatchAt: String
|
|
8
|
-
driverIdentification: String
|
|
9
|
-
chitNo: String
|
|
10
|
-
percentage: String
|
|
11
|
-
lorryNo: String
|
|
12
|
-
dispatchTo: String
|
|
13
|
-
tonnage: String
|
|
14
|
-
todayAvg: String
|
|
15
|
-
todateAvg: String
|
|
16
|
-
today: String
|
|
17
|
-
todate: String
|
|
18
|
-
}
|
|
19
|
-
`
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const MonthlyFfbSaleReport = gql`
|
|
4
|
-
type MonthlyFfbSaleReport {
|
|
5
|
-
id: String
|
|
6
|
-
dispatchAt: String
|
|
7
|
-
lorryNo: String
|
|
8
|
-
driverIdentification: String
|
|
9
|
-
chitNo: String
|
|
10
|
-
percentage: String
|
|
11
|
-
dispatchTo: String
|
|
12
|
-
tonnage: String
|
|
13
|
-
todayAvg: String
|
|
14
|
-
todateAvg: String
|
|
15
|
-
today: String
|
|
16
|
-
todate: String
|
|
17
|
-
}
|
|
18
|
-
`
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const MonthlyProductionReport = gql`
|
|
4
|
-
type MonthlyProductionReport {
|
|
5
|
-
block: String
|
|
6
|
-
totalHarvester: String
|
|
7
|
-
totalOutTurn: String
|
|
8
|
-
daysWorked: String
|
|
9
|
-
avgOutTurn: String
|
|
10
|
-
totalBunchHarvested: String
|
|
11
|
-
production: String
|
|
12
|
-
bunchesPerTon: String
|
|
13
|
-
bunchesWt: String
|
|
14
|
-
bunchesPerHectar: String
|
|
15
|
-
harvestingRd: String
|
|
16
|
-
productivities: String
|
|
17
|
-
hectarage: String
|
|
18
|
-
yieldPerHectar: String
|
|
19
|
-
coveragePerDay: String
|
|
20
|
-
rainfall: String
|
|
21
|
-
bunchesPerPalm: String
|
|
22
|
-
yearPlanted: String
|
|
23
|
-
totalStand: String
|
|
24
|
-
}
|
|
25
|
-
`
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const YearlyProductionReport = gql`
|
|
4
|
-
type YearlyProductionReport {
|
|
5
|
-
block: String
|
|
6
|
-
yearPlanted: String
|
|
7
|
-
estimatedLastFfb: String
|
|
8
|
-
totalLastFfb: String
|
|
9
|
-
estimatedFfb: String
|
|
10
|
-
totalFfb: String
|
|
11
|
-
lastYieldPerHectarage: String
|
|
12
|
-
yieldPerHectarage: String
|
|
13
|
-
maturedHectarage: String
|
|
14
|
-
totalCoverage: String
|
|
15
|
-
totalHarvestingRd: String
|
|
16
|
-
actualAgainstLast: String
|
|
17
|
-
}
|
|
18
|
-
`
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export * from './truck'
|
|
4
|
-
export * from './new-truck'
|
|
5
|
-
export * from './truck-patch'
|
|
6
|
-
export * from './truck-list'
|
|
7
|
-
|
|
8
|
-
export const TruckResolver = gql`
|
|
9
|
-
extend type Mutation {
|
|
10
|
-
updateMultipleTruck(patches: [TruckPatch]!): [Truck] @transaction
|
|
11
|
-
deleteTrucks(ids: [String]!): Boolean @transaction
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
extend type Query {
|
|
15
|
-
trucks(filters: [Filter], pagination: Pagination, sortings: [Sorting]): TruckList @transaction
|
|
16
|
-
truck(name: String!): Truck @transaction
|
|
17
|
-
}
|
|
18
|
-
`
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import gql from 'graphql-tag'
|
|
2
|
-
|
|
3
|
-
export const Truck = gql`
|
|
4
|
-
type Truck {
|
|
5
|
-
id: String
|
|
6
|
-
name: String
|
|
7
|
-
domain: Domain
|
|
8
|
-
description: String
|
|
9
|
-
organization: Organization
|
|
10
|
-
deletedAt: String
|
|
11
|
-
updater: User
|
|
12
|
-
creator: User
|
|
13
|
-
updatedAt: String
|
|
14
|
-
createdAt: String
|
|
15
|
-
}
|
|
16
|
-
`
|
package/server/index.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const glob = require('glob')
|
|
2
|
-
const path = require('path')
|
|
3
|
-
|
|
4
|
-
export var migrations = []
|
|
5
|
-
|
|
6
|
-
glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
|
|
7
|
-
if (file.indexOf('index.js') !== -1) return
|
|
8
|
-
migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
|
|
9
|
-
})
|
package/server/routes.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { renderDispatchment } from './controllers'
|
|
2
|
-
|
|
3
|
-
process.on('bootstrap-module-domain-private-route' as any, (app, routes) => {
|
|
4
|
-
routes.get('/view_document_dispatch/:dispatchNo/:timezoneOffSet', async (context, next) => {
|
|
5
|
-
context.body = await renderDispatchment(context.params, context)
|
|
6
|
-
})
|
|
7
|
-
})
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { EntityManager } from 'typeorm'
|
|
2
|
-
import { Block } from '../entities'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @description Check whether inventory is same with passed conditions
|
|
6
|
-
* @param {Block} block
|
|
7
|
-
* @param {Date} date
|
|
8
|
-
* @param {EntityManager} trxMgr
|
|
9
|
-
*/
|
|
10
|
-
export async function getDailyBlockCalculatedValues(
|
|
11
|
-
block: Block,
|
|
12
|
-
date: Date,
|
|
13
|
-
trxMgr: EntityManager
|
|
14
|
-
): Promise<{ data?: object; errorMessage?: string }> {
|
|
15
|
-
try {
|
|
16
|
-
block = await trxMgr.getRepository(Block).findOneOrFail({ where: { id: block.id } })
|
|
17
|
-
|
|
18
|
-
let dateString = [
|
|
19
|
-
date.getFullYear().toString(),
|
|
20
|
-
String(date.getMonth() + 1).padStart(2, '0'),
|
|
21
|
-
String(date.getDate()).padStart(2, '0')
|
|
22
|
-
].join('-')
|
|
23
|
-
|
|
24
|
-
const result: any = await trxMgr.query(
|
|
25
|
-
`
|
|
26
|
-
select prev_bunch_bal_in_field,
|
|
27
|
-
coalesce(prev_weight_bal_in_ramp, 0) as prev_weight_bal_in_ramp,
|
|
28
|
-
coalesce(today_bunch_harvest, 0) as today_bunch_harvest,
|
|
29
|
-
coalesce(sum(today_bunch_harvest) over (order by transaction_date asc rows between unbounded preceding and current row), 0) as to_date_bunch_harvest,
|
|
30
|
-
coalesce(prev_bunch_bal_in_field, 0) + coalesce(today_bunch_harvest, 0) as today_bunch_in_field,
|
|
31
|
-
coalesce(today_bunch_collected, 0) as today_bunch_collected,
|
|
32
|
-
coalesce(prev_bunch_bal_in_field, 0) + coalesce(today_bunch_harvest, 0) - coalesce(today_bunch_collected, 0) as today_bunch_bal_in_field,
|
|
33
|
-
coalesce(today_weight_dispatch, 0) as today_weight_dispatch,
|
|
34
|
-
coalesce(sum(today_weight_dispatch) over (order by transaction_date asc rows between unbounded preceding and current row), 0) as to_date_weight_dispatch,
|
|
35
|
-
coalesce(today_out_turn, 0) as today_out_turn,
|
|
36
|
-
coalesce(sum(today_out_turn) over (order by transaction_date asc rows between unbounded preceding and current row), 0) as to_date_out_turn,
|
|
37
|
-
(select name from blocks b2 where id = $2) as block,
|
|
38
|
-
coalesce(today_harvesting_round, 0) as today_harvesting_round,
|
|
39
|
-
coalesce(today_hectare_cover, 0) as today_hectare_cover,
|
|
40
|
-
coalesce(today_weight_bal_in_ramp, 0) as today_weight_bal_in_ramp
|
|
41
|
-
from
|
|
42
|
-
(
|
|
43
|
-
select block_id, transaction_date,
|
|
44
|
-
(select opening_field_bunches from transactions dt where dt.block_id = trx.block_id and dt.seq = min(trx.seq)) as prev_bunch_bal_in_field,
|
|
45
|
-
0 as prev_weight_bal_in_ramp,
|
|
46
|
-
sum(case when transaction_type = 'HARVEST' OR transaction_type = 'BUNCHES_ADJUSTMENT' then field_bunches else 0 end) as today_bunch_harvest,
|
|
47
|
-
sum(case when transaction_type = 'LOADING' OR transaction_type = 'LOADING_ADJUSTMENT' then -field_bunches else 0 end) as today_bunch_collected,
|
|
48
|
-
0 as today_weight_dispatch,
|
|
49
|
-
0 as today_weight_bal_in_ramp,
|
|
50
|
-
(
|
|
51
|
-
select count(*) from daily_harvest_details dhd
|
|
52
|
-
inner join daily_harvests dh on dh.id = dhd.daily_harvest_id
|
|
53
|
-
where dh.block_id = trx.block_id and dh.harvest_date::timestamp = trx.transaction_date::timestamp
|
|
54
|
-
) as today_out_turn,
|
|
55
|
-
(
|
|
56
|
-
select sum(coverage) from daily_harvests dh
|
|
57
|
-
where dh.block_id = trx.block_id and harvest_date::timestamp = trx.transaction_date::timestamp
|
|
58
|
-
group by block_id, harvest_date
|
|
59
|
-
) as today_hectare_cover,
|
|
60
|
-
(
|
|
61
|
-
select sum(harvesting_round) from daily_harvests dh
|
|
62
|
-
where dh.block_id = trx.block_id and harvest_date::timestamp = trx.transaction_date::timestamp
|
|
63
|
-
group by block_id, harvest_date
|
|
64
|
-
) as today_harvesting_round
|
|
65
|
-
from transactions trx
|
|
66
|
-
where transaction_date = $1
|
|
67
|
-
and block_id = $2
|
|
68
|
-
group by block_id, transaction_date
|
|
69
|
-
order by transaction_date
|
|
70
|
-
) as dt
|
|
71
|
-
`,
|
|
72
|
-
[dateString, block.id]
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
const data = {
|
|
76
|
-
block: block,
|
|
77
|
-
diffInBunches: result.diff_in_bunches,
|
|
78
|
-
prevBunchBalInField: result.prev_bunch_bal_in_field,
|
|
79
|
-
prevWeightBalInRamp: result.prev_weight_bal_in_ramp,
|
|
80
|
-
toDateBunchHarvest: result.to_date_bunch_harvest,
|
|
81
|
-
toDateOutTurn: result.to_date_out_turn,
|
|
82
|
-
toDateWeightDispatch: result.to_date_weight_dispatch,
|
|
83
|
-
todayBunchBalInField: result.today_bunch_bal_in_field,
|
|
84
|
-
todayBunchCollected: result.today_bunch_collected,
|
|
85
|
-
todayBunchHarvest: result.today_bunch_harvest,
|
|
86
|
-
todayBunchInField: result.today_bunch_in_field,
|
|
87
|
-
todayHarvestingRound: result.today_harvesting_round,
|
|
88
|
-
todayHectareCover: result.today_hectare_cover,
|
|
89
|
-
todayOutTurn: result.today_out_turn,
|
|
90
|
-
todayWeightBalInRamp: result.today_weight_bal_in_ramp,
|
|
91
|
-
todayWeightDispatch: result.today_weight_dispatch
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return { data }
|
|
95
|
-
} catch (error) {
|
|
96
|
-
return { errorMessage: error.toString() }
|
|
97
|
-
}
|
|
98
|
-
}
|