@dssp/supervision 0.0.9 → 0.0.10

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 +186 -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 +443 -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 +21 -0
  12. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +187 -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 +434 -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 +8 -0
  49. package/dist-server/service/building-inspection/building-inspection-mutation.js +148 -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 +43 -0
  55. package/dist-server/service/building-inspection/building-inspection-type.js +153 -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 +25 -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 +147 -0
  163. package/server/service/building-inspection/building-inspection-query.ts +202 -0
  164. package/server/service/building-inspection/building-inspection-type.ts +101 -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 +59 -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,229 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@operato/data-grist';
4
+ import { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles';
5
+ import { PageView } from '@operato/shell';
6
+ import { css, html } from 'lit';
7
+ import { customElement, query, state } from 'lit/decorators.js';
8
+ import { ScopedElementsMixin } from '@open-wc/scoped-elements';
9
+ import { DataGrist } from '@operato/data-grist';
10
+ import { client } from '@operato/graphql';
11
+ import { notify } from '@operato/layout';
12
+ import gql from 'graphql-tag';
13
+ export var ChecklistTypeMainType;
14
+ (function (ChecklistTypeMainType) {
15
+ ChecklistTypeMainType["BASIC"] = "10";
16
+ ChecklistTypeMainType["NON_BASIC"] = "20";
17
+ })(ChecklistTypeMainType || (ChecklistTypeMainType = {}));
18
+ export const CHECKLIST_MAIN_TYPE_LIST = {
19
+ [ChecklistTypeMainType.BASIC]: '기본 업무',
20
+ [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'
21
+ };
22
+ let ChecklistTypeManagement = class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {
23
+ get context() {
24
+ return {
25
+ title: '체크리스트 구분 관리',
26
+ search: {
27
+ handler: (search) => {
28
+ this.grist.searchText = search;
29
+ },
30
+ value: this.grist.searchText
31
+ },
32
+ filter: {
33
+ handler: () => {
34
+ this.grist.toggleHeadroom();
35
+ }
36
+ },
37
+ actions: [
38
+ Object.assign({ title: '저장', action: this._updateChecklistType.bind(this) }, CommonButtonStyles.submit),
39
+ Object.assign({ title: '삭제', action: this._deleteChecklistType.bind(this) }, CommonButtonStyles.delete)
40
+ ]
41
+ };
42
+ }
43
+ render() {
44
+ return html `
45
+ <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
46
+ <div slot="headroom">
47
+ <div id="filters">
48
+ <ox-filters-form autofocus></ox-filters-form>
49
+ </div>
50
+ </div>
51
+ </ox-grist>
52
+ `;
53
+ }
54
+ async pageInitialized(lifecycle) {
55
+ this.gristConfig = {
56
+ columns: [
57
+ { type: 'gutter', gutterName: 'sequence' },
58
+ { type: 'gutter', gutterName: 'row-selector', multiple: true },
59
+ {
60
+ type: 'select',
61
+ name: 'mainType',
62
+ header: '메인 구분',
63
+ record: {
64
+ editable: true,
65
+ options: [{ display: '', value: '' }].concat(Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key })))
66
+ },
67
+ filter: 'search',
68
+ sortable: true,
69
+ width: 150
70
+ },
71
+ {
72
+ type: 'string',
73
+ name: 'detailType',
74
+ header: '상세 구분',
75
+ record: {
76
+ editable: true
77
+ },
78
+ filter: 'search',
79
+ sortable: true,
80
+ width: 250
81
+ },
82
+ {
83
+ type: 'resource-object',
84
+ name: 'updater',
85
+ header: '수정자',
86
+ record: {
87
+ editable: false
88
+ },
89
+ width: 120
90
+ },
91
+ {
92
+ type: 'datetime',
93
+ name: 'updatedAt',
94
+ header: '수정일시',
95
+ record: {
96
+ editable: false
97
+ },
98
+ sortable: true,
99
+ width: 180
100
+ }
101
+ ],
102
+ rows: {
103
+ selectable: {
104
+ multiple: true
105
+ },
106
+ classifier: (record, rowIndex) => {
107
+ return {
108
+ emphasized: record.mainType == ChecklistTypeMainType.BASIC
109
+ ? ['var(--grid-record-odd-background-color)', 'var(--grid-record-color)']
110
+ : ['var(--grid-record-background-color)', 'var(--grid-record-color)']
111
+ };
112
+ }
113
+ },
114
+ sorters: [{ name: 'mainType' }, { name: 'updatedAt', desc: true }, { name: 'detailType' }]
115
+ };
116
+ }
117
+ async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
118
+ const response = await client.query({
119
+ query: gql `
120
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
121
+ responses: checklistTypes(filters: $filters, pagination: $pagination, sortings: $sortings) {
122
+ items {
123
+ id
124
+ mainType
125
+ detailType
126
+ updater {
127
+ id
128
+ name
129
+ }
130
+ updatedAt
131
+ }
132
+ total
133
+ }
134
+ }
135
+ `,
136
+ variables: {
137
+ filters,
138
+ pagination: { page, limit },
139
+ sortings
140
+ }
141
+ });
142
+ return {
143
+ total: response.data.responses.total || 0,
144
+ records: response.data.responses.items || []
145
+ };
146
+ }
147
+ async _deleteChecklistType() {
148
+ if (confirm('삭제하시겠습니까?')) {
149
+ const ids = this.grist.selected.map(record => record.id);
150
+ if (ids && ids.length > 0) {
151
+ const response = await client.mutate({
152
+ mutation: gql `
153
+ mutation ($ids: [String!]!) {
154
+ deleteChecklistTypes(ids: $ids)
155
+ }
156
+ `,
157
+ variables: {
158
+ ids
159
+ }
160
+ });
161
+ if (!response.errors) {
162
+ this.grist.fetch();
163
+ notify({ message: '삭제되었습니다.' });
164
+ }
165
+ }
166
+ }
167
+ }
168
+ async _updateChecklistType() {
169
+ let patches = this.grist.dirtyRecords;
170
+ if (patches && patches.length) {
171
+ patches = patches.map(patch => {
172
+ let patchField = patch.id ? { id: patch.id } : {};
173
+ const dirtyFields = patch.__dirtyfields__;
174
+ for (let key in dirtyFields) {
175
+ patchField[key] = dirtyFields[key].after;
176
+ }
177
+ patchField.cuFlag = patch.__dirty__;
178
+ return patchField;
179
+ });
180
+ const response = await client.mutate({
181
+ mutation: gql `
182
+ mutation ($patches: [ChecklistTypePatch!]!) {
183
+ updateMultipleChecklistType(patches: $patches) {
184
+ id
185
+ }
186
+ }
187
+ `,
188
+ variables: {
189
+ patches
190
+ }
191
+ });
192
+ if (!response.errors) {
193
+ this.grist.fetch();
194
+ notify({ message: '저장되었습니다.' });
195
+ }
196
+ else {
197
+ notify({ message: '저장에 실패하였습니다.', level: 'error' });
198
+ }
199
+ }
200
+ }
201
+ };
202
+ ChecklistTypeManagement.styles = [
203
+ ScrollbarStyles,
204
+ CommonGristStyles,
205
+ css `
206
+ :host {
207
+ display: flex;
208
+ flex-direction: column;
209
+
210
+ width: 100%;
211
+
212
+ --grid-record-emphasized-background-color: red;
213
+ --grid-record-emphasized-color: yellow;
214
+ }
215
+ `
216
+ ];
217
+ __decorate([
218
+ state(),
219
+ __metadata("design:type", Object)
220
+ ], ChecklistTypeManagement.prototype, "gristConfig", void 0);
221
+ __decorate([
222
+ query('ox-grist'),
223
+ __metadata("design:type", DataGrist)
224
+ ], ChecklistTypeManagement.prototype, "grist", void 0);
225
+ ChecklistTypeManagement = __decorate([
226
+ customElement('checklist-type-management')
227
+ ], ChecklistTypeManagement);
228
+ export { ChecklistTypeManagement };
229
+ //# sourceMappingURL=checklist-type-management.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checklist-type-management.js","sourceRoot":"","sources":["../../../client/pages/checklist-template/checklist-type-management.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,qCAAY,CAAA;IACZ,yCAAgB,CAAA;AAClB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,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,MAAM,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;aACpD;SACF;IACH,CAAC;;AAxNM,8BAAM,GAAG;IACd,eAAe;IACf,iBAAiB;IACjB,GAAG,CAAA;;;;;;;;;;KAUF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;4DAAyB;AACjC;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;sDAAA;AAlBjC,uBAAuB;IADnC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,uBAAuB,CA0NnC;SA1NY,uBAAuB","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/data-grist'\n\nimport { CommonGristStyles, CommonButtonStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, query, state } from 'lit/decorators.js'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { notify } from '@operato/layout'\nimport gql from 'graphql-tag'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\nexport const CHECKLIST_MAIN_TYPE_LIST = {\n [ChecklistTypeMainType.BASIC]: '기본 업무',\n [ChecklistTypeMainType.NON_BASIC]: '기본 외 업무'\n}\n\n@customElement('checklist-type-management')\nexport class ChecklistTypeManagement extends ScopedElementsMixin(PageView) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: red;\n --grid-record-emphasized-color: yellow;\n }\n `\n ]\n\n @state() private gristConfig: any\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: '체크리스트 구분 관리',\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n actions: [\n {\n title: '저장',\n action: this._updateChecklistType.bind(this),\n ...CommonButtonStyles.submit\n },\n {\n title: '삭제',\n action: this._deleteChecklistType.bind(this),\n ...CommonButtonStyles.delete\n }\n ]\n }\n }\n\n render() {\n return html`\n <ox-grist .mode=${'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\">\n <div id=\"filters\">\n <ox-filters-form autofocus></ox-filters-form>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'select',\n name: 'mainType',\n header: '메인 구분',\n record: {\n editable: true,\n options: [{ display: '', value: '' }].concat(\n Object.keys(CHECKLIST_MAIN_TYPE_LIST).map(key => ({ display: CHECKLIST_MAIN_TYPE_LIST[key], value: key }))\n )\n },\n filter: 'search',\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'detailType',\n header: '상세 구분',\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 250\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: '수정자',\n record: {\n editable: false\n },\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: '수정일시',\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n },\n classifier: (record, rowIndex) => {\n return {\n emphasized:\n record.mainType == ChecklistTypeMainType.BASIC\n ? ['var(--grid-record-odd-background-color)', 'var(--grid-record-color)']\n : ['var(--grid-record-background-color)', 'var(--grid-record-color)']\n }\n }\n },\n sorters: [{ name: 'mainType' }, { name: 'updatedAt', desc: true }, { name: 'detailType' }]\n }\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: checklistTypes(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n mainType\n detailType\n updater {\n id\n name\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n private async _deleteChecklistType() {\n if (confirm('삭제하시겠습니까?')) {\n const ids = this.grist.selected.map(record => record.id)\n if (ids && ids.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($ids: [String!]!) {\n deleteChecklistTypes(ids: $ids)\n }\n `,\n variables: {\n ids\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '삭제되었습니다.' })\n }\n }\n }\n }\n\n private async _updateChecklistType() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = patch.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ChecklistTypePatch!]!) {\n updateMultipleChecklistType(patches: $patches) {\n id\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({ message: '저장되었습니다.' })\n } else {\n notify({ message: '저장에 실패하였습니다.', level: 'error' })\n }\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- export default function route(page: string): "supervision-main" | "supervisor-list" | "project-report-list" | "check-item-list" | "issue-list" | "action-plan-list" | undefined;
1
+ export default function route(page: string): "checklist-type-management" | "checklist-template-list" | "building-inspection-list" | "building-inspection-detail-drawing" | "building-inspection-detail-checklist" | undefined;
@@ -1,22 +1,19 @@
1
1
  export default function route(page) {
2
2
  switch (page) {
3
- case 'supervision-main':
4
- import('./pages/main');
3
+ case 'checklist-template-list':
4
+ import('./pages/checklist-template/checklist-template-list');
5
5
  return page;
6
- case 'supervisor-list':
7
- import('./pages/supervisor/supervisor-list-page');
6
+ case 'checklist-type-management':
7
+ import('./pages/checklist-template/checklist-type-management');
8
8
  return page;
9
- case 'project-report-list':
10
- import('./pages/project-report/project-report-list-page');
9
+ case 'building-inspection-list':
10
+ import('./pages/building-inspection/building-inspection-list');
11
11
  return page;
12
- case 'check-item-list':
13
- import('./pages/check-item/check-item-list-page');
12
+ case 'building-inspection-detail-drawing':
13
+ import('./pages/building-inspection/building-inspection-detail-drawing');
14
14
  return page;
15
- case 'issue-list':
16
- import('./pages/issue/issue-list-page');
17
- return page;
18
- case 'action-plan-list':
19
- import('./pages/action-plan/action-plan-list-page');
15
+ case 'building-inspection-detail-checklist':
16
+ import('./pages/building-inspection/building-inspection-detail-checklist');
20
17
  return page;
21
18
  }
22
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;QACZ,KAAK,kBAAkB;YACrB,MAAM,CAAC,cAAc,CAAC,CAAA;YACtB,OAAO,IAAI,CAAA;QAEb,KAAK,iBAAiB;YACpB,MAAM,CAAC,yCAAyC,CAAC,CAAA;YACjD,OAAO,IAAI,CAAA;QAEb,KAAK,qBAAqB;YACxB,MAAM,CAAC,iDAAiD,CAAC,CAAA;YACzD,OAAO,IAAI,CAAA;QAEb,KAAK,iBAAiB;YACpB,MAAM,CAAC,yCAAyC,CAAC,CAAA;YACjD,OAAO,IAAI,CAAA;QAEb,KAAK,YAAY;YACf,MAAM,CAAC,+BAA+B,CAAC,CAAA;YACvC,OAAO,IAAI,CAAA;QAEb,KAAK,kBAAkB;YACrB,MAAM,CAAC,2CAA2C,CAAC,CAAA;YACnD,OAAO,IAAI,CAAA;KACd;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case 'supervision-main':\n import('./pages/main')\n return page\n \n case 'supervisor-list':\n import('./pages/supervisor/supervisor-list-page')\n return page\n \n case 'project-report-list':\n import('./pages/project-report/project-report-list-page')\n return page\n \n case 'check-item-list':\n import('./pages/check-item/check-item-list-page')\n return page\n \n case 'issue-list':\n import('./pages/issue/issue-list-page')\n return page\n \n case 'action-plan-list':\n import('./pages/action-plan/action-plan-list-page')\n return page\n }\n}\n"]}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE;QACZ,KAAK,yBAAyB;YAC5B,MAAM,CAAC,oDAAoD,CAAC,CAAA;YAC5D,OAAO,IAAI,CAAA;QAEb,KAAK,2BAA2B;YAC9B,MAAM,CAAC,sDAAsD,CAAC,CAAA;YAC9D,OAAO,IAAI,CAAA;QAEb,KAAK,0BAA0B;YAC7B,MAAM,CAAC,sDAAsD,CAAC,CAAA;YAC9D,OAAO,IAAI,CAAA;QAEb,KAAK,oCAAoC;YACvC,MAAM,CAAC,gEAAgE,CAAC,CAAA;YACxE,OAAO,IAAI,CAAA;QAEb,KAAK,sCAAsC;YACzC,MAAM,CAAC,kEAAkE,CAAC,CAAA;YAC1E,OAAO,IAAI,CAAA;KACd;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case 'checklist-template-list':\n import('./pages/checklist-template/checklist-template-list')\n return page\n\n case 'checklist-type-management':\n import('./pages/checklist-template/checklist-type-management')\n return page\n\n case 'building-inspection-list':\n import('./pages/building-inspection/building-inspection-list')\n return page\n\n case 'building-inspection-detail-drawing':\n import('./pages/building-inspection/building-inspection-detail-drawing')\n return page\n\n case 'building-inspection-detail-checklist':\n import('./pages/building-inspection/building-inspection-detail-checklist')\n return page\n }\n}\n"]}