@things-factory/dataset 6.0.32 → 6.0.34

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 (73) hide show
  1. package/client/activities/activity-data-collect-edit.ts +100 -0
  2. package/client/activities/activity-data-collect-view.ts +1 -20
  3. package/client/activities/activity-ooc-resolve-edit.ts +174 -0
  4. package/client/activities/activity-ooc-resolve-view.ts +10 -37
  5. package/client/activities/activity-ooc-review-edit.ts +153 -0
  6. package/client/activities/activity-ooc-review-view.ts +10 -33
  7. package/client/bootstrap.ts +3 -0
  8. package/client/pages/data-set/data-set-list-page.ts +8 -8
  9. package/dist-client/activities/activity-data-collect-edit.d.ts +19 -0
  10. package/dist-client/activities/activity-data-collect-edit.js +101 -0
  11. package/dist-client/activities/activity-data-collect-edit.js.map +1 -0
  12. package/dist-client/activities/activity-data-collect-view.d.ts +0 -3
  13. package/dist-client/activities/activity-data-collect-view.js +2 -19
  14. package/dist-client/activities/activity-data-collect-view.js.map +1 -1
  15. package/dist-client/activities/activity-ooc-resolve-edit.d.ts +1 -0
  16. package/dist-client/activities/activity-ooc-resolve-edit.js +175 -0
  17. package/dist-client/activities/activity-ooc-resolve-edit.js.map +1 -0
  18. package/dist-client/activities/activity-ooc-resolve-view.js +12 -36
  19. package/dist-client/activities/activity-ooc-resolve-view.js.map +1 -1
  20. package/dist-client/activities/activity-ooc-review-edit.d.ts +1 -0
  21. package/dist-client/activities/activity-ooc-review-edit.js +155 -0
  22. package/dist-client/activities/activity-ooc-review-edit.js.map +1 -0
  23. package/dist-client/activities/activity-ooc-review-view.js +10 -29
  24. package/dist-client/activities/activity-ooc-review-view.js.map +1 -1
  25. package/dist-client/bootstrap.d.ts +3 -0
  26. package/dist-client/bootstrap.js +3 -0
  27. package/dist-client/bootstrap.js.map +1 -1
  28. package/dist-client/components/data-collect-activity-view.d.ts +19 -0
  29. package/dist-client/components/data-collect-activity-view.js +101 -0
  30. package/dist-client/components/data-collect-activity-view.js.map +1 -0
  31. package/dist-client/components/data-ooc-activity-view.d.ts +1 -0
  32. package/dist-client/components/data-ooc-activity-view.js +154 -0
  33. package/dist-client/components/data-ooc-activity-view.js.map +1 -0
  34. package/dist-client/components/ooc-resolve-activity-view.d.ts +1 -0
  35. package/dist-client/components/ooc-resolve-activity-view.js +175 -0
  36. package/dist-client/components/ooc-resolve-activity-view.js.map +1 -0
  37. package/dist-client/components/ooc-review-activity-view.d.ts +1 -0
  38. package/dist-client/components/ooc-review-activity-view.js +155 -0
  39. package/dist-client/components/ooc-review-activity-view.js.map +1 -0
  40. package/dist-client/pages/data-set/data-set-list-page.js +8 -8
  41. package/dist-client/pages/data-set/data-set-list-page.js.map +1 -1
  42. package/dist-client/tsconfig.tsbuildinfo +1 -1
  43. package/dist-server/activities/activity-data-collect.js +1 -1
  44. package/dist-server/activities/activity-data-collect.js.map +1 -1
  45. package/dist-server/activities/activity-ooc-resolve.js +2 -2
  46. package/dist-server/activities/activity-ooc-resolve.js.map +1 -1
  47. package/dist-server/activities/activity-ooc-review.js +2 -2
  48. package/dist-server/activities/activity-ooc-review.js.map +1 -1
  49. package/dist-server/controllers/activity-template/activity-data-collect.js +82 -0
  50. package/dist-server/controllers/activity-template/activity-data-collect.js.map +1 -0
  51. package/dist-server/controllers/activity-template/activity-ooc-resolve.js +100 -0
  52. package/dist-server/controllers/activity-template/activity-ooc-resolve.js.map +1 -0
  53. package/dist-server/controllers/activity-template/activity-ooc-review.js +107 -0
  54. package/dist-server/controllers/activity-template/activity-ooc-review.js.map +1 -0
  55. package/dist-server/controllers/activity-template/activity-ooc.js +59 -0
  56. package/dist-server/controllers/activity-template/activity-ooc.js.map +1 -0
  57. package/dist-server/routes.js +14 -4
  58. package/dist-server/routes.js.map +1 -1
  59. package/dist-server/service/data-set/data-set-mutation.js +8 -7
  60. package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
  61. package/dist-server/service/data-set/data-set-query.js +1 -1
  62. package/dist-server/service/data-set/data-set-query.js.map +1 -1
  63. package/dist-server/service/data-set/data-set.js +2 -2
  64. package/dist-server/service/data-set/data-set.js.map +1 -1
  65. package/dist-server/tsconfig.tsbuildinfo +1 -1
  66. package/package.json +11 -11
  67. package/server/activities/activity-data-collect.ts +1 -1
  68. package/server/activities/activity-ooc-resolve.ts +2 -2
  69. package/server/activities/activity-ooc-review.ts +2 -2
  70. package/server/routes.ts +22 -5
  71. package/server/service/data-set/data-set-mutation.ts +6 -6
  72. package/server/service/data-set/data-set-query.ts +1 -1
  73. package/server/service/data-set/data-set.ts +2 -2
@@ -0,0 +1,101 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/dataset/ox-data-entry-form.js';
3
+ import gql from 'graphql-tag';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, property, query, state } from 'lit/decorators.js';
6
+ import { client } from '@operato/graphql';
7
+ import { i18next, localize } from '@operato/i18n';
8
+ import { ScrollbarStyles } from '@operato/styles';
9
+ import { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js';
10
+ let DataCollectActivityEdit = class DataCollectActivityEdit extends localize(i18next)(LitElement) {
11
+ render() {
12
+ return html `
13
+ <ox-data-entry-form
14
+ .dataSet=${this.dataSet}
15
+ .value=${this.output}
16
+ @change=${this._updateDataItems}
17
+ ></ox-data-entry-form>
18
+ `;
19
+ }
20
+ async _updateDataItems() {
21
+ this.output = this.entryForm.value;
22
+ this.dispatchEvent(new CustomEvent('change', {
23
+ detail: this.output
24
+ }));
25
+ }
26
+ updated(changes) {
27
+ if (changes.has('input')) {
28
+ this.fetchDataSet();
29
+ }
30
+ }
31
+ async fetchDataSet() {
32
+ const id = this.input.dataSetId;
33
+ if (id) {
34
+ const response = await client.query({
35
+ query: gql `
36
+ query ($id: String!) {
37
+ dataSet(id: $id) {
38
+ id
39
+ name
40
+ description
41
+ useCase
42
+ dataItems {
43
+ name
44
+ description
45
+ active
46
+ tag
47
+ type
48
+ unit
49
+ options
50
+ quota
51
+ spec
52
+ }
53
+ }
54
+ }
55
+ `,
56
+ variables: {
57
+ id
58
+ }
59
+ });
60
+ this.dataSet = response.data.dataSet;
61
+ }
62
+ }
63
+ };
64
+ DataCollectActivityEdit.styles = [
65
+ ScrollbarStyles,
66
+ css `
67
+ :host {
68
+ display: flex;
69
+ flex-direction: column;
70
+
71
+ background-color: #fff;
72
+ }
73
+
74
+ ox-data-entry-form {
75
+ flex: 1;
76
+ padding: 10px;
77
+ overflow: auto;
78
+ }
79
+ `
80
+ ];
81
+ __decorate([
82
+ property({ type: Object }),
83
+ __metadata("design:type", Object)
84
+ ], DataCollectActivityEdit.prototype, "input", void 0);
85
+ __decorate([
86
+ property({ type: Object }),
87
+ __metadata("design:type", Object)
88
+ ], DataCollectActivityEdit.prototype, "output", void 0);
89
+ __decorate([
90
+ state(),
91
+ __metadata("design:type", Object)
92
+ ], DataCollectActivityEdit.prototype, "dataSet", void 0);
93
+ __decorate([
94
+ query('ox-data-entry-form'),
95
+ __metadata("design:type", OxDataEntryForm)
96
+ ], DataCollectActivityEdit.prototype, "entryForm", void 0);
97
+ DataCollectActivityEdit = __decorate([
98
+ customElement('activity-data-collect-edit')
99
+ ], DataCollectActivityEdit);
100
+ export { DataCollectActivityEdit };
101
+ //# sourceMappingURL=activity-data-collect-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-data-collect-edit.js","sourceRoot":"","sources":["../../client/activities/activity-data-collect-edit.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAA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I,EAAE,MAAM,EAAE,CAAC;;uDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAmC;AAE3C;IAAC,KAAK,CAAC,oBAAoB,CAAC;8BAAa,eAAe;0DAAA;AAxB7C,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAsFnC;SAtFY,uBAAuB","sourcesContent":["import '@operato/dataset/ox-data-entry-form.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js'\nimport { DataSet } from '@operato/dataset'\n\n@customElement('activity-data-collect-edit')\nexport class DataCollectActivityEdit extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-data-entry-form {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataSet?: DataSet & { id: string }\n\n @query('ox-data-entry-form') entryForm!: OxDataEntryForm\n\n render() {\n return html`\n <ox-data-entry-form\n .dataSet=${this.dataSet}\n .value=${this.output}\n @change=${this._updateDataItems}\n ></ox-data-entry-form>\n `\n }\n\n async _updateDataItems() {\n this.output = this.entryForm.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataSet()\n }\n }\n\n async fetchDataSet() {\n const id = this.input.dataSetId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataSet(id: $id) {\n id\n name\n description\n useCase\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataSet = response.data.dataSet\n }\n }\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  import '@operato/dataset/ox-data-entry-form.js';
2
2
  import { LitElement } from 'lit';
3
- import { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js';
4
3
  import { DataSet } from '@operato/dataset';
5
4
  declare const DataCollectActivityView_base: (new (...args: any[]) => LitElement) & typeof LitElement;
6
5
  export declare class DataCollectActivityView extends DataCollectActivityView_base {
@@ -10,9 +9,7 @@ export declare class DataCollectActivityView extends DataCollectActivityView_bas
10
9
  dataSet?: DataSet & {
11
10
  id: string;
12
11
  };
13
- entryForm: OxDataEntryForm;
14
12
  render(): import("lit-html").TemplateResult<1>;
15
- _updateDataItems(): Promise<void>;
16
13
  updated(changes: any): void;
17
14
  fetchDataSet(): Promise<void>;
18
15
  }
@@ -2,26 +2,13 @@ import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/dataset/ox-data-entry-form.js';
3
3
  import gql from 'graphql-tag';
4
4
  import { css, html, LitElement } from 'lit';
5
- import { customElement, property, query, state } from 'lit/decorators.js';
5
+ import { customElement, property, state } from 'lit/decorators.js';
6
6
  import { client } from '@operato/graphql';
7
7
  import { i18next, localize } from '@operato/i18n';
8
8
  import { ScrollbarStyles } from '@operato/styles';
9
- import { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js';
10
9
  let DataCollectActivityView = class DataCollectActivityView extends localize(i18next)(LitElement) {
11
10
  render() {
12
- return html `
13
- <ox-data-entry-form
14
- .dataSet=${this.dataSet}
15
- .value=${this.output}
16
- @change=${this._updateDataItems}
17
- ></ox-data-entry-form>
18
- `;
19
- }
20
- async _updateDataItems() {
21
- this.output = this.entryForm.value;
22
- this.dispatchEvent(new CustomEvent('change', {
23
- detail: this.output
24
- }));
11
+ return html ` <ox-data-entry-form .dataSet=${this.dataSet} .value=${this.output}></ox-data-entry-form>`;
25
12
  }
26
13
  updated(changes) {
27
14
  if (changes.has('input')) {
@@ -90,10 +77,6 @@ __decorate([
90
77
  state(),
91
78
  __metadata("design:type", Object)
92
79
  ], DataCollectActivityView.prototype, "dataSet", void 0);
93
- __decorate([
94
- query('ox-data-entry-form'),
95
- __metadata("design:type", OxDataEntryForm)
96
- ], DataCollectActivityView.prototype, "entryForm", void 0);
97
80
  DataCollectActivityView = __decorate([
98
81
  customElement('activity-data-collect-view')
99
82
  ], DataCollectActivityView);
@@ -1 +1 @@
1
- {"version":3,"file":"activity-data-collect-view.js","sourceRoot":"","sources":["../../client/activities/activity-data-collect-view.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAIjE,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA0BxE,MAAM;QACJ,OAAO,IAAI,CAAA;;mBAEI,IAAI,CAAC,OAAO;iBACd,IAAI,CAAC,MAAM;kBACV,IAAI,CAAC,gBAAgB;;KAElC,CAAA;IACH,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAA;QAElC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;YACxB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CACH,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACxB,IAAI,CAAC,YAAY,EAAE,CAAA;SACpB;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAA;QAE/B,IAAI,EAAE,EAAE;YACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;SAoBT;gBACD,SAAS,EAAE;oBACT,EAAE;iBACH;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA;SACrC;IACH,CAAC;;AApFM,8BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;KAaF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAmC;AAE3C;IAAC,KAAK,CAAC,oBAAoB,CAAC;8BAAa,eAAe;0DAAA;AAxB7C,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAsFnC;SAtFY,uBAAuB","sourcesContent":["import '@operato/dataset/ox-data-entry-form.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { OxDataEntryForm } from '@operato/dataset/ox-data-entry-form.js'\nimport { DataSet } from '@operato/dataset'\n\n@customElement('activity-data-collect-view')\nexport class DataCollectActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-data-entry-form {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataSet?: DataSet & { id: string }\n\n @query('ox-data-entry-form') entryForm!: OxDataEntryForm\n\n render() {\n return html`\n <ox-data-entry-form\n .dataSet=${this.dataSet}\n .value=${this.output}\n @change=${this._updateDataItems}\n ></ox-data-entry-form>\n `\n }\n\n async _updateDataItems() {\n this.output = this.entryForm.value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataSet()\n }\n }\n\n async fetchDataSet() {\n const id = this.input.dataSetId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataSet(id: $id) {\n id\n name\n description\n useCase\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataSet = response.data.dataSet\n }\n }\n}\n"]}
1
+ {"version":3,"file":"activity-data-collect-view.js","sourceRoot":"","sources":["../../client/activities/activity-data-collect-view.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAI1C,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAwBxE,MAAM;QACJ,OAAO,IAAI,CAAA,iCAAiC,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,MAAM,wBAAwB,CAAA;IACxG,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACxB,IAAI,CAAC,YAAY,EAAE,CAAA;SACpB;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAA;QAE/B,IAAI,EAAE,EAAE;YACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;SAoBT;gBACD,SAAS,EAAE;oBACT,EAAE;iBACH;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA;SACrC;IACH,CAAC;;AAlEM,8BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;KAaF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAAa;AAExC;IAAC,KAAK,EAAE;;wDAAmC;AAtBhC,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAoEnC;SApEY,uBAAuB","sourcesContent":["import '@operato/dataset/ox-data-entry-form.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\nimport { DataSet } from '@operato/dataset'\n\n@customElement('activity-data-collect-view')\nexport class DataCollectActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-data-entry-form {\n flex: 1;\n padding: 10px;\n overflow: auto;\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataSet?: DataSet & { id: string }\n\n render() {\n return html` <ox-data-entry-form .dataSet=${this.dataSet} .value=${this.output}></ox-data-entry-form>`\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataSet()\n }\n }\n\n async fetchDataSet() {\n const id = this.input.dataSetId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataSet(id: $id) {\n id\n name\n description\n useCase\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataSet = response.data.dataSet\n }\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ import '@operato/dataset/ox-data-sample-view.js';
@@ -0,0 +1,175 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/dataset/ox-data-sample-view.js';
3
+ import gql from 'graphql-tag';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, property, query, state } from 'lit/decorators.js';
6
+ import { client } from '@operato/graphql';
7
+ import { i18next, localize } from '@operato/i18n';
8
+ import { ScrollbarStyles } from '@operato/styles';
9
+ let OocResolveActivityEdit = class OocResolveActivityEdit extends localize(i18next)(LitElement) {
10
+ render() {
11
+ var _a, _b;
12
+ const action = (_a = this.output) === null || _a === void 0 ? void 0 : _a.action;
13
+ return html `
14
+ <div content>
15
+ <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
16
+ </div>
17
+
18
+ <div instruction>
19
+ <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>
20
+ <div content>${(_b = this.input) === null || _b === void 0 ? void 0 : _b.instruction}</div>
21
+ </div>
22
+
23
+ <label action>
24
+ <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>
25
+ <textarea
26
+ placeholder="시정 및 예방을 위한 조치 이행 사항을 입력해주세요."
27
+ .value=${action || ''}
28
+ @change=${this.onChangeAction}
29
+ ></textarea>
30
+ </label>
31
+ `;
32
+ }
33
+ onChangeAction(e) {
34
+ this.output || (this.output = {});
35
+ this.output.action = e.target.value;
36
+ this.dispatchEvent(new CustomEvent('change', {
37
+ detail: this.output
38
+ }));
39
+ }
40
+ updated(changes) {
41
+ if (changes.has('input')) {
42
+ this.fetchDataOoc();
43
+ }
44
+ }
45
+ async fetchDataOoc() {
46
+ const id = this.input.dataOocId;
47
+ if (id) {
48
+ const response = await client.query({
49
+ query: gql `
50
+ query ($id: String!) {
51
+ dataOoc(id: $id) {
52
+ id
53
+ name
54
+ description
55
+ ooc
56
+ oos
57
+ state
58
+ type
59
+ useCase
60
+ data
61
+ judgment
62
+ dataItems {
63
+ name
64
+ description
65
+ active
66
+ tag
67
+ type
68
+ unit
69
+ options
70
+ quota
71
+ spec
72
+ }
73
+ workDate
74
+ workShift
75
+ collectedAt
76
+ }
77
+ }
78
+ `,
79
+ variables: {
80
+ id
81
+ }
82
+ });
83
+ this.dataOoc = response.data.dataOoc;
84
+ }
85
+ }
86
+ };
87
+ OocResolveActivityEdit.styles = [
88
+ ScrollbarStyles,
89
+ css `
90
+ :host {
91
+ display: flex;
92
+ flex-direction: column;
93
+
94
+ background-color: #fff;
95
+ }
96
+
97
+ div[content] {
98
+ flex: 1;
99
+ flex-direction: column;
100
+
101
+ display: flex;
102
+ overflow: auto;
103
+ }
104
+
105
+ ox-data-sample-view {
106
+ flex: 1;
107
+ padding: var(--padding-wide);
108
+ overflow: auto;
109
+ }
110
+
111
+ div[instruction] {
112
+ display: flex;
113
+ flex-direction: column;
114
+
115
+ padding: var(--padding-wide);
116
+ }
117
+
118
+ div[instruction] div {
119
+ display: flex;
120
+ }
121
+
122
+ div[instruction] div[content] {
123
+ display: flex;
124
+ min-height: 50px;
125
+ }
126
+
127
+ label[action] {
128
+ display: flex;
129
+ flex-direction: column;
130
+
131
+ padding: var(--padding-wide);
132
+ }
133
+
134
+ label[action] div {
135
+ display: flex;
136
+ }
137
+
138
+ mwc-icon {
139
+ color: var(--status-danger-color);
140
+ }
141
+
142
+ textarea {
143
+ border: var(--input-field-border);
144
+ border-radius: var(--input-border-radius);
145
+ padding: var(--input-field-padding);
146
+ font: var(--input-field-font);
147
+ }
148
+
149
+ .button-container {
150
+ display: flex;
151
+ margin-left: auto;
152
+ padding: var(--padding-default);
153
+ }
154
+ `
155
+ ];
156
+ __decorate([
157
+ property({ type: Object }),
158
+ __metadata("design:type", Object)
159
+ ], OocResolveActivityEdit.prototype, "input", void 0);
160
+ __decorate([
161
+ property({ type: Object }),
162
+ __metadata("design:type", Object)
163
+ ], OocResolveActivityEdit.prototype, "output", void 0);
164
+ __decorate([
165
+ state(),
166
+ __metadata("design:type", Object)
167
+ ], OocResolveActivityEdit.prototype, "dataOoc", void 0);
168
+ __decorate([
169
+ query('textarea'),
170
+ __metadata("design:type", HTMLTextAreaElement)
171
+ ], OocResolveActivityEdit.prototype, "actionTextArea", void 0);
172
+ OocResolveActivityEdit = __decorate([
173
+ customElement('activity-ooc-resolve-edit')
174
+ ], OocResolveActivityEdit);
175
+ //# sourceMappingURL=activity-ooc-resolve-edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-ooc-resolve-edit.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-edit.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM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AhKM,6BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiEF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAa;AAExC;IAAC,KAAK,EAAE;;uDAAc;AAEtB;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAkB,mBAAmB;8DAAA;AA5EnD,sBAAsB;IAD3B,aAAa,CAAC,2BAA2B,CAAC;GACrC,sBAAsB,CAkK3B","sourcesContent":["import '@operato/dataset/ox-data-sample-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-ooc-resolve-edit')\nclass OocResolveActivityEdit extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-sample-view {\n flex: 1;\n padding: var(--padding-wide);\n overflow: auto;\n }\n\n div[instruction] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[instruction] div {\n display: flex;\n }\n\n div[instruction] div[content] {\n display: flex;\n min-height: 50px;\n }\n\n label[action] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n label[action] div {\n display: flex;\n }\n\n mwc-icon {\n color: var(--status-danger-color);\n }\n\n textarea {\n border: var(--input-field-border);\n border-radius: var(--input-border-radius);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataOoc?: any\n\n @query('textarea') actionTextArea!: HTMLTextAreaElement\n\n render() {\n const action = this.output?.action\n\n return html`\n <div content>\n <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>\n </div>\n\n <div instruction>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>\n <div content>${this.input?.instruction}</div>\n </div>\n\n <label action>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>\n <textarea\n placeholder=\"시정 및 예방을 위한 조치 이행 사항을 입력해주세요.\"\n .value=${action || ''}\n @change=${this.onChangeAction}\n ></textarea>\n </label>\n `\n }\n\n onChangeAction(e: Event) {\n this.output ||= {}\n this.output.action = (e.target as HTMLTextAreaElement).value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataOoc()\n }\n }\n\n async fetchDataOoc() {\n const id = this.input.dataOocId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataOoc(id: $id) {\n id\n name\n description\n ooc\n oos\n state\n type\n useCase\n data\n judgment\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n workDate\n workShift\n collectedAt\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataOoc = response.data.dataOoc\n }\n }\n}\n"]}
@@ -2,14 +2,13 @@ import { __decorate, __metadata } from "tslib";
2
2
  import '@operato/dataset/ox-data-sample-view.js';
3
3
  import gql from 'graphql-tag';
4
4
  import { css, html, LitElement } from 'lit';
5
- import { customElement, property, query, state } from 'lit/decorators.js';
5
+ import { customElement, property, state } from 'lit/decorators.js';
6
6
  import { client } from '@operato/graphql';
7
7
  import { i18next, localize } from '@operato/i18n';
8
8
  import { ScrollbarStyles } from '@operato/styles';
9
9
  let OocResolveActivityView = class OocResolveActivityView extends localize(i18next)(LitElement) {
10
10
  render() {
11
11
  var _a, _b;
12
- const action = (_a = this.output) === null || _a === void 0 ? void 0 : _a.action;
13
12
  return html `
14
13
  <div content>
15
14
  <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
@@ -17,26 +16,15 @@ let OocResolveActivityView = class OocResolveActivityView extends localize(i18ne
17
16
 
18
17
  <div instruction>
19
18
  <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>
20
- <div content>${(_b = this.input) === null || _b === void 0 ? void 0 : _b.instruction}</div>
19
+ <div content>${(_a = this.input) === null || _a === void 0 ? void 0 : _a.instruction}</div>
21
20
  </div>
22
21
 
23
- <label action>
22
+ <div action>
24
23
  <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>
25
- <textarea
26
- placeholder="시정 및 예방을 위한 조치 이행 사항을 입력해주세요."
27
- .value=${action || ''}
28
- @change=${this.onChangeAction}
29
- ></textarea>
30
- </label>
24
+ <div content>${(_b = this.output) === null || _b === void 0 ? void 0 : _b.action}</div>
25
+ </div>
31
26
  `;
32
27
  }
33
- onChangeAction(e) {
34
- this.output || (this.output = {});
35
- this.output.action = e.target.value;
36
- this.dispatchEvent(new CustomEvent('change', {
37
- detail: this.output
38
- }));
39
- }
40
28
  updated(changes) {
41
29
  if (changes.has('input')) {
42
30
  this.fetchDataOoc();
@@ -124,32 +112,24 @@ OocResolveActivityView.styles = [
124
112
  min-height: 50px;
125
113
  }
126
114
 
127
- label[action] {
115
+ div[action] {
128
116
  display: flex;
129
117
  flex-direction: column;
130
118
 
131
119
  padding: var(--padding-wide);
132
120
  }
133
121
 
134
- label[action] div {
122
+ div[action] div {
135
123
  display: flex;
136
124
  }
137
125
 
138
- mwc-icon {
139
- color: var(--status-danger-color);
140
- }
141
-
142
- textarea {
143
- border: var(--input-field-border);
144
- border-radius: var(--input-border-radius);
145
- padding: var(--input-field-padding);
146
- font: var(--input-field-font);
126
+ div[action] div[content] {
127
+ display: flex;
128
+ min-height: 50px;
147
129
  }
148
130
 
149
- .button-container {
150
- display: flex;
151
- margin-left: auto;
152
- padding: var(--padding-default);
131
+ mwc-icon {
132
+ color: var(--status-danger-color);
153
133
  }
154
134
  `
155
135
  ];
@@ -165,10 +145,6 @@ __decorate([
165
145
  state(),
166
146
  __metadata("design:type", Object)
167
147
  ], OocResolveActivityView.prototype, "dataOoc", void 0);
168
- __decorate([
169
- query('textarea'),
170
- __metadata("design:type", HTMLTextAreaElement)
171
- ], OocResolveActivityView.prototype, "actionTextArea", void 0);
172
148
  OocResolveActivityView = __decorate([
173
149
  customElement('activity-ooc-resolve-view')
174
150
  ], OocResolveActivityView);
@@ -1 +1 @@
1
- {"version":3,"file":"activity-ooc-resolve-view.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-view.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA8EhE,MAAM;;QACJ,MAAM,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,CAAA;QAElC,OAAO,IAAI,CAAA;;2CAE4B,IAAI,CAAC,OAAO;;;;;uBAKhC,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW;;;;;;;mBAO3B,MAAM,IAAI,EAAE;oBACX,IAAI,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B;IAD3B,aAAa,CAAC,2BAA2B,CAAC;GACrC,sBAAsB,CAkK3B","sourcesContent":["import '@operato/dataset/ox-data-sample-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-ooc-resolve-view')\nclass OocResolveActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-sample-view {\n flex: 1;\n padding: var(--padding-wide);\n overflow: auto;\n }\n\n div[instruction] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[instruction] div {\n display: flex;\n }\n\n div[instruction] div[content] {\n display: flex;\n min-height: 50px;\n }\n\n label[action] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n label[action] div {\n display: flex;\n }\n\n mwc-icon {\n color: var(--status-danger-color);\n }\n\n textarea {\n border: var(--input-field-border);\n border-radius: var(--input-border-radius);\n padding: var(--input-field-padding);\n font: var(--input-field-font);\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataOoc?: any\n\n @query('textarea') actionTextArea!: HTMLTextAreaElement\n\n render() {\n const action = this.output?.action\n\n return html`\n <div content>\n <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>\n </div>\n\n <div instruction>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>\n <div content>${this.input?.instruction}</div>\n </div>\n\n <label action>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>\n <textarea\n placeholder=\"시정 및 예방을 위한 조치 이행 사항을 입력해주세요.\"\n .value=${action || ''}\n @change=${this.onChangeAction}\n ></textarea>\n </label>\n `\n }\n\n onChangeAction(e: Event) {\n this.output ||= {}\n this.output.action = (e.target as HTMLTextAreaElement).value\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: this.output\n })\n )\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataOoc()\n }\n }\n\n async fetchDataOoc() {\n const id = this.input.dataOocId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataOoc(id: $id) {\n id\n name\n description\n ooc\n oos\n state\n type\n useCase\n data\n judgment\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n workDate\n workShift\n collectedAt\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataOoc = response.data.dataOoc\n }\n }\n}\n"]}
1
+ {"version":3,"file":"activity-ooc-resolve-view.js","sourceRoot":"","sources":["../../client/activities/activity-ooc-resolve-view.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAS,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAoEhE,MAAM;;QACJ,OAAO,IAAI,CAAA;;2CAE4B,IAAI,CAAC,OAAO;;;;;uBAKhC,MAAA,IAAI,CAAC,KAAK,0CAAE,WAAW;;;;;uBAKvB,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM;;KAErC,CAAA;IACH,CAAC;IAED,OAAO,CAAC,OAAO;QACb,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACxB,IAAI,CAAC,YAAY,EAAE,CAAA;SACpB;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAA;QAE/B,IAAI,EAAE,EAAE;YACN,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;gBAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA6BT;gBACD,SAAS,EAAE;oBACT,EAAE;iBACH;aACF,CAAC,CAAA;YAEF,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA;SACrC;IACH,CAAC;;AArIM,6BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyDF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAY;AACvC;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAa;AAExC;IAAC,KAAK,EAAE;;uDAAc;AAlElB,sBAAsB;IAD3B,aAAa,CAAC,2BAA2B,CAAC;GACrC,sBAAsB,CAuI3B","sourcesContent":["import '@operato/dataset/ox-data-sample-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-ooc-resolve-view')\nclass OocResolveActivityView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n div[content] {\n flex: 1;\n flex-direction: column;\n\n display: flex;\n overflow: auto;\n }\n\n ox-data-sample-view {\n flex: 1;\n padding: var(--padding-wide);\n overflow: auto;\n }\n\n div[instruction] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[instruction] div {\n display: flex;\n }\n\n div[instruction] div[content] {\n display: flex;\n min-height: 50px;\n }\n\n div[action] {\n display: flex;\n flex-direction: column;\n\n padding: var(--padding-wide);\n }\n\n div[action] div {\n display: flex;\n }\n\n div[action] div[content] {\n display: flex;\n min-height: 50px;\n }\n\n mwc-icon {\n color: var(--status-danger-color);\n }\n `\n ]\n\n @property({ type: Object }) input?: any\n @property({ type: Object }) output?: any\n\n @state() dataOoc?: any\n\n render() {\n return html`\n <div content>\n <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>\n </div>\n\n <div instruction>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>\n <div content>${this.input?.instruction}</div>\n </div>\n\n <div action>\n <div><mwc-icon>build_circle</mwc-icon> <span>corrective action</span></div>\n <div content>${this.output?.action}</div>\n </div>\n `\n }\n\n updated(changes) {\n if (changes.has('input')) {\n this.fetchDataOoc()\n }\n }\n\n async fetchDataOoc() {\n const id = this.input.dataOocId\n\n if (id) {\n const response = await client.query({\n query: gql`\n query ($id: String!) {\n dataOoc(id: $id) {\n id\n name\n description\n ooc\n oos\n state\n type\n useCase\n data\n judgment\n dataItems {\n name\n description\n active\n tag\n type\n unit\n options\n quota\n spec\n }\n workDate\n workShift\n collectedAt\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.dataOoc = response.data.dataOoc\n }\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ import '@operato/dataset/ox-data-sample-view.js';
@@ -0,0 +1,155 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/dataset/ox-data-sample-view.js';
3
+ import gql from 'graphql-tag';
4
+ import { css, html, LitElement } from 'lit';
5
+ import { customElement, property, query, state } from 'lit/decorators.js';
6
+ import { client } from '@operato/graphql';
7
+ import { i18next, localize } from '@operato/i18n';
8
+ import { ScrollbarStyles } from '@operato/styles';
9
+ let OocReviewActivityEdit = class OocReviewActivityEdit extends localize(i18next)(LitElement) {
10
+ render() {
11
+ var _a;
12
+ const instruction = (_a = this.output) === null || _a === void 0 ? void 0 : _a.instruction;
13
+ return html `
14
+ <div content>
15
+ <ox-data-sample-view .dataSample=${this.dataOoc}></ox-data-sample-view>
16
+ </div>
17
+
18
+ <label instruction>
19
+ <div><mwc-icon>build_circle</mwc-icon> <span>corrective instruction</span></div>
20
+ <textarea
21
+ placeholder="시정 및 예방을 위한 조치 지시 사항을 입력해주세요."
22
+ .value=${instruction || ''}
23
+ @change=${this.onChangeInstruction}
24
+ ></textarea>
25
+ </label>
26
+ `;
27
+ }
28
+ onChangeInstruction(e) {
29
+ this.output || (this.output = {});
30
+ this.output.instruction = e.target.value;
31
+ this.dispatchEvent(new CustomEvent('change', {
32
+ detail: this.output
33
+ }));
34
+ }
35
+ updated(changes) {
36
+ if (changes.has('input')) {
37
+ this.fetchDataOoc();
38
+ }
39
+ }
40
+ async fetchDataOoc() {
41
+ var _a;
42
+ const id = (_a = this.input) === null || _a === void 0 ? void 0 : _a.dataOocId;
43
+ if (id) {
44
+ const response = await client.query({
45
+ query: gql `
46
+ query ($id: String!) {
47
+ dataOoc(id: $id) {
48
+ id
49
+ name
50
+ description
51
+ ooc
52
+ oos
53
+ state
54
+ type
55
+ useCase
56
+ data
57
+ judgment
58
+ dataItems {
59
+ name
60
+ description
61
+ active
62
+ tag
63
+ type
64
+ unit
65
+ options
66
+ quota
67
+ spec
68
+ }
69
+ workDate
70
+ workShift
71
+ collectedAt
72
+ }
73
+ }
74
+ `,
75
+ variables: {
76
+ id
77
+ }
78
+ });
79
+ this.dataOoc = response.data.dataOoc;
80
+ }
81
+ }
82
+ };
83
+ OocReviewActivityEdit.styles = [
84
+ ScrollbarStyles,
85
+ css `
86
+ :host {
87
+ display: flex;
88
+ flex-direction: column;
89
+
90
+ background-color: #fff;
91
+ }
92
+
93
+ div[content] {
94
+ flex: 1;
95
+ flex-direction: column;
96
+
97
+ display: flex;
98
+ overflow: auto;
99
+ }
100
+
101
+ ox-data-sample-view {
102
+ flex: 1;
103
+ padding: var(--padding-wide);
104
+ overflow: auto;
105
+ }
106
+
107
+ label[instruction] {
108
+ display: flex;
109
+ flex-direction: column;
110
+
111
+ padding: var(--padding-wide);
112
+ }
113
+
114
+ label[instruction] div {
115
+ display: flex;
116
+ }
117
+
118
+ mwc-icon {
119
+ color: var(--status-danger-color);
120
+ }
121
+
122
+ textarea {
123
+ border: var(--input-field-border);
124
+ border-radius: var(--input-border-radius);
125
+ padding: var(--input-field-padding);
126
+ font: var(--input-field-font);
127
+ }
128
+
129
+ .button-container {
130
+ display: flex;
131
+ margin-left: auto;
132
+ padding: var(--padding-default);
133
+ }
134
+ `
135
+ ];
136
+ __decorate([
137
+ property({ type: Object }),
138
+ __metadata("design:type", Object)
139
+ ], OocReviewActivityEdit.prototype, "input", void 0);
140
+ __decorate([
141
+ property({ type: Object }),
142
+ __metadata("design:type", Object)
143
+ ], OocReviewActivityEdit.prototype, "output", void 0);
144
+ __decorate([
145
+ state(),
146
+ __metadata("design:type", Object)
147
+ ], OocReviewActivityEdit.prototype, "dataOoc", void 0);
148
+ __decorate([
149
+ query('textarea'),
150
+ __metadata("design:type", HTMLTextAreaElement)
151
+ ], OocReviewActivityEdit.prototype, "instructionTextArea", void 0);
152
+ OocReviewActivityEdit = __decorate([
153
+ customElement('activity-ooc-review-edit')
154
+ ], OocReviewActivityEdit);
155
+ //# sourceMappingURL=activity-ooc-review-edit.js.map