@dssp/supervision 0.0.9 → 0.0.11

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 (224) hide show
  1. package/client/pages/building-inspection/building-inspection-detail-checklist.ts +227 -0
  2. package/client/pages/building-inspection/building-inspection-detail-drawing.ts +160 -0
  3. package/client/pages/building-inspection/building-inspection-list.ts +430 -0
  4. package/client/pages/building-inspection/component/building-inspection-detail-header.ts +94 -0
  5. package/client/pages/building-inspection/inspection-create-popup.ts +696 -0
  6. package/client/pages/checklist/checklist-view.ts +463 -0
  7. package/client/pages/checklist-template/checklist-template-item.ts +240 -0
  8. package/client/pages/checklist-template/checklist-template-list.ts +271 -0
  9. package/client/pages/checklist-template/checklist-type-management.ts +242 -0
  10. package/client/route.ts +14 -18
  11. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +22 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +228 -0
  13. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
  14. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +21 -0
  15. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +169 -0
  16. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
  17. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +67 -0
  18. package/dist-client/pages/building-inspection/building-inspection-list.js +434 -0
  19. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
  20. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
  21. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +118 -0
  22. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
  23. package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
  24. package/dist-client/pages/building-inspection/inspection-create-popup.js +735 -0
  25. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
  26. package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
  27. package/dist-client/pages/checklist/checklist-view.js +468 -0
  28. package/dist-client/pages/checklist/checklist-view.js.map +1 -0
  29. package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
  30. package/dist-client/pages/checklist-template/checklist-template-item.js +237 -0
  31. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
  32. package/dist-client/pages/{check-item/check-item-list-page.d.ts → checklist-template/checklist-template-list.d.ts} +8 -27
  33. package/dist-client/pages/checklist-template/checklist-template-list.js +259 -0
  34. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
  35. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +48 -0
  36. package/dist-client/pages/checklist-template/checklist-type-management.js +229 -0
  37. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
  38. package/dist-client/route.d.ts +1 -1
  39. package/dist-client/route.js +10 -13
  40. package/dist-client/route.js.map +1 -1
  41. package/dist-client/tsconfig.tsbuildinfo +1 -1
  42. package/dist-server/index.d.ts +1 -1
  43. package/dist-server/index.js +1 -1
  44. package/dist-server/index.js.map +1 -1
  45. package/dist-server/service/building-inspection/building-inspection-history.d.ts +17 -0
  46. package/dist-server/service/building-inspection/building-inspection-history.js +85 -0
  47. package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -0
  48. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +9 -0
  49. package/dist-server/service/building-inspection/building-inspection-mutation.js +227 -0
  50. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
  51. package/dist-server/service/building-inspection/building-inspection-query.d.ts +20 -0
  52. package/dist-server/service/building-inspection/building-inspection-query.js +235 -0
  53. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
  54. package/dist-server/service/building-inspection/building-inspection-type.d.ts +60 -0
  55. package/dist-server/service/building-inspection/building-inspection-type.js +213 -0
  56. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
  57. package/dist-server/service/building-inspection/building-inspection.d.ts +26 -0
  58. package/dist-server/service/building-inspection/building-inspection.js +113 -0
  59. package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
  60. package/dist-server/service/building-inspection/event-subscriber.d.ts +7 -0
  61. package/dist-server/service/building-inspection/event-subscriber.js +21 -0
  62. package/dist-server/service/building-inspection/event-subscriber.js.map +1 -0
  63. package/dist-server/service/building-inspection/index.d.ts +10 -0
  64. package/dist-server/service/building-inspection/index.js +14 -0
  65. package/dist-server/service/building-inspection/index.js.map +1 -0
  66. package/dist-server/service/checklist/checklist-history.d.ts +24 -0
  67. package/dist-server/service/checklist/checklist-history.js +120 -0
  68. package/dist-server/service/checklist/checklist-history.js.map +1 -0
  69. package/dist-server/service/checklist/checklist-mutation.d.ts +8 -0
  70. package/dist-server/service/checklist/checklist-mutation.js +96 -0
  71. package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
  72. package/dist-server/service/checklist/checklist-query.d.ts +12 -0
  73. package/dist-server/service/checklist/checklist-query.js +83 -0
  74. package/dist-server/service/checklist/checklist-query.js.map +1 -0
  75. package/dist-server/service/checklist/checklist-type.d.ts +18 -0
  76. package/dist-server/service/checklist/checklist-type.js +69 -0
  77. package/dist-server/service/checklist/checklist-type.js.map +1 -0
  78. package/dist-server/service/checklist/checklist.d.ts +31 -0
  79. package/dist-server/service/checklist/checklist.js +143 -0
  80. package/dist-server/service/checklist/checklist.js.map +1 -0
  81. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  82. package/dist-server/service/checklist/event-subscriber.js +21 -0
  83. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  84. package/dist-server/service/checklist/index.d.ts +8 -0
  85. package/dist-server/service/checklist/index.js +12 -0
  86. package/dist-server/service/checklist/index.js.map +1 -0
  87. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +2 -0
  88. package/dist-server/service/checklist-item/checklist-item-mutation.js +13 -0
  89. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
  90. package/dist-server/service/checklist-item/checklist-item-query.d.ts +10 -0
  91. package/dist-server/service/checklist-item/checklist-item-query.js +68 -0
  92. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
  93. package/dist-server/service/checklist-item/checklist-item-type.d.ts +5 -0
  94. package/dist-server/service/checklist-item/checklist-item-type.js +21 -0
  95. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
  96. package/dist-server/service/checklist-item/checklist-item.d.ts +26 -0
  97. package/dist-server/service/checklist-item/checklist-item.js +113 -0
  98. package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
  99. package/dist-server/service/checklist-item/index.d.ts +5 -0
  100. package/dist-server/service/checklist-item/index.js +10 -0
  101. package/dist-server/service/checklist-item/index.js.map +1 -0
  102. package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +6 -0
  103. package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
  104. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
  105. package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
  106. package/dist-server/service/checklist-template/checklist-template-query.js +65 -0
  107. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
  108. package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
  109. package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
  110. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
  111. package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
  112. package/dist-server/service/checklist-template/checklist-template.js +78 -0
  113. package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
  114. package/dist-server/service/checklist-template/index.d.ts +5 -0
  115. package/dist-server/service/checklist-template/index.js +9 -0
  116. package/dist-server/service/checklist-template/index.js.map +1 -0
  117. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
  118. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +68 -0
  119. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
  120. package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +10 -0
  121. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +66 -0
  122. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
  123. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +16 -0
  124. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +60 -0
  125. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
  126. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +19 -0
  127. package/dist-server/service/checklist-template-item/checklist-template-item.js +87 -0
  128. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
  129. package/dist-server/service/checklist-template-item/index.d.ts +5 -0
  130. package/dist-server/service/checklist-template-item/index.js +9 -0
  131. package/dist-server/service/checklist-template-item/index.js.map +1 -0
  132. package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
  133. package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
  134. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
  135. package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
  136. package/dist-server/service/checklist-type/checklist-type-query.js +65 -0
  137. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
  138. package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
  139. package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
  140. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
  141. package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
  142. package/dist-server/service/checklist-type/checklist-type.js +78 -0
  143. package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
  144. package/dist-server/service/checklist-type/index.d.ts +5 -0
  145. package/dist-server/service/checklist-type/index.js +9 -0
  146. package/dist-server/service/checklist-type/index.js.map +1 -0
  147. package/dist-server/service/index.d.ts +8 -3
  148. package/dist-server/service/index.js +26 -5
  149. package/dist-server/service/index.js.map +1 -1
  150. package/dist-server/service/issue/issue.d.ts +1 -3
  151. package/dist-server/service/issue/issue.js +1 -7
  152. package/dist-server/service/issue/issue.js.map +1 -1
  153. package/dist-server/service/supervisor/supervisor.d.ts +1 -3
  154. package/dist-server/service/supervisor/supervisor.js +1 -7
  155. package/dist-server/service/supervisor/supervisor.js.map +1 -1
  156. package/dist-server/tsconfig.tsbuildinfo +1 -1
  157. package/helps/supervision/checklist-item.md +160 -0
  158. package/helps/supervision/checklist.md +160 -0
  159. package/package.json +11 -7
  160. package/server/index.ts +1 -1
  161. package/server/service/building-inspection/building-inspection-history.ts +70 -0
  162. package/server/service/building-inspection/building-inspection-mutation.ts +239 -0
  163. package/server/service/building-inspection/building-inspection-query.ts +202 -0
  164. package/server/service/building-inspection/building-inspection-type.ts +142 -0
  165. package/server/service/building-inspection/building-inspection.ts +106 -0
  166. package/server/service/building-inspection/event-subscriber.ts +20 -0
  167. package/server/service/building-inspection/index.ts +11 -0
  168. package/server/service/checklist/checklist-history.ts +96 -0
  169. package/server/service/checklist/checklist-mutation.ts +103 -0
  170. package/server/service/checklist/checklist-query.ts +52 -0
  171. package/server/service/{check-item/check-item-type.ts → checklist/checklist-type.ts} +6 -18
  172. package/server/service/checklist/checklist.ts +127 -0
  173. package/server/service/checklist/event-subscriber.ts +17 -0
  174. package/server/service/checklist/index.ts +9 -0
  175. package/server/service/checklist-item/checklist-item-mutation.ts +5 -0
  176. package/server/service/checklist-item/checklist-item-query.ts +43 -0
  177. package/server/service/checklist-item/checklist-item-type.ts +12 -0
  178. package/server/service/checklist-item/checklist-item.ts +100 -0
  179. package/server/service/checklist-item/index.ts +7 -0
  180. package/server/service/checklist-template/checklist-template-mutation.ts +66 -0
  181. package/server/service/checklist-template/checklist-template-query.ts +39 -0
  182. package/server/service/checklist-template/checklist-template-type.ts +23 -0
  183. package/server/service/checklist-template/checklist-template.ts +71 -0
  184. package/server/service/checklist-template/index.ts +6 -0
  185. package/server/service/checklist-template-item/checklist-template-item-mutation.ts +64 -0
  186. package/server/service/checklist-template-item/checklist-template-item-query.ts +39 -0
  187. package/server/service/checklist-template-item/checklist-template-item-type.ts +39 -0
  188. package/server/service/checklist-template-item/checklist-template-item.ts +67 -0
  189. package/server/service/checklist-template-item/index.ts +6 -0
  190. package/server/service/checklist-type/checklist-type-mutation.ts +66 -0
  191. package/server/service/checklist-type/checklist-type-query.ts +39 -0
  192. package/server/service/checklist-type/checklist-type-type.ts +26 -0
  193. package/server/service/checklist-type/checklist-type.ts +64 -0
  194. package/server/service/checklist-type/index.ts +6 -0
  195. package/server/service/index.ts +60 -23
  196. package/server/service/issue/issue.ts +1 -6
  197. package/server/service/supervisor/supervisor.ts +1 -6
  198. package/things-factory.config.js +11 -7
  199. package/client/pages/check-item/check-item-importer.ts +0 -94
  200. package/client/pages/check-item/check-item-list-page.ts +0 -340
  201. package/dist-client/pages/check-item/check-item-importer.d.ts +0 -10
  202. package/dist-client/pages/check-item/check-item-importer.js +0 -101
  203. package/dist-client/pages/check-item/check-item-importer.js.map +0 -1
  204. package/dist-client/pages/check-item/check-item-list-page.js +0 -323
  205. package/dist-client/pages/check-item/check-item-list-page.js.map +0 -1
  206. package/dist-server/service/check-item/check-item-mutation.d.ts +0 -10
  207. package/dist-server/service/check-item/check-item-mutation.js +0 -168
  208. package/dist-server/service/check-item/check-item-mutation.js.map +0 -1
  209. package/dist-server/service/check-item/check-item-query.d.ts +0 -12
  210. package/dist-server/service/check-item/check-item-query.js +0 -97
  211. package/dist-server/service/check-item/check-item-query.js.map +0 -1
  212. package/dist-server/service/check-item/check-item-type.d.ts +0 -23
  213. package/dist-server/service/check-item/check-item-type.js +0 -86
  214. package/dist-server/service/check-item/check-item-type.js.map +0 -1
  215. package/dist-server/service/check-item/check-item.d.ts +0 -28
  216. package/dist-server/service/check-item/check-item.js +0 -117
  217. package/dist-server/service/check-item/check-item.js.map +0 -1
  218. package/dist-server/service/check-item/index.d.ts +0 -6
  219. package/dist-server/service/check-item/index.js +0 -10
  220. package/dist-server/service/check-item/index.js.map +0 -1
  221. package/server/service/check-item/check-item-mutation.ts +0 -198
  222. package/server/service/check-item/check-item-query.ts +0 -62
  223. package/server/service/check-item/check-item.ts +0 -111
  224. package/server/service/check-item/index.ts +0 -7
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistTemplateItemList = exports.ChecklistTemplateItemPatch = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const checklist_template_item_1 = require("./checklist-template-item");
7
+ const checklist_type_1 = require("../checklist-type/checklist-type");
8
+ let ChecklistTemplateItemPatch = class ChecklistTemplateItemPatch {
9
+ };
10
+ tslib_1.__decorate([
11
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
12
+ tslib_1.__metadata("design:type", String)
13
+ ], ChecklistTemplateItemPatch.prototype, "id", void 0);
14
+ tslib_1.__decorate([
15
+ (0, type_graphql_1.Field)({ nullable: true }),
16
+ tslib_1.__metadata("design:type", String)
17
+ ], ChecklistTemplateItemPatch.prototype, "name", void 0);
18
+ tslib_1.__decorate([
19
+ (0, type_graphql_1.Field)({ nullable: true }),
20
+ tslib_1.__metadata("design:type", String)
21
+ ], ChecklistTemplateItemPatch.prototype, "inspctionCriteria", void 0);
22
+ tslib_1.__decorate([
23
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
24
+ tslib_1.__metadata("design:type", Number)
25
+ ], ChecklistTemplateItemPatch.prototype, "sequence", void 0);
26
+ tslib_1.__decorate([
27
+ (0, type_graphql_1.Field)({ nullable: true }),
28
+ tslib_1.__metadata("design:type", String)
29
+ ], ChecklistTemplateItemPatch.prototype, "mainType", void 0);
30
+ tslib_1.__decorate([
31
+ (0, type_graphql_1.Field)({ nullable: true }),
32
+ tslib_1.__metadata("design:type", String)
33
+ ], ChecklistTemplateItemPatch.prototype, "detailType", void 0);
34
+ tslib_1.__decorate([
35
+ (0, type_graphql_1.Field)({ nullable: true }),
36
+ tslib_1.__metadata("design:type", String)
37
+ ], ChecklistTemplateItemPatch.prototype, "checklistTemplateId", void 0);
38
+ tslib_1.__decorate([
39
+ (0, type_graphql_1.Field)({ nullable: true }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], ChecklistTemplateItemPatch.prototype, "cuFlag", void 0);
42
+ ChecklistTemplateItemPatch = tslib_1.__decorate([
43
+ (0, type_graphql_1.InputType)()
44
+ ], ChecklistTemplateItemPatch);
45
+ exports.ChecklistTemplateItemPatch = ChecklistTemplateItemPatch;
46
+ let ChecklistTemplateItemList = class ChecklistTemplateItemList {
47
+ };
48
+ tslib_1.__decorate([
49
+ (0, type_graphql_1.Field)(type => [checklist_template_item_1.ChecklistTemplateItem]),
50
+ tslib_1.__metadata("design:type", Array)
51
+ ], ChecklistTemplateItemList.prototype, "items", void 0);
52
+ tslib_1.__decorate([
53
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
54
+ tslib_1.__metadata("design:type", Number)
55
+ ], ChecklistTemplateItemList.prototype, "total", void 0);
56
+ ChecklistTemplateItemList = tslib_1.__decorate([
57
+ (0, type_graphql_1.ObjectType)()
58
+ ], ChecklistTemplateItemList);
59
+ exports.ChecklistTemplateItemList = ChecklistTemplateItemList;
60
+ //# sourceMappingURL=checklist-template-item-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-template-item-type.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,uEAAiE;AACjE,qEAAwE;AAGjE,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAwBtC,CAAA;AAvBC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACb;AAEb;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qEACA;AAE1B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACtB;AAEjB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4DACM;AAEhC;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8DACP;AAEnB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uEACE;AAE5B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACX;AAvBJ,0BAA0B;IADtC,IAAA,wBAAS,GAAE;GACC,0BAA0B,CAwBtC;AAxBY,gEAA0B;AA2BhC,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAMrC,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,+CAAqB,CAAC,CAAC;;wDACT;AAE9B;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;wDACN;AALF,yBAAyB;IADrC,IAAA,yBAAU,GAAE;GACA,yBAAyB,CAMrC;AANY,8DAAyB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ChecklistTemplateItem } from './checklist-template-item'\nimport { ChecklistTypeMainType } from '../checklist-type/checklist-type'\n\n@InputType()\nexport class ChecklistTemplateItemPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Field({ nullable: true })\n mainType?: ChecklistTypeMainType\n\n @Field({ nullable: true })\n detailType?: string\n\n @Field({ nullable: true })\n checklistTemplateId?: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ChecklistTemplateItemList {\n @Field(type => [ChecklistTemplateItem])\n items: ChecklistTemplateItem[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { User } from '@things-factory/auth-base';
2
+ import { ChecklistTemplate } from '../checklist-template/checklist-template';
3
+ import { ChecklistTypeMainType } from '../checklist-type/checklist-type';
4
+ export declare class ChecklistTemplateItem {
5
+ readonly id: string;
6
+ name: string;
7
+ inspctionCriteria?: string;
8
+ sequence?: number;
9
+ mainType: ChecklistTypeMainType;
10
+ detailType: string;
11
+ checklistTemplate?: ChecklistTemplate;
12
+ checklistTemplateId?: string;
13
+ createdAt?: Date;
14
+ updatedAt?: Date;
15
+ creator?: User;
16
+ creatorId?: string;
17
+ updater?: User;
18
+ updaterId?: string;
19
+ }
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistTemplateItem = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const checklist_template_1 = require("../checklist-template/checklist-template");
9
+ const checklist_type_1 = require("../checklist-type/checklist-type");
10
+ let ChecklistTemplateItem = class ChecklistTemplateItem {
11
+ };
12
+ tslib_1.__decorate([
13
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
14
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], ChecklistTemplateItem.prototype, "id", void 0);
17
+ tslib_1.__decorate([
18
+ (0, typeorm_1.Column)({ nullable: false, comment: '검사 항목' }),
19
+ (0, type_graphql_1.Field)({ nullable: false }),
20
+ tslib_1.__metadata("design:type", String)
21
+ ], ChecklistTemplateItem.prototype, "name", void 0);
22
+ tslib_1.__decorate([
23
+ (0, typeorm_1.Column)({ nullable: true, comment: '검사 기준' }),
24
+ (0, type_graphql_1.Field)({ nullable: true }),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], ChecklistTemplateItem.prototype, "inspctionCriteria", void 0);
27
+ tslib_1.__decorate([
28
+ (0, typeorm_1.Column)({ nullable: true, comment: '시퀀스' }),
29
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
30
+ tslib_1.__metadata("design:type", Number)
31
+ ], ChecklistTemplateItem.prototype, "sequence", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.Column)({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' }),
34
+ (0, type_graphql_1.Field)({ nullable: false }),
35
+ tslib_1.__metadata("design:type", String)
36
+ ], ChecklistTemplateItem.prototype, "mainType", void 0);
37
+ tslib_1.__decorate([
38
+ (0, typeorm_1.Column)({ nullable: false, comment: '상세 구분' }),
39
+ (0, type_graphql_1.Field)({ nullable: false }),
40
+ tslib_1.__metadata("design:type", String)
41
+ ], ChecklistTemplateItem.prototype, "detailType", void 0);
42
+ tslib_1.__decorate([
43
+ (0, typeorm_1.ManyToOne)(type => checklist_template_1.ChecklistTemplate),
44
+ (0, type_graphql_1.Field)(type => checklist_template_1.ChecklistTemplate, { nullable: true }),
45
+ tslib_1.__metadata("design:type", checklist_template_1.ChecklistTemplate)
46
+ ], ChecklistTemplateItem.prototype, "checklistTemplate", void 0);
47
+ tslib_1.__decorate([
48
+ (0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.checklistTemplate),
49
+ tslib_1.__metadata("design:type", String)
50
+ ], ChecklistTemplateItem.prototype, "checklistTemplateId", void 0);
51
+ tslib_1.__decorate([
52
+ (0, typeorm_1.CreateDateColumn)(),
53
+ (0, type_graphql_1.Field)({ nullable: true }),
54
+ tslib_1.__metadata("design:type", Date)
55
+ ], ChecklistTemplateItem.prototype, "createdAt", void 0);
56
+ tslib_1.__decorate([
57
+ (0, typeorm_1.UpdateDateColumn)(),
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ tslib_1.__metadata("design:type", Date)
60
+ ], ChecklistTemplateItem.prototype, "updatedAt", void 0);
61
+ tslib_1.__decorate([
62
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
63
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
64
+ tslib_1.__metadata("design:type", auth_base_1.User)
65
+ ], ChecklistTemplateItem.prototype, "creator", void 0);
66
+ tslib_1.__decorate([
67
+ (0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.creator),
68
+ tslib_1.__metadata("design:type", String)
69
+ ], ChecklistTemplateItem.prototype, "creatorId", void 0);
70
+ tslib_1.__decorate([
71
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
72
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
73
+ tslib_1.__metadata("design:type", auth_base_1.User)
74
+ ], ChecklistTemplateItem.prototype, "updater", void 0);
75
+ tslib_1.__decorate([
76
+ (0, typeorm_1.RelationId)((checklistTemplateItem) => checklistTemplateItem.updater),
77
+ tslib_1.__metadata("design:type", String)
78
+ ], ChecklistTemplateItem.prototype, "updaterId", void 0);
79
+ ChecklistTemplateItem = tslib_1.__decorate([
80
+ (0, typeorm_1.Entity)({ comment: '체크리스트 템플릿 아이템' }),
81
+ (0, typeorm_1.Index)('ix_checklist_template_item_0', (checklistTemplateItem) => [checklistTemplateItem.name], {
82
+ unique: true
83
+ }),
84
+ (0, type_graphql_1.ObjectType)()
85
+ ], ChecklistTemplateItem);
86
+ exports.ChecklistTemplateItem = ChecklistTemplateItem;
87
+ //# sourceMappingURL=checklist-template-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-template-item.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/checklist-template-item.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAyD;AAEzD,yDAAgD;AAChD,iFAA4E;AAC5E,qEAAwE;AAOjE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB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","sourcesContent":["import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, ID, Int } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistTemplate } from '../checklist-template/checklist-template'\nimport { ChecklistTypeMainType } from '../checklist-type/checklist-type'\n\n@Entity({ comment: '체크리스트 템플릿 아이템' })\n@Index('ix_checklist_template_item_0', (checklistTemplateItem: ChecklistTemplateItem) => [checklistTemplateItem.name], {\n unique: true\n})\n@ObjectType()\nexport class ChecklistTemplateItem {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: false, comment: '검사 항목' })\n @Field({ nullable: false })\n name: string\n\n @Column({ nullable: true, comment: '검사 기준' })\n @Field({ nullable: true })\n inspctionCriteria?: string\n\n @Column({ nullable: true, comment: '시퀀스' })\n @Field(type => Int, { nullable: true })\n sequence?: number\n\n @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })\n @Field({ nullable: false })\n mainType: ChecklistTypeMainType\n\n @Column({ nullable: false, comment: '상세 구분' })\n @Field({ nullable: false })\n detailType: string\n\n // 체크리스트 템플릿 정보 (상위 테이블 참조)\n @ManyToOne(type => ChecklistTemplate)\n @Field(type => ChecklistTemplate, { nullable: true })\n checklistTemplate?: ChecklistTemplate\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.checklistTemplate)\n checklistTemplateId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistTemplateItem: ChecklistTemplateItem) => checklistTemplateItem.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { ChecklistTemplateItem } from './checklist-template-item';
2
+ import { ChecklistTemplateItemQuery } from './checklist-template-item-query';
3
+ import { ChecklistTemplateItemMutation } from './checklist-template-item-mutation';
4
+ export declare const entities: (typeof ChecklistTemplateItem)[];
5
+ export declare const resolvers: (typeof ChecklistTemplateItemQuery | typeof ChecklistTemplateItemMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const checklist_template_item_1 = require("./checklist-template-item");
5
+ const checklist_template_item_query_1 = require("./checklist-template-item-query");
6
+ const checklist_template_item_mutation_1 = require("./checklist-template-item-mutation");
7
+ exports.entities = [checklist_template_item_1.ChecklistTemplateItem];
8
+ exports.resolvers = [checklist_template_item_query_1.ChecklistTemplateItemQuery, checklist_template_item_mutation_1.ChecklistTemplateItemMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-template-item/index.ts"],"names":[],"mappings":";;;AAAA,uEAAiE;AACjE,mFAA4E;AAC5E,yFAAkF;AAErE,QAAA,QAAQ,GAAG,CAAC,+CAAqB,CAAC,CAAA;AAClC,QAAA,SAAS,GAAG,CAAC,0DAA0B,EAAE,gEAA6B,CAAC,CAAA","sourcesContent":["import { ChecklistTemplateItem } from './checklist-template-item'\nimport { ChecklistTemplateItemQuery } from './checklist-template-item-query'\nimport { ChecklistTemplateItemMutation } from './checklist-template-item-mutation'\n\nexport const entities = [ChecklistTemplateItem]\nexport const resolvers = [ChecklistTemplateItemQuery, ChecklistTemplateItemMutation]\n"]}
@@ -0,0 +1,6 @@
1
+ import { ChecklistType } from './checklist-type';
2
+ import { ChecklistTypePatch } from './checklist-type-type';
3
+ export declare class ChecklistTypeMutation {
4
+ updateMultipleChecklistType(patches: ChecklistTypePatch[], context: ResolverContext): Promise<ChecklistType[]>;
5
+ deleteChecklistTypes(ids: string[], context: ResolverContext): Promise<boolean>;
6
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistTypeMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const checklist_type_1 = require("./checklist-type");
8
+ const checklist_type_type_1 = require("./checklist-type-type");
9
+ let ChecklistTypeMutation = class ChecklistTypeMutation {
10
+ async updateMultipleChecklistType(patches, context) {
11
+ const { domain, user, tx } = context.state;
12
+ let results = [];
13
+ const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
14
+ const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
15
+ const checklistTypeRepo = tx.getRepository(checklist_type_1.ChecklistType);
16
+ if (_createRecords.length > 0) {
17
+ for (let i = 0; i < _createRecords.length; i++) {
18
+ const newRecord = _createRecords[i];
19
+ const result = await checklistTypeRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
20
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
21
+ }
22
+ }
23
+ if (_updateRecords.length > 0) {
24
+ for (let i = 0; i < _updateRecords.length; i++) {
25
+ const updateRecord = _updateRecords[i];
26
+ const checklistType = await checklistTypeRepo.findOneBy({ id: updateRecord.id });
27
+ const result = await checklistTypeRepo.save(Object.assign(Object.assign(Object.assign({}, checklistType), updateRecord), { updater: user }));
28
+ results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
29
+ }
30
+ }
31
+ return results;
32
+ }
33
+ async deleteChecklistTypes(ids, context) {
34
+ const { domain, tx } = context.state;
35
+ await tx.getRepository(checklist_type_1.ChecklistType).delete({
36
+ domain: { id: domain.id },
37
+ id: (0, typeorm_1.In)(ids)
38
+ });
39
+ return true;
40
+ }
41
+ };
42
+ tslib_1.__decorate([
43
+ (0, type_graphql_1.Directive)('@transaction'),
44
+ (0, type_graphql_1.Mutation)(returns => [checklist_type_1.ChecklistType], { description: "To modify multiple ChecklistTypes' information" }),
45
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [checklist_type_type_1.ChecklistTypePatch])),
46
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
47
+ tslib_1.__metadata("design:type", Function),
48
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
49
+ tslib_1.__metadata("design:returntype", Promise)
50
+ ], ChecklistTypeMutation.prototype, "updateMultipleChecklistType", null);
51
+ tslib_1.__decorate([
52
+ (0, type_graphql_1.Directive)('@transaction'),
53
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple ChecklistTypes' }),
54
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
55
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
56
+ tslib_1.__metadata("design:type", Function),
57
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
58
+ tslib_1.__metadata("design:returntype", Promise)
59
+ ], ChecklistTypeMutation.prototype, "deleteChecklistTypes", null);
60
+ ChecklistTypeMutation = tslib_1.__decorate([
61
+ (0, type_graphql_1.Resolver)(checklist_type_1.ChecklistType)
62
+ ], ChecklistTypeMutation);
63
+ exports.ChecklistTypeMutation = ChecklistTypeMutation;
64
+ //# sourceMappingURL=checklist-type-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-type-mutation.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,qDAAgD;AAChD,+DAA0D;AAGnD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAG1B,AAAN,KAAK,CAAC,2BAA2B,CACe,OAA6B,EACpE,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,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","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { ChecklistType } from './checklist-type'\nimport { ChecklistTypePatch } from './checklist-type-type'\n\n@Resolver(ChecklistType)\nexport class ChecklistTypeMutation {\n @Directive('@transaction')\n @Mutation(returns => [ChecklistType], { description: \"To modify multiple ChecklistTypes' information\" })\n async updateMultipleChecklistType(\n @Arg('patches', type => [ChecklistTypePatch]) patches: ChecklistTypePatch[],\n @Ctx() context: ResolverContext\n ): Promise<ChecklistType[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const checklistTypeRepo = tx.getRepository(ChecklistType)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await checklistTypeRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const checklistType = await checklistTypeRepo.findOneBy({ id: updateRecord.id })\n\n const result = await checklistTypeRepo.save({\n ...checklistType,\n ...updateRecord,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple ChecklistTypes' })\n async deleteChecklistTypes(@Arg('ids', type => [String]) ids: string[], @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ChecklistType).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { Domain, ListParam } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { ChecklistType } from './checklist-type';
4
+ import { ChecklistTypeList } from './checklist-type-type';
5
+ export declare class ChecklistTypeQuery {
6
+ checklistTypes(params: ListParam, context: ResolverContext): Promise<ChecklistTypeList>;
7
+ domain(checklistType: ChecklistType): Promise<Domain>;
8
+ updater(checklistType: ChecklistType): Promise<User>;
9
+ creator(checklistType: ChecklistType): Promise<User>;
10
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistTypeQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const checklist_type_1 = require("./checklist-type");
9
+ const checklist_type_type_1 = require("./checklist-type-type");
10
+ let ChecklistTypeQuery = class ChecklistTypeQuery {
11
+ async checklistTypes(params, context) {
12
+ const { domain } = context.state;
13
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
14
+ domain,
15
+ params,
16
+ repository: await (0, shell_1.getRepository)(checklist_type_1.ChecklistType),
17
+ searchables: ['name']
18
+ });
19
+ const [items, total] = await queryBuilder.getManyAndCount();
20
+ return { items, total };
21
+ }
22
+ async domain(checklistType) {
23
+ return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: checklistType.domainId });
24
+ }
25
+ async updater(checklistType) {
26
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistType.updaterId });
27
+ }
28
+ async creator(checklistType) {
29
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: checklistType.creatorId });
30
+ }
31
+ };
32
+ tslib_1.__decorate([
33
+ (0, type_graphql_1.Query)(returns => checklist_type_type_1.ChecklistTypeList, { description: 'To fetch multiple ChecklistTypes' }),
34
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
35
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
36
+ tslib_1.__metadata("design:type", Function),
37
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
38
+ tslib_1.__metadata("design:returntype", Promise)
39
+ ], ChecklistTypeQuery.prototype, "checklistTypes", null);
40
+ tslib_1.__decorate([
41
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
42
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
43
+ tslib_1.__metadata("design:type", Function),
44
+ tslib_1.__metadata("design:paramtypes", [checklist_type_1.ChecklistType]),
45
+ tslib_1.__metadata("design:returntype", Promise)
46
+ ], ChecklistTypeQuery.prototype, "domain", null);
47
+ tslib_1.__decorate([
48
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
49
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
50
+ tslib_1.__metadata("design:type", Function),
51
+ tslib_1.__metadata("design:paramtypes", [checklist_type_1.ChecklistType]),
52
+ tslib_1.__metadata("design:returntype", Promise)
53
+ ], ChecklistTypeQuery.prototype, "updater", null);
54
+ tslib_1.__decorate([
55
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
56
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
57
+ tslib_1.__metadata("design:type", Function),
58
+ tslib_1.__metadata("design:paramtypes", [checklist_type_1.ChecklistType]),
59
+ tslib_1.__metadata("design:returntype", Promise)
60
+ ], ChecklistTypeQuery.prototype, "creator", null);
61
+ ChecklistTypeQuery = tslib_1.__decorate([
62
+ (0, type_graphql_1.Resolver)(checklist_type_1.ChecklistType)
63
+ ], ChecklistTypeQuery);
64
+ exports.ChecklistTypeQuery = ChecklistTypeQuery;
65
+ //# sourceMappingURL=checklist-type-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-type-query.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8E;AAC9E,iDAAuG;AACvG,yDAAgD;AAChD,qDAAgD;AAChD,+DAAyD;AAGlD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAEvB,AAAN,KAAK,C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E,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;gDAEhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;iDAEjD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAgB,8BAAa;;iDAEjD;AA9BU,kBAAkB;IAD9B,IAAA,uBAAQ,EAAC,8BAAa,CAAC;GACX,kBAAkB,CA+B9B;AA/BY,gDAAkB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ChecklistType } from './checklist-type'\nimport { ChecklistTypeList } from './checklist-type-type'\n\n@Resolver(ChecklistType)\nexport class ChecklistTypeQuery {\n @Query(returns => ChecklistTypeList, { description: 'To fetch multiple ChecklistTypes' })\n async checklistTypes(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<ChecklistTypeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(ChecklistType),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() checklistType: ChecklistType): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: checklistType.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() checklistType: ChecklistType): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistType.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() checklistType: ChecklistType): Promise<User> {\n return await getRepository(User).findOneBy({ id: checklistType.creatorId })\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import { ChecklistType, ChecklistTypeMainType } from './checklist-type';
2
+ export declare class ChecklistTypePatch {
3
+ id?: string;
4
+ mainType: ChecklistTypeMainType;
5
+ detailType: string;
6
+ cuFlag?: string;
7
+ }
8
+ export declare class ChecklistTypeList {
9
+ items: ChecklistType[];
10
+ total: number;
11
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistTypeList = exports.ChecklistTypePatch = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const checklist_type_1 = require("./checklist-type");
7
+ let ChecklistTypePatch = class ChecklistTypePatch {
8
+ };
9
+ tslib_1.__decorate([
10
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
11
+ tslib_1.__metadata("design:type", String)
12
+ ], ChecklistTypePatch.prototype, "id", void 0);
13
+ tslib_1.__decorate([
14
+ (0, type_graphql_1.Field)({ nullable: true }),
15
+ tslib_1.__metadata("design:type", String)
16
+ ], ChecklistTypePatch.prototype, "mainType", void 0);
17
+ tslib_1.__decorate([
18
+ (0, type_graphql_1.Field)({ nullable: true }),
19
+ tslib_1.__metadata("design:type", String)
20
+ ], ChecklistTypePatch.prototype, "detailType", void 0);
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)({ nullable: true }),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], ChecklistTypePatch.prototype, "cuFlag", void 0);
25
+ ChecklistTypePatch = tslib_1.__decorate([
26
+ (0, type_graphql_1.InputType)()
27
+ ], ChecklistTypePatch);
28
+ exports.ChecklistTypePatch = ChecklistTypePatch;
29
+ let ChecklistTypeList = class ChecklistTypeList {
30
+ };
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)(type => [checklist_type_1.ChecklistType]),
33
+ tslib_1.__metadata("design:type", Array)
34
+ ], ChecklistTypeList.prototype, "items", void 0);
35
+ tslib_1.__decorate([
36
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
37
+ tslib_1.__metadata("design:type", Number)
38
+ ], ChecklistTypeList.prototype, "total", void 0);
39
+ ChecklistTypeList = tslib_1.__decorate([
40
+ (0, type_graphql_1.ObjectType)()
41
+ ], ChecklistTypeList);
42
+ exports.ChecklistTypeList = ChecklistTypeList;
43
+ //# sourceMappingURL=checklist-type-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-type-type.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AACpE,qDAAuE;AAGhE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAY9B,CAAA;AAXC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CAC3B;AAEX;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACK;AAE/B;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACR;AAElB;IAAC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACX;AAXJ,kBAAkB;IAD9B,IAAA,wBAAS,GAAE;GACC,kBAAkB,CAY9B;AAZY,gDAAkB;AAexB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAM7B,CAAA;AALC;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,8BAAa,CAAC,CAAC;;gDACT;AAEtB;IAAC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;gDACN;AALF,iBAAiB;IAD7B,IAAA,yBAAU,GAAE;GACA,iBAAiB,CAM7B;AANY,8CAAiB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\nimport { ChecklistType, ChecklistTypeMainType } from './checklist-type'\n\n@InputType()\nexport class ChecklistTypePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n mainType: ChecklistTypeMainType\n\n @Field({ nullable: true })\n detailType: string\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ChecklistTypeList {\n @Field(type => [ChecklistType])\n items: ChecklistType[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ export declare enum ChecklistTypeMainType {
4
+ BASIC = "10",
5
+ NON_BASIC = "20"
6
+ }
7
+ export declare class ChecklistType {
8
+ readonly id: string;
9
+ domain?: Domain;
10
+ domainId?: string;
11
+ mainType: ChecklistTypeMainType;
12
+ detailType: string;
13
+ createdAt?: Date;
14
+ updatedAt?: Date;
15
+ creator?: User;
16
+ creatorId?: string;
17
+ updater?: User;
18
+ updaterId?: string;
19
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChecklistType = exports.ChecklistTypeMainType = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ var ChecklistTypeMainType;
10
+ (function (ChecklistTypeMainType) {
11
+ ChecklistTypeMainType["BASIC"] = "10";
12
+ ChecklistTypeMainType["NON_BASIC"] = "20";
13
+ })(ChecklistTypeMainType = exports.ChecklistTypeMainType || (exports.ChecklistTypeMainType = {}));
14
+ (0, type_graphql_1.registerEnumType)(ChecklistTypeMainType, {
15
+ name: 'ChecklistTypeMainType',
16
+ description: '체크리스트 구분 메인 구분'
17
+ });
18
+ let ChecklistType = class ChecklistType {
19
+ };
20
+ tslib_1.__decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
22
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
23
+ tslib_1.__metadata("design:type", String)
24
+ ], ChecklistType.prototype, "id", void 0);
25
+ tslib_1.__decorate([
26
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
27
+ (0, type_graphql_1.Field)({ nullable: true }),
28
+ tslib_1.__metadata("design:type", shell_1.Domain)
29
+ ], ChecklistType.prototype, "domain", void 0);
30
+ tslib_1.__decorate([
31
+ (0, typeorm_1.RelationId)((checklistType) => checklistType.domain),
32
+ tslib_1.__metadata("design:type", String)
33
+ ], ChecklistType.prototype, "domainId", void 0);
34
+ tslib_1.__decorate([
35
+ (0, typeorm_1.Column)({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' }),
36
+ (0, type_graphql_1.Field)({ nullable: false }),
37
+ tslib_1.__metadata("design:type", String)
38
+ ], ChecklistType.prototype, "mainType", void 0);
39
+ tslib_1.__decorate([
40
+ (0, typeorm_1.Column)({ nullable: false, comment: '상세 구분' }),
41
+ (0, type_graphql_1.Field)({ nullable: false }),
42
+ tslib_1.__metadata("design:type", String)
43
+ ], ChecklistType.prototype, "detailType", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.CreateDateColumn)(),
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ tslib_1.__metadata("design:type", Date)
48
+ ], ChecklistType.prototype, "createdAt", void 0);
49
+ tslib_1.__decorate([
50
+ (0, typeorm_1.UpdateDateColumn)(),
51
+ (0, type_graphql_1.Field)({ nullable: true }),
52
+ tslib_1.__metadata("design:type", Date)
53
+ ], ChecklistType.prototype, "updatedAt", void 0);
54
+ tslib_1.__decorate([
55
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
56
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
57
+ tslib_1.__metadata("design:type", auth_base_1.User)
58
+ ], ChecklistType.prototype, "creator", void 0);
59
+ tslib_1.__decorate([
60
+ (0, typeorm_1.RelationId)((checklistType) => checklistType.creator),
61
+ tslib_1.__metadata("design:type", String)
62
+ ], ChecklistType.prototype, "creatorId", void 0);
63
+ tslib_1.__decorate([
64
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
65
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
66
+ tslib_1.__metadata("design:type", auth_base_1.User)
67
+ ], ChecklistType.prototype, "updater", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.RelationId)((checklistType) => checklistType.updater),
70
+ tslib_1.__metadata("design:type", String)
71
+ ], ChecklistType.prototype, "updaterId", void 0);
72
+ ChecklistType = tslib_1.__decorate([
73
+ (0, typeorm_1.Entity)({ comment: '체크리스트 구분' }),
74
+ (0, typeorm_1.Index)('ix_checklist_type_0', (checklistType) => [checklistType.domain, checklistType.mainType, checklistType.detailType], { unique: true }),
75
+ (0, type_graphql_1.ObjectType)()
76
+ ], ChecklistType);
77
+ exports.ChecklistType = ChecklistType;
78
+ //# sourceMappingURL=checklist-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-type.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAsE;AACtE,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,qCAAY,CAAA;IACZ,yCAAgB,CAAA;AAClB,CAAC,EAHW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAGhC;AAED,IAAA,+BAAgB,EAAC,qBAAqB,EAAE;IACtC,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAA;AASK,IAAM,aAAa,GAAnB,MAAM,aAAa;CAyCzB,CAAA;AAxCC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;yCACC;AAEnB;IAAC,IAAA,m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oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;8CAAA;AAEd;IAAC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;AAxCP,aAAa;IAPzB,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,eAAK,EACJ,qBAAqB,EACrB,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,EAC1G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,GAAE;GACA,aAAa,CAyCzB;AAzCY,sCAAa","sourcesContent":["import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\n\nregisterEnumType(ChecklistTypeMainType, {\n name: 'ChecklistTypeMainType',\n description: '체크리스트 구분 메인 구분'\n})\n\n@Entity({ comment: '체크리스트 구분' })\n@Index(\n 'ix_checklist_type_0',\n (checklistType: ChecklistType) => [checklistType.domain, checklistType.mainType, checklistType.detailType],\n { unique: true }\n)\n@ObjectType()\nexport class ChecklistType {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((checklistType: ChecklistType) => checklistType.domain)\n domainId?: string\n\n @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })\n @Field({ nullable: false })\n mainType: ChecklistTypeMainType\n\n @Column({ nullable: false, comment: '상세 구분' })\n @Field({ nullable: false })\n detailType: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistType: ChecklistType) => checklistType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistType: ChecklistType) => checklistType.updater)\n updaterId?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { ChecklistType } from './checklist-type';
2
+ import { ChecklistTypeQuery } from './checklist-type-query';
3
+ import { ChecklistTypeMutation } from './checklist-type-mutation';
4
+ export declare const entities: (typeof ChecklistType)[];
5
+ export declare const resolvers: (typeof ChecklistTypeQuery | typeof ChecklistTypeMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const checklist_type_1 = require("./checklist-type");
5
+ const checklist_type_query_1 = require("./checklist-type-query");
6
+ const checklist_type_mutation_1 = require("./checklist-type-mutation");
7
+ exports.entities = [checklist_type_1.ChecklistType];
8
+ exports.resolvers = [checklist_type_query_1.ChecklistTypeQuery, checklist_type_mutation_1.ChecklistTypeMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-type/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,iEAA2D;AAC3D,uEAAiE;AAEpD,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA","sourcesContent":["import { ChecklistType } from './checklist-type'\nimport { ChecklistTypeQuery } from './checklist-type-query'\nimport { ChecklistTypeMutation } from './checklist-type-mutation'\n\nexport const entities = [ChecklistType]\nexport const resolvers = [ChecklistTypeQuery, ChecklistTypeMutation]\n"]}
@@ -1,10 +1,15 @@
1
1
  export * from './action-plan/action-plan';
2
2
  export * from './issue/issue';
3
- export * from './check-item/check-item';
4
3
  export * from './project-report/project-report';
5
4
  export * from './supervisor/supervisor';
6
- export declare const entities: (typeof import("./project-report/project-report").ProjectReport | typeof import("./supervisor/supervisor").Supervisor | typeof import("./check-item/check-item").CheckItem | typeof import("./issue/issue").Issue | typeof import("./action-plan/action-plan").ActionPlan)[];
5
+ export * from './checklist-type/checklist-type';
6
+ export * from './checklist/checklist';
7
+ export * from './checklist-item/checklist-item';
8
+ export * from './checklist-template/checklist-template';
9
+ export * from './checklist-template-item/checklist-template-item';
10
+ export * from './building-inspection/building-inspection';
11
+ export declare const entities: (typeof import("./issue/issue").Issue | typeof import("./action-plan/action-plan").ActionPlan | typeof import("./supervisor/supervisor").Supervisor | typeof import("./project-report/project-report").ProjectReport | typeof import("./checklist-type/checklist-type").ChecklistType | typeof import("./checklist-item/checklist-item").ChecklistItem | typeof import("./checklist/checklist").Checklist | typeof import("./building-inspection/building-inspection").BuildingInspection | typeof import("./checklist-template-item/checklist-template-item").ChecklistTemplateItem | typeof import("./checklist-template/checklist-template").ChecklistTemplate | typeof import("./checklist/checklist-history").ChecklistHistory | typeof import("./building-inspection/building-inspection-history").BuildingInspectionHistory)[];
7
12
  export declare const subscribers: any[];
8
13
  export declare const schema: {
9
- resolverClasses: (typeof import("./action-plan/action-plan-query").ActionPlanQuery | typeof import("./action-plan/action-plan-mutation").ActionPlanMutation | typeof import("./issue/issue-query").IssueQuery | typeof import("./issue/issue-mutation").IssueMutation | typeof import("./check-item/check-item-query").CheckItemQuery | typeof import("./check-item/check-item-mutation").CheckItemMutation | typeof import("./project-report/project-report-query").ProjectReportQuery | typeof import("./project-report/project-report-mutation").ProjectReportMutation | typeof import("./supervisor/supervisor-query").SupervisorQuery | typeof import("./supervisor/supervisor-mutation").SupervisorMutation)[];
14
+ resolverClasses: typeof import("./checklist-item/checklist-item-mutation").ChecklistItemMutation[];
10
15
  };