@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
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js'
|
|
2
|
-
import '@operato/image-marker/ox-image-marker.js'
|
|
3
|
-
import '@operato/image-marker/ox-image-marker-view.js'
|
|
4
|
-
|
|
5
|
-
import gql from 'graphql-tag'
|
|
6
|
-
import { css, html, PropertyValues } from 'lit'
|
|
7
|
-
import { customElement, query, state } from 'lit/decorators.js'
|
|
8
|
-
import { consume } from '@lit/context'
|
|
9
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
10
|
-
|
|
11
|
-
import { PageView } from '@operato/shell'
|
|
12
|
-
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
13
|
-
import { PageLifecycle } from '@operato/shell/dist/src/app/pages/page-view'
|
|
14
|
-
import { client } from '@operato/graphql'
|
|
15
|
-
import { notify } from '@operato/layout'
|
|
16
|
-
import { Shape } from '@operato/image-marker'
|
|
17
|
-
|
|
18
|
-
import { DrawingImageProvider } from '@dssp/drawing/dist-client/drawing-management/drawing-image-provider.js'
|
|
19
|
-
|
|
20
|
-
import './component/building-inspection-detail-header'
|
|
21
|
-
import { BuildingInspectionStatus } from './building-inspection-list'
|
|
22
|
-
|
|
23
|
-
@customElement('building-inspection-detail-drawing')
|
|
24
|
-
export class BuildingInspectionDetailDrawing extends ScopedElementsMixin(PageView) {
|
|
25
|
-
static styles = [
|
|
26
|
-
ScrollbarStyles,
|
|
27
|
-
CommonGristStyles,
|
|
28
|
-
css`
|
|
29
|
-
:host {
|
|
30
|
-
display: grid;
|
|
31
|
-
grid-template-rows: 55px auto;
|
|
32
|
-
color: #4e5055;
|
|
33
|
-
|
|
34
|
-
width: 100%;
|
|
35
|
-
background-color: var(--md-sys-color-background, #f6f6f6);
|
|
36
|
-
overflow-y: auto;
|
|
37
|
-
|
|
38
|
-
--grid-record-emphasized-background-color: red;
|
|
39
|
-
--grid-record-emphasized-color: yellow;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
div[body] {
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
|
|
46
|
-
ox-image-marker-view {
|
|
47
|
-
width: 100%;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
dialog ox-image-marker-view {
|
|
52
|
-
width: 80vw;
|
|
53
|
-
height: 80vh;
|
|
54
|
-
}
|
|
55
|
-
`
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
@state() project: any = {}
|
|
59
|
-
@state() buildingInspection: any = {}
|
|
60
|
-
@state() buildingInspectionId: string = ''
|
|
61
|
-
@state() imageUrl?: string
|
|
62
|
-
@state() shapes: Shape[] = []
|
|
63
|
-
@state() linkUrl?: string
|
|
64
|
-
@state() linkShapes: Shape[] = []
|
|
65
|
-
|
|
66
|
-
@state() drawingImageProvider: DrawingImageProvider = new DrawingImageProvider()
|
|
67
|
-
// @consume({ context: OxUserPreferencesContext, subscribe: true })
|
|
68
|
-
|
|
69
|
-
@query('#image-marker') imageMarker!: any
|
|
70
|
-
@query('#link-viewer') linkViewer!: any
|
|
71
|
-
@query('dialog') dialog!: HTMLDialogElement
|
|
72
|
-
|
|
73
|
-
get context() {
|
|
74
|
-
return {
|
|
75
|
-
title: '검측 관리 상세 - 검측 도면'
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
connectedCallback(): void {
|
|
80
|
-
super.connectedCallback()
|
|
81
|
-
|
|
82
|
-
requestAnimationFrame(() => {
|
|
83
|
-
this.imageMarker.setImageProvider(this.drawingImageProvider)
|
|
84
|
-
this.linkViewer.setImageProvider(this.drawingImageProvider)
|
|
85
|
-
|
|
86
|
-
this.dialog.addEventListener('click', event => {
|
|
87
|
-
const rect = this.dialog.getBoundingClientRect()
|
|
88
|
-
const isInDialog =
|
|
89
|
-
rect.top <= event.clientY && event.clientY <= rect.bottom && rect.left <= event.clientX && event.clientX <= rect.right
|
|
90
|
-
|
|
91
|
-
// 다이아로그 내부를 클릭한 것이 아니면 다이아로그 닫기
|
|
92
|
-
if (!isInDialog) {
|
|
93
|
-
this.dialog.close()
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
disconnectedCallback(): void {
|
|
100
|
-
this.imageMarker?.setImageProvider(null)
|
|
101
|
-
this.linkViewer?.setImageProvider(null)
|
|
102
|
-
|
|
103
|
-
super.disconnectedCallback()
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
render() {
|
|
107
|
-
return html`
|
|
108
|
-
<building-inspection-detail-header
|
|
109
|
-
.buildingInspectionId=${this.buildingInspection?.id}
|
|
110
|
-
.buildingLevelId=${this.buildingInspection?.buildingLevel?.id}
|
|
111
|
-
.projectName=${this.project.name}
|
|
112
|
-
.buildingName=${this.buildingInspection?.buildingLevel?.building?.name}
|
|
113
|
-
.buildingLevelFloor=${this.buildingInspection?.buildingLevel?.floor}
|
|
114
|
-
></building-inspection-detail-header>
|
|
115
|
-
|
|
116
|
-
<div
|
|
117
|
-
body
|
|
118
|
-
@link-clicked=${async (e: CustomEvent) => {
|
|
119
|
-
this.linkViewer.reset()
|
|
120
|
-
|
|
121
|
-
const { link } = e.detail
|
|
122
|
-
const { id, type, symbol, box, dwgId } = JSON.parse(link)
|
|
123
|
-
const [x, y, width, height] = box?.split(',').map(Number) || []
|
|
124
|
-
|
|
125
|
-
this.linkUrl = `DWGID:${dwgId}`
|
|
126
|
-
this.linkShapes = [
|
|
127
|
-
{
|
|
128
|
-
id: id!,
|
|
129
|
-
type: 'link',
|
|
130
|
-
x,
|
|
131
|
-
y,
|
|
132
|
-
width,
|
|
133
|
-
height,
|
|
134
|
-
link: '{}'
|
|
135
|
-
}
|
|
136
|
-
]
|
|
137
|
-
|
|
138
|
-
if (this.dialog) {
|
|
139
|
-
this.dialog.showModal()
|
|
140
|
-
}
|
|
141
|
-
}}
|
|
142
|
-
>
|
|
143
|
-
${this.buildingInspection?.status == BuildingInspectionStatus.PASS
|
|
144
|
-
? html`<ox-image-marker-view
|
|
145
|
-
id="image-marker"
|
|
146
|
-
.imageUrl=${this.imageUrl}
|
|
147
|
-
.shapes=${this.shapes}
|
|
148
|
-
></ox-image-marker-view>`
|
|
149
|
-
: html` <ox-image-marker
|
|
150
|
-
id="image-marker"
|
|
151
|
-
.imageUrl=${this.imageUrl}
|
|
152
|
-
.shapes=${this.shapes}
|
|
153
|
-
@shapes-changed=${this.onClickMarkerSave}
|
|
154
|
-
.currentMode=${'view'}
|
|
155
|
-
></ox-image-marker>`}
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<dialog>
|
|
159
|
-
<ox-image-marker-view id="link-viewer" .imageUrl=${this.linkUrl} .shapes=${this.linkShapes}></ox-image-marker-view>
|
|
160
|
-
</dialog>
|
|
161
|
-
`
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
protected async updated(changes: PropertyValues): Promise<void> {
|
|
165
|
-
if (changes.has('buildingInspection') && this.buildingInspection?.checklist) {
|
|
166
|
-
// 1-1. 위치 정보 - 체크리스트에 들어가는 위치정보 텍스트
|
|
167
|
-
const location_1 = this.buildingInspection.checklist?.location
|
|
168
|
-
|
|
169
|
-
// 1-2. 위치 정보 - 실제 위치정보 텍스트 (동 + 층) - ID 필드를 사용하면 DB ID 필드입니다.
|
|
170
|
-
const location_building = this.buildingInspection.buildingLevel.building.name
|
|
171
|
-
const location_floor = this.buildingInspection.buildingLevel.floor
|
|
172
|
-
|
|
173
|
-
// 2. 평면도 pdf 파일
|
|
174
|
-
// mainDrawing {
|
|
175
|
-
// id
|
|
176
|
-
// name
|
|
177
|
-
// fullpath
|
|
178
|
-
// }
|
|
179
|
-
const mainDrawing = this.buildingInspection.buildingLevel.mainDrawing
|
|
180
|
-
|
|
181
|
-
// 3. 선택 도면
|
|
182
|
-
const inspectionDrawingType = this.buildingInspection.checklist.inspectionDrawingType
|
|
183
|
-
|
|
184
|
-
const shapes = JSON.parse(this.buildingInspection?.drawingMarker || null) || []
|
|
185
|
-
const markers = await this.drawingImageProvider.getMarkers(inspectionDrawingType)
|
|
186
|
-
|
|
187
|
-
this.imageUrl = String(inspectionDrawingType).normalize('NFC')
|
|
188
|
-
this.shapes = [...shapes, ...markers]
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
async pageUpdated(changes: any, lifecycle: PageLifecycle) {
|
|
193
|
-
if (this.active) {
|
|
194
|
-
this.buildingInspectionId = lifecycle.resourceId || ''
|
|
195
|
-
await this.initBuildingInspection(this.buildingInspectionId)
|
|
196
|
-
|
|
197
|
-
this.imageMarker.reset()
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
async initBuildingInspection(buildingInspectionId: string = '') {
|
|
202
|
-
const response = await client.query({
|
|
203
|
-
query: gql`
|
|
204
|
-
query BuildingInspection($buildingInspectionId: String!) {
|
|
205
|
-
buildingInspection(id: $buildingInspectionId) {
|
|
206
|
-
id
|
|
207
|
-
status
|
|
208
|
-
requestDate
|
|
209
|
-
drawingMarker
|
|
210
|
-
checklist {
|
|
211
|
-
location
|
|
212
|
-
inspectionDrawingType
|
|
213
|
-
}
|
|
214
|
-
buildingLevel {
|
|
215
|
-
id
|
|
216
|
-
floor
|
|
217
|
-
mainDrawing {
|
|
218
|
-
id
|
|
219
|
-
name
|
|
220
|
-
fullpath
|
|
221
|
-
}
|
|
222
|
-
mainDrawingImage
|
|
223
|
-
building {
|
|
224
|
-
id
|
|
225
|
-
name
|
|
226
|
-
buildingComplex {
|
|
227
|
-
id
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
`,
|
|
234
|
-
variables: {
|
|
235
|
-
buildingInspectionId
|
|
236
|
-
}
|
|
237
|
-
})
|
|
238
|
-
|
|
239
|
-
if (response.errors) return
|
|
240
|
-
|
|
241
|
-
this.buildingInspection = response.data.buildingInspection
|
|
242
|
-
|
|
243
|
-
await this._getProjectByBuildingComplexId(this.buildingInspection?.buildingLevel?.building?.buildingComplex?.id)
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
private async _getProjectByBuildingComplexId(buildingComplexId) {
|
|
247
|
-
const response = await client.query({
|
|
248
|
-
query: gql`
|
|
249
|
-
query ProjectByBuildingComplexId($buildingComplexId: String!) {
|
|
250
|
-
project: projectByBuildingComplexId(buildingComplexId: $buildingComplexId) {
|
|
251
|
-
id
|
|
252
|
-
name
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
`,
|
|
256
|
-
variables: {
|
|
257
|
-
buildingComplexId
|
|
258
|
-
}
|
|
259
|
-
})
|
|
260
|
-
|
|
261
|
-
if (response.errors) return
|
|
262
|
-
|
|
263
|
-
this.project = response.data.project
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
private async onClickMarkerSave(e) {
|
|
267
|
-
const response = await client.query({
|
|
268
|
-
query: gql`
|
|
269
|
-
mutation UpdateBuildingInspection($patch: UpdateBuildingInspectionDrawingMarker!) {
|
|
270
|
-
updateBuildingInspection(patch: $patch) {
|
|
271
|
-
id
|
|
272
|
-
drawingMarker
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
`,
|
|
276
|
-
variables: {
|
|
277
|
-
patch: {
|
|
278
|
-
id: this.buildingInspectionId,
|
|
279
|
-
drawingMarker: JSON.stringify(e.detail)
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
})
|
|
283
|
-
|
|
284
|
-
if (response.errors) return
|
|
285
|
-
|
|
286
|
-
notify({ message: '저장되었습니다.' })
|
|
287
|
-
}
|
|
288
|
-
}
|