@dssp/supervision 1.0.0-alpha.0 → 1.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -1
- package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -1
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +16 -11
- package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -1
- package/dist-client/pages/building-inspection/building-inspection-list.d.ts +2 -2
- package/dist-client/pages/building-inspection/building-inspection-list.js +2 -1
- package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -1
- package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -1
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js +3 -3
- package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -1
- package/dist-client/pages/building-inspection/inspection-create-popup.js +8 -5
- package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -1
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +46 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +930 -0
- package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +736 -0
- package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
- package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
- package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
- package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/checklist-view.d.ts +6 -0
- package/dist-client/pages/checklist/checklist-view.js +291 -185
- package/dist-client/pages/checklist/checklist-view.js.map +1 -1
- package/dist-client/pages/checklist/comment-list-popup.js.map +1 -1
- package/dist-client/pages/checklist/file-preview-popup.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-item.js +8 -3
- package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js +1 -1
- package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -1
- package/dist-client/pages/checklist-template/checklist-type-management.d.ts +2 -2
- package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -1
- package/dist-client/pages/issue/issue-importer.js.map +1 -1
- package/dist-client/pages/issue/issue-list-page.js.map +1 -1
- package/dist-client/pages/project-report/project-report-importer.js.map +1 -1
- package/dist-client/pages/project-report/project-report-list-page.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -1
- package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/route.js +3 -0
- package/dist-client/route.js.map +1 -1
- package/dist-client/stt/speech-to-text.d.ts +36 -0
- package/dist-client/stt/speech-to-text.js +89 -0
- package/dist-client/stt/speech-to-text.js.map +1 -0
- package/dist-client/stt/stt-utils.d.ts +28 -0
- package/dist-client/stt/stt-utils.js +146 -0
- package/dist-client/stt/stt-utils.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/middlewares/index.js +1 -2
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-mutation.js +2 -2
- package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-query.js +2 -2
- package/dist-server/service/action-plan/action-plan-query.js.map +1 -1
- package/dist-server/service/action-plan/action-plan-type.js +6 -6
- package/dist-server/service/action-plan/action-plan-type.js.map +1 -1
- package/dist-server/service/action-plan/action-plan.js +3 -3
- package/dist-server/service/action-plan/action-plan.js.map +1 -1
- package/dist-server/service/action-plan/index.d.ts +0 -1
- package/dist-server/service/action-plan/index.js +1 -2
- package/dist-server/service/action-plan/index.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-history.js +2 -2
- package/dist-server/service/building-inspection/building-inspection-history.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +1 -0
- package/dist-server/service/building-inspection/building-inspection-mutation.js +91 -14
- package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-query.d.ts +2 -1
- package/dist-server/service/building-inspection/building-inspection-query.js +33 -4
- package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection-type.d.ts +10 -3
- package/dist-server/service/building-inspection/building-inspection-type.js +45 -20
- package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -1
- package/dist-server/service/building-inspection/building-inspection.d.ts +9 -0
- package/dist-server/service/building-inspection/building-inspection.js +43 -5
- package/dist-server/service/building-inspection/building-inspection.js.map +1 -1
- package/dist-server/service/building-inspection/index.d.ts +2 -4
- package/dist-server/service/building-inspection/index.js +2 -4
- package/dist-server/service/building-inspection/index.js.map +1 -1
- package/dist-server/service/checklist/checklist-history.d.ts +8 -0
- package/dist-server/service/checklist/checklist-history.js +38 -2
- package/dist-server/service/checklist/checklist-history.js.map +1 -1
- package/dist-server/service/checklist/checklist-mutation.js +2 -2
- package/dist-server/service/checklist/checklist-mutation.js.map +1 -1
- package/dist-server/service/checklist/checklist-query.js +2 -2
- package/dist-server/service/checklist/checklist-query.js.map +1 -1
- package/dist-server/service/checklist/checklist-type.js +6 -6
- package/dist-server/service/checklist/checklist-type.js.map +1 -1
- package/dist-server/service/checklist/checklist.d.ts +19 -1
- package/dist-server/service/checklist/checklist.js +78 -7
- package/dist-server/service/checklist/checklist.js.map +1 -1
- package/dist-server/service/checklist/index.d.ts +0 -2
- package/dist-server/service/checklist/index.js +1 -3
- package/dist-server/service/checklist/index.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-mutation.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-query.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item-type.js +2 -2
- package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -1
- package/dist-server/service/checklist-item/checklist-item.js +3 -3
- package/dist-server/service/checklist-item/checklist-item.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +6 -6
- package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -1
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js +2 -2
- package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -1
- package/dist-server/service/checklist-item-comment/index.d.ts +0 -2
- package/dist-server/service/checklist-item-comment/index.js +1 -3
- package/dist-server/service/checklist-item-comment/index.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-mutation.js +2 -2
- package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-query.js +2 -2
- package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template-type.js +4 -4
- package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -1
- package/dist-server/service/checklist-template/checklist-template.js +2 -2
- package/dist-server/service/checklist-template/checklist-template.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +2 -2
- package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js +2 -2
- package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js +4 -4
- package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -1
- package/dist-server/service/checklist-template-item/checklist-template-item.js +4 -6
- package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-mutation.js +2 -2
- package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-query.js +2 -2
- package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type-type.js +4 -4
- package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -1
- package/dist-server/service/checklist-type/checklist-type.js +3 -3
- package/dist-server/service/checklist-type/checklist-type.js.map +1 -1
- package/dist-server/service/index.d.ts +0 -1
- package/dist-server/service/index.js +1 -11
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/issue/index.d.ts +0 -1
- package/dist-server/service/issue/index.js +1 -2
- package/dist-server/service/issue/index.js.map +1 -1
- package/dist-server/service/issue/issue-mutation.js +2 -2
- package/dist-server/service/issue/issue-mutation.js.map +1 -1
- package/dist-server/service/issue/issue-query.js +2 -2
- package/dist-server/service/issue/issue-query.js.map +1 -1
- package/dist-server/service/issue/issue-type.js +6 -6
- package/dist-server/service/issue/issue-type.js.map +1 -1
- package/dist-server/service/issue/issue.js +3 -3
- package/dist-server/service/issue/issue.js.map +1 -1
- package/dist-server/service/project-report/index.d.ts +0 -1
- package/dist-server/service/project-report/index.js +1 -2
- package/dist-server/service/project-report/index.js.map +1 -1
- package/dist-server/service/project-report/project-report-mutation.js +2 -2
- package/dist-server/service/project-report/project-report-mutation.js.map +1 -1
- package/dist-server/service/project-report/project-report-query.js +2 -2
- package/dist-server/service/project-report/project-report-query.js.map +1 -1
- package/dist-server/service/project-report/project-report-type.js +6 -6
- package/dist-server/service/project-report/project-report-type.js.map +1 -1
- package/dist-server/service/project-report/project-report.js +3 -3
- package/dist-server/service/project-report/project-report.js.map +1 -1
- package/dist-server/service/supervisor/index.d.ts +0 -1
- package/dist-server/service/supervisor/index.js +1 -2
- package/dist-server/service/supervisor/index.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-mutation.js +2 -2
- package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-query.js +2 -2
- package/dist-server/service/supervisor/supervisor-query.js.map +1 -1
- package/dist-server/service/supervisor/supervisor-type.js +6 -6
- package/dist-server/service/supervisor/supervisor-type.js.map +1 -1
- package/dist-server/service/supervisor/supervisor.js +3 -3
- package/dist-server/service/supervisor/supervisor.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +13 -13
- package/things-factory.config.js +3 -1
- package/client/bootstrap.ts +0 -1
- package/client/index.ts +0 -0
- package/client/pages/action-plan/action-plan-importer.ts +0 -94
- package/client/pages/action-plan/action-plan-list-page.ts +0 -340
- package/client/pages/building-inspection/building-inspection-detail-camera.ts +0 -277
- package/client/pages/building-inspection/building-inspection-detail-checklist.ts +0 -258
- package/client/pages/building-inspection/building-inspection-detail-drawing.ts +0 -288
- package/client/pages/building-inspection/building-inspection-list.ts +0 -565
- package/client/pages/building-inspection/component/building-inspection-detail-header.ts +0 -123
- package/client/pages/building-inspection/component/inspection-event-provider.ts +0 -81
- package/client/pages/building-inspection/inspection-create-popup.ts +0 -785
- package/client/pages/checklist/attachment-list-popup.ts +0 -301
- package/client/pages/checklist/checklist-view.ts +0 -581
- package/client/pages/checklist/comment-list-popup.ts +0 -328
- package/client/pages/checklist/file-preview-popup.ts +0 -70
- package/client/pages/checklist-template/checklist-template-item.ts +0 -240
- package/client/pages/checklist-template/checklist-template-list.ts +0 -368
- package/client/pages/checklist-template/checklist-type-management.ts +0 -262
- package/client/pages/issue/issue-importer.ts +0 -94
- package/client/pages/issue/issue-list-page.ts +0 -340
- package/client/pages/project-report/project-report-importer.ts +0 -94
- package/client/pages/project-report/project-report-list-page.ts +0 -340
- package/client/pages/supervisor/supervisor-importer.ts +0 -94
- package/client/pages/supervisor/supervisor-list-page.ts +0 -340
- package/client/route.ts +0 -27
- package/client/tsconfig.json +0 -11
- package/dist-server/service/building-inspection/event-subscriber.d.ts +0 -7
- package/dist-server/service/building-inspection/event-subscriber.js +0 -21
- package/dist-server/service/building-inspection/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist/event-subscriber.js +0 -21
- package/dist-server/service/checklist/event-subscriber.js.map +0 -1
- package/dist-server/service/checklist-item-comment/event-subscriber.d.ts +0 -7
- package/dist-server/service/checklist-item-comment/event-subscriber.js +0 -21
- package/dist-server/service/checklist-item-comment/event-subscriber.js.map +0 -1
- package/server/controllers/index.ts +0 -0
- package/server/index.ts +0 -4
- package/server/middlewares/index.ts +0 -3
- package/server/migrations/index.ts +0 -9
- package/server/routes.ts +0 -28
- package/server/service/action-plan/action-plan-mutation.ts +0 -198
- package/server/service/action-plan/action-plan-query.ts +0 -62
- package/server/service/action-plan/action-plan-type.ts +0 -61
- package/server/service/action-plan/action-plan.ts +0 -103
- package/server/service/action-plan/index.ts +0 -7
- package/server/service/building-inspection/building-inspection-history.ts +0 -72
- package/server/service/building-inspection/building-inspection-mutation.ts +0 -276
- package/server/service/building-inspection/building-inspection-query.ts +0 -242
- package/server/service/building-inspection/building-inspection-type.ts +0 -145
- package/server/service/building-inspection/building-inspection.ts +0 -108
- package/server/service/building-inspection/event-subscriber.ts +0 -20
- package/server/service/building-inspection/index.ts +0 -11
- package/server/service/checklist/checklist-history.ts +0 -96
- package/server/service/checklist/checklist-mutation.ts +0 -103
- package/server/service/checklist/checklist-query.ts +0 -58
- package/server/service/checklist/checklist-type.ts +0 -49
- package/server/service/checklist/checklist.ts +0 -127
- package/server/service/checklist/event-subscriber.ts +0 -17
- package/server/service/checklist/index.ts +0 -9
- package/server/service/checklist-item/checklist-item-mutation.ts +0 -5
- package/server/service/checklist-item/checklist-item-query.ts +0 -84
- package/server/service/checklist-item/checklist-item-type.ts +0 -12
- package/server/service/checklist-item/checklist-item.ts +0 -103
- package/server/service/checklist-item/index.ts +0 -7
- package/server/service/checklist-item-comment/checklist-item-comment-history.ts +0 -69
- package/server/service/checklist-item-comment/checklist-item-comment-mutation.ts +0 -80
- package/server/service/checklist-item-comment/checklist-item-comment-query.ts +0 -36
- package/server/service/checklist-item-comment/checklist-item-comment-type.ts +0 -32
- package/server/service/checklist-item-comment/checklist-item-comment.ts +0 -56
- package/server/service/checklist-item-comment/event-subscriber.ts +0 -17
- package/server/service/checklist-item-comment/index.ts +0 -9
- package/server/service/checklist-template/checklist-template-mutation.ts +0 -66
- package/server/service/checklist-template/checklist-template-query.ts +0 -39
- package/server/service/checklist-template/checklist-template-type.ts +0 -23
- package/server/service/checklist-template/checklist-template.ts +0 -71
- package/server/service/checklist-template/index.ts +0 -6
- package/server/service/checklist-template-item/checklist-template-item-mutation.ts +0 -64
- package/server/service/checklist-template-item/checklist-template-item-query.ts +0 -44
- package/server/service/checklist-template-item/checklist-template-item-type.ts +0 -39
- package/server/service/checklist-template-item/checklist-template-item.ts +0 -68
- package/server/service/checklist-template-item/index.ts +0 -6
- package/server/service/checklist-type/checklist-type-mutation.ts +0 -66
- package/server/service/checklist-type/checklist-type-query.ts +0 -39
- package/server/service/checklist-type/checklist-type-type.ts +0 -26
- package/server/service/checklist-type/checklist-type.ts +0 -64
- package/server/service/checklist-type/index.ts +0 -6
- package/server/service/index.ts +0 -88
- package/server/service/issue/index.ts +0 -7
- package/server/service/issue/issue-mutation.ts +0 -198
- package/server/service/issue/issue-query.ts +0 -62
- package/server/service/issue/issue-type.ts +0 -61
- package/server/service/issue/issue.ts +0 -100
- package/server/service/project-report/index.ts +0 -7
- package/server/service/project-report/project-report-mutation.ts +0 -198
- package/server/service/project-report/project-report-query.ts +0 -62
- package/server/service/project-report/project-report-type.ts +0 -61
- package/server/service/project-report/project-report.ts +0 -113
- package/server/service/supervisor/index.ts +0 -7
- package/server/service/supervisor/supervisor-mutation.ts +0 -198
- package/server/service/supervisor/supervisor-query.ts +0 -62
- package/server/service/supervisor/supervisor-type.ts +0 -61
- package/server/service/supervisor/supervisor.ts +0 -108
- package/server/tsconfig.json +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dssp/supervision",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.14",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@dssp/building-complex": "^1.0.0-alpha.
|
|
31
|
-
"@dssp/drawing": "^1.0.0-alpha.
|
|
32
|
-
"@dssp/project": "^1.0.0-alpha.
|
|
33
|
-
"@operato/event-view": "^
|
|
34
|
-
"@operato/graphql": "^
|
|
35
|
-
"@operato/image-marker": "^
|
|
36
|
-
"@operato/input": "^
|
|
37
|
-
"@operato/mini-map": "^
|
|
38
|
-
"@operato/shell": "^
|
|
39
|
-
"@things-factory/auth-base": "^
|
|
40
|
-
"@things-factory/shell": "^
|
|
30
|
+
"@dssp/building-complex": "^1.0.0-alpha.14",
|
|
31
|
+
"@dssp/drawing": "^1.0.0-alpha.14",
|
|
32
|
+
"@dssp/project": "^1.0.0-alpha.14",
|
|
33
|
+
"@operato/event-view": "^9.0.0",
|
|
34
|
+
"@operato/graphql": "^9.0.0",
|
|
35
|
+
"@operato/image-marker": "^9.0.0",
|
|
36
|
+
"@operato/input": "^9.0.0",
|
|
37
|
+
"@operato/mini-map": "^9.0.0",
|
|
38
|
+
"@operato/shell": "^9.0.0",
|
|
39
|
+
"@things-factory/auth-base": "^9.0.0",
|
|
40
|
+
"@things-factory/shell": "^9.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2fc9ebbb4baf7a1d020fde7b0ea6ab5da24aa708"
|
|
43
43
|
}
|
package/things-factory.config.js
CHANGED
|
@@ -9,7 +9,9 @@ export default {
|
|
|
9
9
|
'building-inspection-list', // 층 검측 현황
|
|
10
10
|
'building-inspection-detail-drawing', // 층 검측 상세 - 검측 도면
|
|
11
11
|
'building-inspection-detail-checklist', // 층 검측 상세 - 검측 체크리스트
|
|
12
|
-
'building-inspection-detail-camera' // 층 검측 상세 - 사진 촬영
|
|
12
|
+
'building-inspection-detail-camera', // 층 검측 상세 - 사진 촬영
|
|
13
|
+
|
|
14
|
+
'building-inspection-grid-detail' // 동별 시공검측 상세 정보 (단국대)
|
|
13
15
|
].map(page => {
|
|
14
16
|
return {
|
|
15
17
|
page,
|
package/client/bootstrap.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function bootstrap() {}
|
package/client/index.ts
DELETED
|
File without changes
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import '@material/web/button/elevated-button.js'
|
|
2
|
-
import '@operato/data-grist'
|
|
3
|
-
|
|
4
|
-
import gql from 'graphql-tag'
|
|
5
|
-
import { css, html, LitElement } from 'lit'
|
|
6
|
-
import { property, state } from 'lit/decorators.js'
|
|
7
|
-
|
|
8
|
-
import { client } from '@operato/graphql'
|
|
9
|
-
import { i18next } from '@operato/i18n'
|
|
10
|
-
import { isMobileDevice } from '@operato/utils'
|
|
11
|
-
|
|
12
|
-
export class ActionPlanImporter extends LitElement {
|
|
13
|
-
static styles = [
|
|
14
|
-
css`
|
|
15
|
-
:host {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
|
|
19
|
-
background-color: #fff;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
ox-grist {
|
|
23
|
-
flex: 1;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.button-container {
|
|
27
|
-
display: flex;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
padding: var(--padding-default);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
md-elevated-button {
|
|
33
|
-
margin-left: var(--margin-default);
|
|
34
|
-
}
|
|
35
|
-
`
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
@state() private actionPlans: any[] = []
|
|
39
|
-
@state() private columns = {
|
|
40
|
-
list: { fields: ['name', 'description'] },
|
|
41
|
-
pagination: { infinite: true },
|
|
42
|
-
columns: [
|
|
43
|
-
{
|
|
44
|
-
type: 'string',
|
|
45
|
-
name: 'name',
|
|
46
|
-
header: i18next.t('field.name'),
|
|
47
|
-
width: 150
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
type: 'string',
|
|
51
|
-
name: 'description',
|
|
52
|
-
header: i18next.t('field.description'),
|
|
53
|
-
width: 200
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: 'checkbox',
|
|
57
|
-
name: 'active',
|
|
58
|
-
header: i18next.t('field.active'),
|
|
59
|
-
width: 60
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
render() {
|
|
65
|
-
return html`
|
|
66
|
-
<ox-grist
|
|
67
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
68
|
-
.config=${this.columns}
|
|
69
|
-
.data=${{
|
|
70
|
-
records: this.actionPlans
|
|
71
|
-
}}
|
|
72
|
-
></ox-grist>
|
|
73
|
-
|
|
74
|
-
<div class="button-container">
|
|
75
|
-
<md-elevated-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</md-elevated-button>
|
|
76
|
-
</div>
|
|
77
|
-
`
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
private async save() {
|
|
81
|
-
const response = await client.mutate({
|
|
82
|
-
mutation: gql`
|
|
83
|
-
mutation importActionPlans($actionPlans: [ActionPlanPatch!]!) {
|
|
84
|
-
importActionPlans(actionPlans: $actionPlans)
|
|
85
|
-
}
|
|
86
|
-
`,
|
|
87
|
-
variables: { actionPlans: this.actionPlans }
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
if (response.errors?.length) return
|
|
91
|
-
|
|
92
|
-
this.dispatchEvent(new CustomEvent('imported'))
|
|
93
|
-
}
|
|
94
|
-
}
|
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '@operato/data-grist'
|
|
3
|
-
|
|
4
|
-
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
5
|
-
import { PageView, store } from '@operato/shell'
|
|
6
|
-
import { css, html } from 'lit'
|
|
7
|
-
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
8
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
9
|
-
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
10
|
-
import { client } from '@operato/graphql'
|
|
11
|
-
import { i18next, localize } from '@operato/i18n'
|
|
12
|
-
import { notify, openPopup } from '@operato/layout'
|
|
13
|
-
import { OxPopup, OxPrompt } from '@operato/popup'
|
|
14
|
-
import { isMobileDevice } from '@operato/utils'
|
|
15
|
-
|
|
16
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
17
|
-
import gql from 'graphql-tag'
|
|
18
|
-
|
|
19
|
-
import { ActionPlanImporter } from './action-plan-importer'
|
|
20
|
-
|
|
21
|
-
@customElement('action-plan-list-page')
|
|
22
|
-
export class ActionPlanListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
23
|
-
static styles = [
|
|
24
|
-
ScrollbarStyles,
|
|
25
|
-
CommonGristStyles,
|
|
26
|
-
css`
|
|
27
|
-
:host {
|
|
28
|
-
display: flex;
|
|
29
|
-
|
|
30
|
-
width: 100%;
|
|
31
|
-
|
|
32
|
-
--grid-record-emphasized-background-color: red;
|
|
33
|
-
--grid-record-emphasized-color: yellow;
|
|
34
|
-
}
|
|
35
|
-
`
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
static get scopedElements() {
|
|
39
|
-
return {
|
|
40
|
-
'action-plan-importer': ActionPlanImporter
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@state() private gristConfig: any
|
|
45
|
-
@state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
46
|
-
|
|
47
|
-
@query('ox-grist') private grist!: DataGrist
|
|
48
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
|
49
|
-
|
|
50
|
-
get context() {
|
|
51
|
-
return {
|
|
52
|
-
title: i18next.t('title.action-plan list'),
|
|
53
|
-
search: {
|
|
54
|
-
handler: (search: string) => {
|
|
55
|
-
this.grist.searchText = search
|
|
56
|
-
},
|
|
57
|
-
value: this.grist.searchText
|
|
58
|
-
},
|
|
59
|
-
filter: {
|
|
60
|
-
handler: () => {
|
|
61
|
-
this.grist.toggleHeadroom()
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
help: 'supervision/action-plan',
|
|
65
|
-
actions: [
|
|
66
|
-
{
|
|
67
|
-
title: i18next.t('button.save'),
|
|
68
|
-
action: this.updateActionPlan.bind(this),
|
|
69
|
-
...CommonButtonStyles.save
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
title: i18next.t('button.delete'),
|
|
73
|
-
action: this.deleteActionPlan.bind(this),
|
|
74
|
-
...CommonButtonStyles.delete
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
exportable: {
|
|
78
|
-
name: i18next.t('title.action-plan list'),
|
|
79
|
-
data: this.exportHandler.bind(this)
|
|
80
|
-
},
|
|
81
|
-
importable: {
|
|
82
|
-
handler: this.importHandler.bind(this)
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
render() {
|
|
88
|
-
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
89
|
-
|
|
90
|
-
return html`
|
|
91
|
-
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
92
|
-
<div slot="headroom">
|
|
93
|
-
<div id="filters">
|
|
94
|
-
<ox-filters-form autofocus></ox-filters-form>
|
|
95
|
-
</div>
|
|
96
|
-
|
|
97
|
-
<div id="sorters">
|
|
98
|
-
Sort
|
|
99
|
-
<md-icon
|
|
100
|
-
@click=${e => {
|
|
101
|
-
const target = e.currentTarget
|
|
102
|
-
this.sortersControl.open({
|
|
103
|
-
right: 0,
|
|
104
|
-
top: target.offsetTop + target.offsetHeight
|
|
105
|
-
})
|
|
106
|
-
}}
|
|
107
|
-
>expand_more</md-icon
|
|
108
|
-
>
|
|
109
|
-
<ox-popup id="sorter-control">
|
|
110
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
111
|
-
</ox-popup>
|
|
112
|
-
</div>
|
|
113
|
-
|
|
114
|
-
<div id="modes">
|
|
115
|
-
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
116
|
-
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
117
|
-
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
</ox-grist>
|
|
121
|
-
`
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
async pageInitialized(lifecycle: any) {
|
|
125
|
-
this.gristConfig = {
|
|
126
|
-
list: {
|
|
127
|
-
fields: ['name', 'description'],
|
|
128
|
-
details: ['active', 'updatedAt']
|
|
129
|
-
},
|
|
130
|
-
columns: [
|
|
131
|
-
{ type: 'gutter', gutterName: 'sequence' },
|
|
132
|
-
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
133
|
-
{
|
|
134
|
-
type: 'string',
|
|
135
|
-
name: 'name',
|
|
136
|
-
header: i18next.t('field.name'),
|
|
137
|
-
record: {
|
|
138
|
-
editable: true
|
|
139
|
-
},
|
|
140
|
-
filter: 'search',
|
|
141
|
-
sortable: true,
|
|
142
|
-
width: 150
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
type: 'string',
|
|
146
|
-
name: 'description',
|
|
147
|
-
header: i18next.t('field.description'),
|
|
148
|
-
record: {
|
|
149
|
-
editable: true
|
|
150
|
-
},
|
|
151
|
-
filter: 'search',
|
|
152
|
-
width: 200
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
type: 'checkbox',
|
|
156
|
-
name: 'active',
|
|
157
|
-
label: true,
|
|
158
|
-
header: i18next.t('field.active'),
|
|
159
|
-
record: {
|
|
160
|
-
editable: true
|
|
161
|
-
},
|
|
162
|
-
filter: true,
|
|
163
|
-
sortable: true,
|
|
164
|
-
width: 60
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
type: 'resource-object',
|
|
168
|
-
name: 'updater',
|
|
169
|
-
header: i18next.t('field.updater'),
|
|
170
|
-
record: {
|
|
171
|
-
editable: false
|
|
172
|
-
},
|
|
173
|
-
sortable: true,
|
|
174
|
-
width: 120
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
type: 'datetime',
|
|
178
|
-
name: 'updatedAt',
|
|
179
|
-
header: i18next.t('field.updated_at'),
|
|
180
|
-
record: {
|
|
181
|
-
editable: false
|
|
182
|
-
},
|
|
183
|
-
sortable: true,
|
|
184
|
-
width: 180
|
|
185
|
-
}
|
|
186
|
-
],
|
|
187
|
-
rows: {
|
|
188
|
-
selectable: {
|
|
189
|
-
multiple: true
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
sorters: [
|
|
193
|
-
{
|
|
194
|
-
name: 'name'
|
|
195
|
-
}
|
|
196
|
-
]
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
async pageUpdated(changes: any, lifecycle: any) {
|
|
201
|
-
if (this.active) {
|
|
202
|
-
// do something here when this page just became as active
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {
|
|
207
|
-
const response = await client.query({
|
|
208
|
-
query: gql`
|
|
209
|
-
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
210
|
-
responses: actionPlans(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
211
|
-
items {
|
|
212
|
-
id
|
|
213
|
-
name
|
|
214
|
-
description
|
|
215
|
-
active
|
|
216
|
-
updater {
|
|
217
|
-
id
|
|
218
|
-
name
|
|
219
|
-
}
|
|
220
|
-
updatedAt
|
|
221
|
-
}
|
|
222
|
-
total
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
`,
|
|
226
|
-
variables: {
|
|
227
|
-
filters,
|
|
228
|
-
pagination: { page, limit },
|
|
229
|
-
sortings
|
|
230
|
-
}
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
return {
|
|
234
|
-
total: response.data.responses.total || 0,
|
|
235
|
-
records: response.data.responses.items || []
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
private async deleteActionPlan() {
|
|
240
|
-
if (
|
|
241
|
-
await OxPrompt.open({
|
|
242
|
-
title: i18next.t('text.are_you_sure'),
|
|
243
|
-
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
244
|
-
confirmButton: { text: i18next.t('button.confirm') },
|
|
245
|
-
cancelButton: { text: i18next.t('button.cancel') }
|
|
246
|
-
})
|
|
247
|
-
) {
|
|
248
|
-
const ids = this.grist.selected.map(record => record.id)
|
|
249
|
-
if (ids && ids.length > 0) {
|
|
250
|
-
const response = await client.mutate({
|
|
251
|
-
mutation: gql`
|
|
252
|
-
mutation ($ids: [String!]!) {
|
|
253
|
-
deleteActionPlans(ids: $ids)
|
|
254
|
-
}
|
|
255
|
-
`,
|
|
256
|
-
variables: {
|
|
257
|
-
ids
|
|
258
|
-
}
|
|
259
|
-
})
|
|
260
|
-
|
|
261
|
-
if (!response.errors) {
|
|
262
|
-
this.grist.fetch()
|
|
263
|
-
notify({
|
|
264
|
-
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
265
|
-
})
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
private async updateActionPlan() {
|
|
272
|
-
let patches = this.grist.dirtyRecords
|
|
273
|
-
if (patches && patches.length) {
|
|
274
|
-
patches = patches.map(patch => {
|
|
275
|
-
let patchField: any = patch.id ? { id: patch.id } : {}
|
|
276
|
-
const dirtyFields = patch.__dirtyfields__
|
|
277
|
-
for (let key in dirtyFields) {
|
|
278
|
-
patchField[key] = dirtyFields[key].after
|
|
279
|
-
}
|
|
280
|
-
patchField.cuFlag = patch.__dirty__
|
|
281
|
-
|
|
282
|
-
return patchField
|
|
283
|
-
})
|
|
284
|
-
|
|
285
|
-
const response = await client.mutate({
|
|
286
|
-
mutation: gql`
|
|
287
|
-
mutation ($patches: [ActionPlanPatch!]!) {
|
|
288
|
-
updateMultipleActionPlan(patches: $patches) {
|
|
289
|
-
name
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
`,
|
|
293
|
-
variables: {
|
|
294
|
-
patches
|
|
295
|
-
}
|
|
296
|
-
})
|
|
297
|
-
|
|
298
|
-
if (!response.errors) {
|
|
299
|
-
this.grist.fetch()
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
private async exportHandler() {
|
|
305
|
-
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
|
|
306
|
-
const targetFieldSet = new Set(['id', 'name', 'description', 'active'])
|
|
307
|
-
|
|
308
|
-
return exportTargets.map(actionPlan => {
|
|
309
|
-
let tempObj = {}
|
|
310
|
-
for (const field of targetFieldSet) {
|
|
311
|
-
tempObj[field] = actionPlan[field]
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
return tempObj
|
|
315
|
-
})
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
private async importHandler(records) {
|
|
319
|
-
const popup = openPopup(
|
|
320
|
-
html`
|
|
321
|
-
<action-plan-importer
|
|
322
|
-
.actionPlans=${records}
|
|
323
|
-
@imported=${() => {
|
|
324
|
-
history.back()
|
|
325
|
-
this.grist.fetch()
|
|
326
|
-
}}
|
|
327
|
-
></action-plan-importer>
|
|
328
|
-
`,
|
|
329
|
-
{
|
|
330
|
-
backdrop: true,
|
|
331
|
-
size: 'large',
|
|
332
|
-
title: i18next.t('title.import action-plan')
|
|
333
|
-
}
|
|
334
|
-
)
|
|
335
|
-
|
|
336
|
-
popup.onclosed = () => {
|
|
337
|
-
this.grist.fetch()
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|