@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.
Files changed (229) hide show
  1. package/dist-server/tsconfig.tsbuildinfo +1 -1
  2. package/package.json +34 -34
  3. package/server/constants/block.ts +0 -4
  4. package/server/constants/index.ts +0 -8
  5. package/server/constants/inventory.ts +0 -9
  6. package/server/constants/master.ts +0 -9
  7. package/server/constants/organization.ts +0 -5
  8. package/server/constants/ramp.ts +0 -9
  9. package/server/constants/record.ts +0 -4
  10. package/server/constants/template.ts +0 -3
  11. package/server/constants/transaction.ts +0 -9
  12. package/server/controllers/index.ts +0 -1
  13. package/server/controllers/render-dispatchment.ts +0 -53
  14. package/server/entities/block-detail.ts +0 -59
  15. package/server/entities/block.ts +0 -49
  16. package/server/entities/daily-block-detail.ts +0 -54
  17. package/server/entities/daily-dispatch-detail.ts +0 -64
  18. package/server/entities/daily-dispatch.ts +0 -90
  19. package/server/entities/daily-harvest-detail.ts +0 -56
  20. package/server/entities/daily-harvest.ts +0 -89
  21. package/server/entities/daily-loading-detail.ts +0 -68
  22. package/server/entities/daily-loading-ramp.ts +0 -56
  23. package/server/entities/daily-loading.ts +0 -70
  24. package/server/entities/index.ts +0 -57
  25. package/server/entities/organization-staff.ts +0 -60
  26. package/server/entities/organization.ts +0 -43
  27. package/server/entities/plantation-inventory.ts +0 -56
  28. package/server/entities/plantation-setting.ts +0 -60
  29. package/server/entities/ramp.ts +0 -47
  30. package/server/entities/record-transaction.ts +0 -76
  31. package/server/entities/truck.ts +0 -58
  32. package/server/graphql/index.ts +0 -9
  33. package/server/graphql/resolvers/block/block-query.ts +0 -36
  34. package/server/graphql/resolvers/block/delete-blocks.ts +0 -39
  35. package/server/graphql/resolvers/block/index.ts +0 -11
  36. package/server/graphql/resolvers/block/update-multiple-block.ts +0 -69
  37. package/server/graphql/resolvers/block-detail/block-detail-query.ts +0 -55
  38. package/server/graphql/resolvers/block-detail/delete-block-details.ts +0 -20
  39. package/server/graphql/resolvers/block-detail/index.ts +0 -12
  40. package/server/graphql/resolvers/block-detail/update-multiple-block-detail.ts +0 -55
  41. package/server/graphql/resolvers/daily-block-detail/create-daily-block-detail.ts +0 -14
  42. package/server/graphql/resolvers/daily-block-detail/daily-block-detail-query.ts +0 -36
  43. package/server/graphql/resolvers/daily-block-detail/delete-daily-block-detail.ts +0 -14
  44. package/server/graphql/resolvers/daily-block-detail/delete-daily-block-details.ts +0 -17
  45. package/server/graphql/resolvers/daily-block-detail/index.ts +0 -18
  46. package/server/graphql/resolvers/daily-block-detail/update-daily-block-detail.ts +0 -17
  47. package/server/graphql/resolvers/daily-block-detail/update-multiple-daily-block-detail.ts +0 -44
  48. package/server/graphql/resolvers/daily-dispatch/daily-dispatch-query.ts +0 -48
  49. package/server/graphql/resolvers/daily-dispatch/delete-daily-dispatch.ts +0 -34
  50. package/server/graphql/resolvers/daily-dispatch/generate-daily-dispatch.ts +0 -131
  51. package/server/graphql/resolvers/daily-dispatch/index.ts +0 -14
  52. package/server/graphql/resolvers/daily-dispatch/update-daily-dispatch.ts +0 -36
  53. package/server/graphql/resolvers/daily-dispatch-detail/daily-dispatch-detail-query.ts +0 -37
  54. package/server/graphql/resolvers/daily-dispatch-detail/index.ts +0 -6
  55. package/server/graphql/resolvers/daily-harvest/daily-harvest-query.ts +0 -46
  56. package/server/graphql/resolvers/daily-harvest/delete-daily-harvest.ts +0 -65
  57. package/server/graphql/resolvers/daily-harvest/generate-daily-harvest.ts +0 -205
  58. package/server/graphql/resolvers/daily-harvest/index.ts +0 -14
  59. package/server/graphql/resolvers/daily-harvest/update-daily-harvest.ts +0 -153
  60. package/server/graphql/resolvers/daily-harvest-detail/daily-harvest-detail-query.ts +0 -35
  61. package/server/graphql/resolvers/daily-harvest-detail/index.ts +0 -6
  62. package/server/graphql/resolvers/daily-loading/daily-loading-query.ts +0 -43
  63. package/server/graphql/resolvers/daily-loading/delete-daily-loading.ts +0 -38
  64. package/server/graphql/resolvers/daily-loading/generate-daily-loading.ts +0 -149
  65. package/server/graphql/resolvers/daily-loading/index.ts +0 -14
  66. package/server/graphql/resolvers/daily-loading/update-daily-loading.ts +0 -154
  67. package/server/graphql/resolvers/daily-loading-detail/daily-loading-detail-query.ts +0 -35
  68. package/server/graphql/resolvers/daily-loading-detail/index.ts +0 -6
  69. package/server/graphql/resolvers/daily-loading-ramp/daily-loading-ramp-query.ts +0 -34
  70. package/server/graphql/resolvers/daily-loading-ramp/delete-daily-loading-ramp.ts +0 -15
  71. package/server/graphql/resolvers/daily-loading-ramp/index.ts +0 -12
  72. package/server/graphql/resolvers/daily-loading-ramp/update-daily-loading-ramp.ts +0 -18
  73. package/server/graphql/resolvers/dashboard/dashboard-query.ts +0 -245
  74. package/server/graphql/resolvers/dashboard/index.ts +0 -5
  75. package/server/graphql/resolvers/index.ts +0 -20
  76. package/server/graphql/resolvers/organization/delete-organizations.ts +0 -40
  77. package/server/graphql/resolvers/organization/index.ts +0 -11
  78. package/server/graphql/resolvers/organization/organization-query.ts +0 -35
  79. package/server/graphql/resolvers/organization/update-multiple-organization.ts +0 -48
  80. package/server/graphql/resolvers/organization-staff/delete-organization-staffs.ts +0 -20
  81. package/server/graphql/resolvers/organization-staff/index.ts +0 -12
  82. package/server/graphql/resolvers/organization-staff/organization-staff-query.ts +0 -43
  83. package/server/graphql/resolvers/organization-staff/update-multiple-organization-staff.ts +0 -60
  84. package/server/graphql/resolvers/plantation-inventory/index.ts +0 -6
  85. package/server/graphql/resolvers/plantation-inventory/plantation-inventory-query.ts +0 -43
  86. package/server/graphql/resolvers/plantation-setting/create-plantation-setting.ts +0 -16
  87. package/server/graphql/resolvers/plantation-setting/delete-plantation-setting.ts +0 -13
  88. package/server/graphql/resolvers/plantation-setting/delete-plantation-settings.ts +0 -18
  89. package/server/graphql/resolvers/plantation-setting/index.ts +0 -19
  90. package/server/graphql/resolvers/plantation-setting/plantation-setting-query.ts +0 -38
  91. package/server/graphql/resolvers/plantation-setting/update-multiple-plantation-setting.ts +0 -46
  92. package/server/graphql/resolvers/plantation-setting/update-plantation-setting.ts +0 -20
  93. package/server/graphql/resolvers/ramp/delete-ramps.ts +0 -24
  94. package/server/graphql/resolvers/ramp/index.ts +0 -12
  95. package/server/graphql/resolvers/ramp/ramp-query.ts +0 -34
  96. package/server/graphql/resolvers/ramp/update-multiple-ramp.ts +0 -61
  97. package/server/graphql/resolvers/record-transaction/index.ts +0 -6
  98. package/server/graphql/resolvers/record-transaction/record-transaction-query.ts +0 -34
  99. package/server/graphql/resolvers/report/daily-ffb-dispatch-production-reports.ts +0 -149
  100. package/server/graphql/resolvers/report/daily-production-reports.ts +0 -167
  101. package/server/graphql/resolvers/report/daily-staff-harvest-reports.ts +0 -84
  102. package/server/graphql/resolvers/report/index.ts +0 -22
  103. package/server/graphql/resolvers/report/monthly-block-dispatch-reports.ts +0 -122
  104. package/server/graphql/resolvers/report/monthly-dispatch-summary-reports.ts +0 -114
  105. package/server/graphql/resolvers/report/monthly-ffb-sale-reports.ts +0 -111
  106. package/server/graphql/resolvers/report/monthly-production-reports.ts +0 -117
  107. package/server/graphql/resolvers/report/yearly-production-reports.ts +0 -101
  108. package/server/graphql/resolvers/truck/delete-trucks.ts +0 -21
  109. package/server/graphql/resolvers/truck/index.ts +0 -12
  110. package/server/graphql/resolvers/truck/truck-query.ts +0 -50
  111. package/server/graphql/resolvers/truck/update-multiple-truck.ts +0 -55
  112. package/server/graphql/types/block/block-list.ts +0 -8
  113. package/server/graphql/types/block/block-patch.ts +0 -13
  114. package/server/graphql/types/block/block.ts +0 -18
  115. package/server/graphql/types/block/index.ts +0 -18
  116. package/server/graphql/types/block/new-block.ts +0 -8
  117. package/server/graphql/types/block-detail/block-detail-list.ts +0 -8
  118. package/server/graphql/types/block-detail/block-detail-patch.ts +0 -16
  119. package/server/graphql/types/block-detail/block-detail.ts +0 -21
  120. package/server/graphql/types/block-detail/index.ts +0 -18
  121. package/server/graphql/types/block-detail/new-block-detail.ts +0 -13
  122. package/server/graphql/types/daily-block-detail/daily-block-detail-list.ts +0 -8
  123. package/server/graphql/types/daily-block-detail/daily-block-detail-patch.ts +0 -10
  124. package/server/graphql/types/daily-block-detail/daily-block-detail.ts +0 -18
  125. package/server/graphql/types/daily-block-detail/index.ts +0 -21
  126. package/server/graphql/types/daily-block-detail/new-daily-block-detail.ts +0 -8
  127. package/server/graphql/types/daily-dispatch/daily-dispatch-list.ts +0 -8
  128. package/server/graphql/types/daily-dispatch/daily-dispatch-patch.ts +0 -22
  129. package/server/graphql/types/daily-dispatch/daily-dispatch.ts +0 -27
  130. package/server/graphql/types/daily-dispatch/index.ts +0 -24
  131. package/server/graphql/types/daily-dispatch/new-daily-dispatch.ts +0 -20
  132. package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-list.ts +0 -8
  133. package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail-patch.ts +0 -16
  134. package/server/graphql/types/daily-dispatch-detail/daily-dispatch-detail.ts +0 -21
  135. package/server/graphql/types/daily-dispatch-detail/index.ts +0 -14
  136. package/server/graphql/types/daily-dispatch-detail/new-daily-dispatch-detail.ts +0 -12
  137. package/server/graphql/types/daily-harvest/daily-harvest-list.ts +0 -8
  138. package/server/graphql/types/daily-harvest/daily-harvest-patch.ts +0 -17
  139. package/server/graphql/types/daily-harvest/daily-harvest.ts +0 -27
  140. package/server/graphql/types/daily-harvest/index.ts +0 -19
  141. package/server/graphql/types/daily-harvest/new-daily-harvest.ts +0 -15
  142. package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-list.ts +0 -8
  143. package/server/graphql/types/daily-harvest-detail/daily-harvest-detail-patch.ts +0 -11
  144. package/server/graphql/types/daily-harvest-detail/daily-harvest-detail.ts +0 -20
  145. package/server/graphql/types/daily-harvest-detail/index.ts +0 -14
  146. package/server/graphql/types/daily-harvest-detail/new-daily-harvest-detail.ts +0 -10
  147. package/server/graphql/types/daily-loading/daily-loading-list.ts +0 -8
  148. package/server/graphql/types/daily-loading/daily-loading-patch.ts +0 -8
  149. package/server/graphql/types/daily-loading/daily-loading.ts +0 -21
  150. package/server/graphql/types/daily-loading/index.ts +0 -19
  151. package/server/graphql/types/daily-loading/new-daily-loading.ts +0 -8
  152. package/server/graphql/types/daily-loading-detail/daily-loading-detail-list.ts +0 -8
  153. package/server/graphql/types/daily-loading-detail/daily-loading-detail-patch.ts +0 -14
  154. package/server/graphql/types/daily-loading-detail/daily-loading-detail.ts +0 -23
  155. package/server/graphql/types/daily-loading-detail/index.ts +0 -14
  156. package/server/graphql/types/daily-loading-detail/new-daily-loading-detail.ts +0 -13
  157. package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-list.ts +0 -8
  158. package/server/graphql/types/daily-loading-ramp/daily-loading-ramp-patch.ts +0 -13
  159. package/server/graphql/types/daily-loading-ramp/daily-loading-ramp.ts +0 -17
  160. package/server/graphql/types/daily-loading-ramp/index.ts +0 -18
  161. package/server/graphql/types/daily-loading-ramp/new-daily-loading-ramp.ts +0 -11
  162. package/server/graphql/types/dashboard/bunches-count.ts +0 -9
  163. package/server/graphql/types/dashboard/index.ts +0 -17
  164. package/server/graphql/types/dashboard/productions-overview.ts +0 -9
  165. package/server/graphql/types/dashboard/tonnage-bunches-inventories.ts +0 -8
  166. package/server/graphql/types/dashboard/tonnage-production.ts +0 -11
  167. package/server/graphql/types/dashboard/yield-production.ts +0 -11
  168. package/server/graphql/types/index.ts +0 -20
  169. package/server/graphql/types/organization/index.ts +0 -18
  170. package/server/graphql/types/organization/new-organization.ts +0 -9
  171. package/server/graphql/types/organization/organization-list.ts +0 -8
  172. package/server/graphql/types/organization/organization-patch.ts +0 -11
  173. package/server/graphql/types/organization/organization.ts +0 -16
  174. package/server/graphql/types/organization-staff/index.ts +0 -19
  175. package/server/graphql/types/organization-staff/new-organization-staff.ts +0 -8
  176. package/server/graphql/types/organization-staff/organization-staff-list.ts +0 -8
  177. package/server/graphql/types/organization-staff/organization-staff-patch.ts +0 -15
  178. package/server/graphql/types/organization-staff/organization-staff.ts +0 -21
  179. package/server/graphql/types/plantation-inventory/index.ts +0 -14
  180. package/server/graphql/types/plantation-inventory/new-plantation-inventory.ts +0 -8
  181. package/server/graphql/types/plantation-inventory/plantation-inventory-list.ts +0 -8
  182. package/server/graphql/types/plantation-inventory/plantation-inventory-patch.ts +0 -10
  183. package/server/graphql/types/plantation-inventory/plantation-inventory.ts +0 -22
  184. package/server/graphql/types/plantation-setting/index.ts +0 -21
  185. package/server/graphql/types/plantation-setting/new-plantation-setting.ts +0 -10
  186. package/server/graphql/types/plantation-setting/plantation-setting-list.ts +0 -8
  187. package/server/graphql/types/plantation-setting/plantation-setting-patch.ts +0 -12
  188. package/server/graphql/types/plantation-setting/plantation-setting.ts +0 -16
  189. package/server/graphql/types/ramp/index.ts +0 -18
  190. package/server/graphql/types/ramp/new-ramp.ts +0 -8
  191. package/server/graphql/types/ramp/ramp-list.ts +0 -8
  192. package/server/graphql/types/ramp/ramp-patch.ts +0 -12
  193. package/server/graphql/types/ramp/ramp.ts +0 -17
  194. package/server/graphql/types/record-transaction/index.ts +0 -14
  195. package/server/graphql/types/record-transaction/new-record-transaction.ts +0 -8
  196. package/server/graphql/types/record-transaction/record-transaction-list.ts +0 -8
  197. package/server/graphql/types/record-transaction/record-transaction-patch.ts +0 -10
  198. package/server/graphql/types/record-transaction/record-transaction.ts +0 -24
  199. package/server/graphql/types/report/daily-ffb-dispatch-production-report-list.ts +0 -8
  200. package/server/graphql/types/report/daily-ffb-dispatch-production-report.ts +0 -9
  201. package/server/graphql/types/report/daily-production-report-list.ts +0 -8
  202. package/server/graphql/types/report/daily-production-report.ts +0 -23
  203. package/server/graphql/types/report/daily-staff-harvest-report-list.ts +0 -8
  204. package/server/graphql/types/report/daily-staff-harvest-report.ts +0 -10
  205. package/server/graphql/types/report/index.ts +0 -62
  206. package/server/graphql/types/report/monthly-block-dispatch-report-list.ts +0 -7
  207. package/server/graphql/types/report/monthly-block-dispatch-report.ts +0 -13
  208. package/server/graphql/types/report/monthly-dispatch-summary-report-list.ts +0 -7
  209. package/server/graphql/types/report/monthly-dispatch-summary-report.ts +0 -19
  210. package/server/graphql/types/report/monthly-ffb-sale-report-list.ts +0 -7
  211. package/server/graphql/types/report/monthly-ffb-sale-report.ts +0 -18
  212. package/server/graphql/types/report/monthly-production-report-list.ts +0 -8
  213. package/server/graphql/types/report/monthly-production-report.ts +0 -25
  214. package/server/graphql/types/report/yearly-production-report-list.ts +0 -8
  215. package/server/graphql/types/report/yearly-production-report.ts +0 -18
  216. package/server/graphql/types/truck/index.ts +0 -18
  217. package/server/graphql/types/truck/new-truck.ts +0 -8
  218. package/server/graphql/types/truck/truck-list.ts +0 -8
  219. package/server/graphql/types/truck/truck-patch.ts +0 -11
  220. package/server/graphql/types/truck/truck.ts +0 -16
  221. package/server/index.ts +0 -6
  222. package/server/middlewares/index.ts +0 -3
  223. package/server/migrations/index.ts +0 -9
  224. package/server/routes.ts +0 -7
  225. package/server/utils/core-values.ts +0 -98
  226. package/server/utils/datetime-util.ts +0 -39
  227. package/server/utils/index.ts +0 -4
  228. package/server/utils/no-generator.ts +0 -64
  229. 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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const NewRamp = gql`
4
- input NewRamp {
5
- name: String!
6
- description: String
7
- }
8
- `
@@ -1,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const RampList = gql`
4
- type RampList {
5
- items: [Ramp]
6
- total: Int
7
- }
8
- `
@@ -1,12 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const RampPatch = gql`
4
- input RampPatch {
5
- id: String
6
- name: String
7
- description: String
8
- status: String
9
- block: ObjectRef
10
- cuFlag: String
11
- }
12
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const NewRecordTransaction = gql`
4
- input NewRecordTransaction {
5
- name: String!
6
- description: String
7
- }
8
- `
@@ -1,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const RecordTransactionList = gql`
4
- type RecordTransactionList {
5
- items: [RecordTransaction]
6
- total: Int
7
- }
8
- `
@@ -1,10 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const RecordTransactionPatch = gql`
4
- input RecordTransactionPatch {
5
- id: String
6
- name: String
7
- description: String
8
- cuFlag: String
9
- }
10
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const DailyFfbDispatchProductionReportList = gql`
4
- type DailyFfbDispatchProductionReportList {
5
- items: [DailyFfbDispatchProductionReport]
6
- total: Int
7
- }
8
- `
@@ -1,9 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const DailyFfbDispatchProductionReport = gql`
4
- type DailyFfbDispatchProductionReport {
5
- date: String
6
- blockData: String
7
- today: String
8
- }
9
- `
@@ -1,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const DailyProductionReportList = gql`
4
- type DailyProductionReportList {
5
- items: [DailyProductionReport]
6
- total: Int
7
- }
8
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const DailyStaffHarvestReportList = gql`
4
- type DailyStaffHarvestReportList {
5
- items: [DailyStaffHarvestReport]
6
- total: Int
7
- }
8
- `
@@ -1,10 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const DailyStaffHarvestReport = gql`
4
- type DailyStaffHarvestReport {
5
- harvestDate: String
6
- blockName: String
7
- staffName: String
8
- totalBunchHarvested: String
9
- }
10
- `
@@ -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,7 +0,0 @@
1
- import gql from 'graphql-tag'
2
- export const MonthlyBlockDispatchReportList = gql`
3
- type MonthlyBlockDispatchReportList {
4
- items: [MonthlyBlockDispatchReport]
5
- total: Int
6
- }
7
- `
@@ -1,13 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const MonthlyBlockDispatchReport = gql`
4
- type MonthlyBlockDispatchReport {
5
- no: Int
6
- date: String
7
- blockData: String
8
- lorryNo: String
9
- dispatchTo: String
10
- today: String
11
- todate: String
12
- }
13
- `
@@ -1,7 +0,0 @@
1
- import gql from 'graphql-tag'
2
- export const MonthlyDispatchSummaryReportList = gql`
3
- type MonthlyDispatchSummaryReportList {
4
- items: [MonthlyDispatchSummaryReport]
5
- total: Int
6
- }
7
- `
@@ -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,7 +0,0 @@
1
- import gql from 'graphql-tag'
2
- export const MonthlyFfbSaleReportList = gql`
3
- type MonthlyFfbSaleReportList {
4
- items: [MonthlyFfbSaleReport]
5
- total: Int
6
- }
7
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const MonthlyProductionReportList = gql`
4
- type MonthlyProductionReportList {
5
- items: [MonthlyProductionReport]
6
- total: Int
7
- }
8
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const YearlyProductionReportList = gql`
4
- type YearlyProductionReportList {
5
- items: [YearlyProductionReport]
6
- total: Int
7
- }
8
- `
@@ -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,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const NewTruck = gql`
4
- input NewTruck {
5
- name: String!
6
- description: String
7
- }
8
- `
@@ -1,8 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const TruckList = gql`
4
- type TruckList {
5
- items: [Truck]
6
- total: Int
7
- }
8
- `
@@ -1,11 +0,0 @@
1
- import gql from 'graphql-tag'
2
-
3
- export const TruckPatch = gql`
4
- input TruckPatch {
5
- id: String
6
- name: String
7
- description: String
8
- organization: ObjectRef
9
- cuFlag: String
10
- }
11
- `
@@ -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,6 +0,0 @@
1
- export * from './entities'
2
- export * from './migrations'
3
- export * from './graphql'
4
- export * from './middlewares'
5
-
6
- import './routes'
@@ -1,3 +0,0 @@
1
- export function initMiddlewares(app) {
2
- /* can add middlewares into app */
3
- }
@@ -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
- }