@things-factory/organization 7.0.1-alpha.43 → 7.0.1-alpha.44

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 (48) hide show
  1. package/client/component/approval-line-items-editor-popup.ts +13 -3
  2. package/client/component/approval-line-items-editor.ts +44 -46
  3. package/client/component/approval-line-templates-manager.ts +7 -8
  4. package/client/component/assignees-editor.ts +2 -1
  5. package/client/component/recipients-editor.ts +7 -11
  6. package/client/grist-editor/grist-editor-approval-line.ts +4 -9
  7. package/client/grist-editor/grist-editor-assignees.ts +4 -7
  8. package/client/grist-editor/grist-editor-recipients.ts +4 -10
  9. package/client/grist-editor/grist-renderer-approval-line.ts +4 -3
  10. package/client/grist-editor/grist-renderer-assignees.ts +4 -3
  11. package/client/grist-editor/grist-renderer-recipients.ts +4 -3
  12. package/client/pages/approval-line/my-approval-line-templates-page.ts +2 -0
  13. package/dist-client/component/approval-line-items-editor-popup.d.ts +1 -1
  14. package/dist-client/component/approval-line-items-editor-popup.js +12 -3
  15. package/dist-client/component/approval-line-items-editor-popup.js.map +1 -1
  16. package/dist-client/component/approval-line-items-editor.js +7 -6
  17. package/dist-client/component/approval-line-items-editor.js.map +1 -1
  18. package/dist-client/component/approval-line-templates-manager.d.ts +3 -2
  19. package/dist-client/component/approval-line-templates-manager.js +5 -7
  20. package/dist-client/component/approval-line-templates-manager.js.map +1 -1
  21. package/dist-client/component/assignees-editor.d.ts +1 -0
  22. package/dist-client/component/assignees-editor.js +2 -1
  23. package/dist-client/component/assignees-editor.js.map +1 -1
  24. package/dist-client/component/recipients-editor.d.ts +1 -0
  25. package/dist-client/component/recipients-editor.js +7 -11
  26. package/dist-client/component/recipients-editor.js.map +1 -1
  27. package/dist-client/grist-editor/grist-editor-approval-line.d.ts +1 -0
  28. package/dist-client/grist-editor/grist-editor-approval-line.js +4 -9
  29. package/dist-client/grist-editor/grist-editor-approval-line.js.map +1 -1
  30. package/dist-client/grist-editor/grist-editor-assignees.d.ts +1 -0
  31. package/dist-client/grist-editor/grist-editor-assignees.js +4 -6
  32. package/dist-client/grist-editor/grist-editor-assignees.js.map +1 -1
  33. package/dist-client/grist-editor/grist-editor-recipients.d.ts +1 -0
  34. package/dist-client/grist-editor/grist-editor-recipients.js +4 -9
  35. package/dist-client/grist-editor/grist-editor-recipients.js.map +1 -1
  36. package/dist-client/grist-editor/grist-renderer-approval-line.d.ts +1 -1
  37. package/dist-client/grist-editor/grist-renderer-approval-line.js +3 -3
  38. package/dist-client/grist-editor/grist-renderer-approval-line.js.map +1 -1
  39. package/dist-client/grist-editor/grist-renderer-assignees.d.ts +1 -1
  40. package/dist-client/grist-editor/grist-renderer-assignees.js +3 -3
  41. package/dist-client/grist-editor/grist-renderer-assignees.js.map +1 -1
  42. package/dist-client/grist-editor/grist-renderer-recipients.d.ts +1 -1
  43. package/dist-client/grist-editor/grist-renderer-recipients.js +3 -3
  44. package/dist-client/grist-editor/grist-renderer-recipients.js.map +1 -1
  45. package/dist-client/pages/approval-line/my-approval-line-templates-page.js +1 -0
  46. package/dist-client/pages/approval-line/my-approval-line-templates-page.js.map +1 -1
  47. package/dist-client/tsconfig.tsbuildinfo +1 -1
  48. package/package.json +5 -5
@@ -5,6 +5,7 @@ import { customElement, property, query, state } from 'lit/decorators.js'
5
5
  import { i18next, localize } from '@operato/i18n'
6
6
  import { ButtonContainerStyles } from '@operato/styles'
7
7
  import { closePopup } from '@operato/popup'
8
+ import { OxPrompt } from '@operato/popup/ox-prompt.js'
8
9
 
9
10
  import { ApprovalLineItemsEditor } from './approval-line-items-editor'
10
11
  import { ApprovalLineItem } from '../types/approval-line'
@@ -60,9 +61,18 @@ export class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement)
60
61
  this.changedValue = this.value
61
62
  }
62
63
 
63
- onEmpty() {
64
- this.confirmCallback && this.confirmCallback(null)
65
- closePopup(this)
64
+ async onEmpty() {
65
+ const reaction = await OxPrompt.open({
66
+ title: i18next.t('text.are_you_sure'),
67
+ text: i18next.t('prompt.sure to empty approval line ?'),
68
+ confirmButton: { text: i18next.t('button.confirm') },
69
+ cancelButton: { text: i18next.t('button.cancel') }
70
+ })
71
+
72
+ if (reaction) {
73
+ this.confirmCallback && this.confirmCallback(null)
74
+ closePopup(this)
75
+ }
66
76
  }
67
77
 
68
78
  onCancel() {
@@ -7,7 +7,7 @@ import { customElement, property, query, state } from 'lit/decorators.js'
7
7
  import { i18next, localize } from '@operato/i18n'
8
8
  import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
9
9
  import { isMobileDevice } from '@operato/utils'
10
- import { ButtonContainerStyles } from '@operato/styles'
10
+ import { ButtonContainerStyles, CommonHeaderStyles } from '@operato/styles'
11
11
  import { openPopup, PopupHandle } from '@operato/layout'
12
12
 
13
13
  import { ApprovalLineView } from './approval-line-view'
@@ -19,6 +19,7 @@ import { ApprovalLine, ApprovalLineItem } from '../types/approval-line'
19
19
  @customElement('approval-line-items-editor')
20
20
  export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
21
21
  static styles = [
22
+ CommonHeaderStyles,
22
23
  ButtonContainerStyles,
23
24
  css`
24
25
  :host {
@@ -44,7 +45,7 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
44
45
  `
45
46
  ]
46
47
 
47
- @property({ type: Object }) value?: ApprovalLineItem[]
48
+ @property({ type: Array }) value?: ApprovalLineItem[]
48
49
 
49
50
  @state() gristConfig?: any
50
51
 
@@ -76,10 +77,10 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
76
77
  )
77
78
  }}
78
79
  >
79
- <div slot="headroom">
80
- <div id="select">
81
- <mwc-button @click=${this.openSelector.bind(this)}>${i18next.t('button.copy from')}</mwc-button>
82
- <mwc-button raised danger @click=${() => this.deleteDataItems()}>${i18next.t('button.delete')}</mwc-button>
80
+ <div slot="headroom" class="header">
81
+ <div class="actions">
82
+ <button @click=${this.openSelector.bind(this)}><md-icon>content_copy</md-icon>${i18next.t('button.copy from')}</button>
83
+ <button danger @click=${() => this.deleteDataItems()}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
83
84
  </div>
84
85
  </div>
85
86
  </ox-grist>
@@ -132,7 +133,7 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
132
133
  case 'Employee':
133
134
  options = {
134
135
  title: i18next.t('title.employee list'),
135
- pagination: { pages : [50, 100, 200] },
136
+ pagination: { pages: [50, 100, 200] },
136
137
  basicArgs: { filters: [{ name: 'active', operator: 'eq', value: 'true' }] },
137
138
  queryName: 'employees',
138
139
  columns: [
@@ -144,54 +145,54 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
144
145
  filter: 'search',
145
146
  sortable: true
146
147
  },
147
- {
148
+ {
148
149
  name: 'name',
149
150
  width: 120,
150
- header: { renderer: () => i18next.t('field.name') },
151
+ header: { renderer: () => i18next.t('field.name') },
151
152
  filter: 'search',
152
153
  sortable: true
153
154
  },
154
- {
155
- name: 'alias',
155
+ {
156
+ name: 'alias',
156
157
  width: 150,
157
- header: { renderer: () => i18next.t('label.alias') },
158
+ header: { renderer: () => i18next.t('label.alias') },
158
159
  filter: 'search',
159
160
  sortable: true
160
161
  },
161
- {
162
- type: 'code',
163
- name: 'type',
162
+ {
163
+ type: 'code',
164
+ name: 'type',
164
165
  width: 110,
165
- header: { renderer: () => i18next.t('label.type') },
166
- record: {
167
- editable: false,
168
- codeName: 'EMPLOYEE_TYPE'
166
+ header: { renderer: () => i18next.t('label.type') },
167
+ record: {
168
+ editable: false,
169
+ codeName: 'EMPLOYEE_TYPE'
169
170
  }
170
171
  },
171
- {
172
- type: 'code',
173
- name: 'jobPosition',
172
+ {
173
+ type: 'code',
174
+ name: 'jobPosition',
174
175
  width: 110,
175
- header: { renderer: () => i18next.t('label.job-position') },
176
- record: {
177
- editable: false,
178
- codeName: 'JOB_POSITION'
176
+ header: { renderer: () => i18next.t('label.job-position') },
177
+ record: {
178
+ editable: false,
179
+ codeName: 'JOB_POSITION'
179
180
  }
180
181
  },
181
- {
182
- type: 'code',
183
- name: 'jobResponsibility',
182
+ {
183
+ type: 'code',
184
+ name: 'jobResponsibility',
184
185
  width: 200,
185
- header: { renderer: () => i18next.t('label.job-responsibility') },
186
- record: {
187
- editable: false,
188
- codeName: 'JOB_RESPONSIBILITY'
186
+ header: { renderer: () => i18next.t('label.job-responsibility') },
187
+ record: {
188
+ editable: false,
189
+ codeName: 'JOB_RESPONSIBILITY'
189
190
  }
190
191
  },
191
192
  {
192
193
  type: 'date',
193
194
  name: 'hiredOn',
194
- header: { renderer: () => i18next.t('field.hired-on') },
195
+ header: { renderer: () => i18next.t('field.hired-on') },
195
196
  width: 100
196
197
  }
197
198
  ],
@@ -303,19 +304,16 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
303
304
  )
304
305
  }
305
306
 
306
- this.popup = openPopup(
307
- html` <approval-line-selector .confirmCallback=${confirmCallback.bind(this)}></approval-line-selector> `,
308
- {
309
- backdrop: true,
310
- size: 'large',
311
- search: {
312
- placeholder: i18next.t('title.approval-line template list'),
313
- handler: (instance: any, value: any) => {
314
- /* instance: template instance */
315
- instance.searchText(value)
316
- }
307
+ this.popup = openPopup(html` <approval-line-selector .confirmCallback=${confirmCallback.bind(this)}></approval-line-selector> `, {
308
+ backdrop: true,
309
+ size: 'large',
310
+ search: {
311
+ placeholder: i18next.t('title.approval-line template list'),
312
+ handler: (instance: any, value: any) => {
313
+ /* instance: template instance */
314
+ instance.searchText(value)
317
315
  }
318
316
  }
319
- )
317
+ })
320
318
  }
321
319
  }
@@ -1,3 +1,5 @@
1
+ import '@material/web/icon/icon.js'
2
+
1
3
  import gql from 'graphql-tag'
2
4
  import { css, html, LitElement } from 'lit'
3
5
  import { customElement, property, query } from 'lit/decorators.js'
@@ -8,7 +10,7 @@ import { getEditor, getRenderer } from '@operato/data-grist'
8
10
  import { isMobileDevice } from '@operato/utils'
9
11
  import { ButtonContainerStyles } from '@operato/styles'
10
12
 
11
- import { ApprovalLine, ApprovalLineItem } from '../types/approval-line'
13
+ import { ApprovalLine } from '../types/approval-line'
12
14
 
13
15
  /**
14
16
  * 결재선 관리를 위해서
@@ -40,14 +42,11 @@ export class ApprovalLineTemplatesManager extends localize(i18next)(LitElement)
40
42
 
41
43
  render() {
42
44
  return html`
43
- <ox-grist
44
- .mode=${isMobileDevice() ? 'CARD' : 'GRID'}
45
- .config=${this.gristConfig}
46
- .fetchHandler=${this.fetchHandler.bind(this)}
47
- ></ox-grist>
45
+ <ox-grist .mode=${isMobileDevice() ? 'CARD' : 'GRID'} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}></ox-grist>
46
+
48
47
  <div class="button-container">
49
- <mwc-button raised danger @click=${this._deleteDataItems.bind(this)}>${i18next.t('button.delete')}</mwc-button>
50
- <mwc-button raised @click=${this._updateDataItems.bind(this)}>${i18next.t('button.save')}</mwc-button>
48
+ <button danger @click=${this._deleteDataItems.bind(this)}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
49
+ <button @click=${this._updateDataItems.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
51
50
  </div>
52
51
  `
53
52
  }
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import './assignees-view'
2
3
 
3
4
  import { css, html, LitElement } from 'lit'
@@ -73,7 +74,7 @@ export class AssigneesEditor extends localize(i18next)(LitElement) {
73
74
  >
74
75
  <div slot="headroom">
75
76
  <div id="select">
76
- <mwc-button raised danger @click=${() => this.deleteDataItems()}>${i18next.t('button.delete')}</mwc-button>
77
+ <button danger @click=${() => this.deleteDataItems()}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
77
78
  </div>
78
79
  </div>
79
80
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import './recipients-view'
2
3
 
3
4
  import { css, html, LitElement } from 'lit'
@@ -5,8 +6,8 @@ import { customElement, property, query, state } from 'lit/decorators.js'
5
6
 
6
7
  import { i18next, localize } from '@operato/i18n'
7
8
  import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
9
+ import { ButtonContainerStyles, CommonHeaderStyles } from '@operato/styles'
8
10
  import { isMobileDevice } from '@operato/utils'
9
- import { ButtonContainerStyles } from '@operato/styles'
10
11
 
11
12
  import { AssigneeItem } from '../types/org-member'
12
13
 
@@ -16,6 +17,7 @@ import { AssigneeItem } from '../types/org-member'
16
17
  @customElement('recipients-editor')
17
18
  export class RecipientsEditor extends localize(i18next)(LitElement) {
18
19
  static styles = [
20
+ CommonHeaderStyles,
19
21
  ButtonContainerStyles,
20
22
  css`
21
23
  :host {
@@ -32,16 +34,10 @@ export class RecipientsEditor extends localize(i18next)(LitElement) {
32
34
  ox-grist {
33
35
  flex: 1;
34
36
  }
35
-
36
- #select {
37
- display: flex;
38
- justify-content: end;
39
- padding: 10px;
40
- }
41
37
  `
42
38
  ]
43
39
 
44
- @property({ type: Object }) value?: AssigneeItem[]
40
+ @property({ type: Array }) value?: AssigneeItem[]
45
41
 
46
42
  @state() gristConfig?: any
47
43
 
@@ -71,9 +67,9 @@ export class RecipientsEditor extends localize(i18next)(LitElement) {
71
67
  )
72
68
  }}
73
69
  >
74
- <div slot="headroom">
75
- <div id="select">
76
- <mwc-button raised danger @click=${() => this.deleteDataItems()}>${i18next.t('button.delete')}</mwc-button>
70
+ <div slot="headroom" class="header">
71
+ <div id="actions">
72
+ <button danger @click=${() => this.deleteDataItems()}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
77
73
  </div>
78
74
  </div>
79
75
  </ox-grist>
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '../component/approval-line-items-editor-popup.js'
2
3
 
3
4
  import { html, TemplateResult } from 'lit'
@@ -17,8 +18,8 @@ export class GristEditorApprovalLine extends OxGristEditor {
17
18
  return !value || !(value instanceof Array) || value.length == 0
18
19
  ? html``
19
20
  : value.length == 1
20
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
21
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
21
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
22
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
22
23
  }
23
24
 
24
25
  _onclick(e: Event): void {
@@ -58,13 +59,7 @@ export class GristEditorApprovalLine extends OxGristEditor {
58
59
  var value = this.value || []
59
60
 
60
61
  var template =
61
- this.template ||
62
- html`
63
- <approval-line-items-editor-popup
64
- .value=${value}
65
- .confirmCallback=${confirmCallback.bind(this)}
66
- ></approval-line-items-editor-popup>
67
- `
62
+ this.template || html` <approval-line-items-editor-popup .value=${value} .confirmCallback=${confirmCallback.bind(this)}></approval-line-items-editor-popup> `
68
63
 
69
64
  this.popup = openPopup(template, {
70
65
  backdrop: true,
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '../component/assignees-editor-popup.js'
2
3
 
3
4
  import { html, TemplateResult } from 'lit'
@@ -17,8 +18,8 @@ export class GristEditorAssignees extends OxGristEditor {
17
18
  return !value || !(value instanceof Array) || value.length == 0
18
19
  ? html``
19
20
  : value.length == 1
20
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
21
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
21
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
22
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
22
23
  }
23
24
 
24
25
  _onclick(e: Event): void {
@@ -57,11 +58,7 @@ export class GristEditorAssignees extends OxGristEditor {
57
58
 
58
59
  var value = this.value || []
59
60
 
60
- var template =
61
- this.template ||
62
- html`
63
- <assignees-editor-popup .value=${value} .confirmCallback=${confirmCallback.bind(this)}></assignees-editor-popup>
64
- `
61
+ var template = this.template || html` <assignees-editor-popup .value=${value} .confirmCallback=${confirmCallback.bind(this)}></assignees-editor-popup> `
65
62
 
66
63
  this.popup = openPopup(template, {
67
64
  backdrop: true,
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '../component/recipients-editor-popup.js'
2
3
 
3
4
  import { html, TemplateResult } from 'lit'
@@ -17,8 +18,8 @@ export class GristEditorRecipients extends OxGristEditor {
17
18
  return !value || !(value instanceof Array) || value.length == 0
18
19
  ? html``
19
20
  : value.length == 1
20
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
21
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
21
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
22
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
22
23
  }
23
24
 
24
25
  _onclick(e: Event): void {
@@ -57,14 +58,7 @@ export class GristEditorRecipients extends OxGristEditor {
57
58
 
58
59
  var value = this.value || []
59
60
 
60
- var template =
61
- this.template ||
62
- html`
63
- <recipients-editor-popup
64
- .value=${value}
65
- .confirmCallback=${confirmCallback.bind(this)}
66
- ></recipients-editor-popup>
67
- `
61
+ var template = this.template || html` <recipients-editor-popup .value=${value} .confirmCallback=${confirmCallback.bind(this)}></recipients-editor-popup> `
68
62
 
69
63
  this.popup = openPopup(template, {
70
64
  backdrop: true,
@@ -1,4 +1,5 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
+
2
3
  import { html } from 'lit-html'
3
4
 
4
5
  import { FieldRenderer } from '@operato/data-grist'
@@ -7,6 +8,6 @@ export const GristRendererApprovalLine: FieldRenderer = (value, column, record,
7
8
  return !value || !(value instanceof Array) || value.length == 0
8
9
  ? html``
9
10
  : value.length == 1
10
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
11
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
11
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
12
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
12
13
  }
@@ -1,4 +1,5 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
+
2
3
  import { html } from 'lit-html'
3
4
 
4
5
  import { FieldRenderer } from '@operato/data-grist'
@@ -7,6 +8,6 @@ export const GristRendererAssignees: FieldRenderer = (value, column, record, row
7
8
  return !value || !(value instanceof Array) || value.length == 0
8
9
  ? html``
9
10
  : value.length == 1
10
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
11
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
11
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
12
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
12
13
  }
@@ -1,4 +1,5 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
+
2
3
  import { html } from 'lit-html'
3
4
 
4
5
  import { FieldRenderer } from '@operato/data-grist'
@@ -7,6 +8,6 @@ export const GristRendererRecipients: FieldRenderer = (value, column, record, ro
7
8
  return !value || !(value instanceof Array) || value.length == 0
8
9
  ? html``
9
10
  : value.length == 1
10
- ? html`<mwc-icon style="--mdc-icon-size:1.3em">person</mwc-icon>`
11
- : html`<mwc-icon style="--mdc-icon-size:1.3em">group</mwc-icon>`
11
+ ? html`<md-icon style="--md-icon-size:1.3em">person</md-icon>`
12
+ : html`<md-icon style="--md-icon-size:1.3em">group</md-icon>`
12
13
  }
@@ -118,6 +118,8 @@ export class MyApprovalLineTemplatesPage extends connect(store)(localize(i18next
118
118
  .confirmCallback=${async model => {
119
119
  await this.updateApprovalLine(id, model)
120
120
  await this.grist.fetch()
121
+
122
+ return false
121
123
  }}
122
124
  .value=${model}
123
125
  ></approval-line-items-editor-popup>
@@ -14,7 +14,7 @@ export declare class ApprovalLineItemsEditorPopup extends ApprovalLineItemsEdito
14
14
  private changedValue?;
15
15
  render(): import("lit").TemplateResult<1>;
16
16
  firstUpdated(): void;
17
- onEmpty(): void;
17
+ onEmpty(): Promise<void>;
18
18
  onCancel(): void;
19
19
  onConfirm(): void;
20
20
  }
@@ -5,6 +5,7 @@ import { customElement, property, query } from 'lit/decorators.js';
5
5
  import { i18next, localize } from '@operato/i18n';
6
6
  import { ButtonContainerStyles } from '@operato/styles';
7
7
  import { closePopup } from '@operato/popup';
8
+ import { OxPrompt } from '@operato/popup/ox-prompt.js';
8
9
  import { ApprovalLineItemsEditor } from './approval-line-items-editor';
9
10
  /**
10
11
  * 결재선의 각 결재자 리스트를 편집한다.
@@ -35,9 +36,17 @@ let ApprovalLineItemsEditorPopup = class ApprovalLineItemsEditorPopup extends lo
35
36
  firstUpdated() {
36
37
  this.changedValue = this.value;
37
38
  }
38
- onEmpty() {
39
- this.confirmCallback && this.confirmCallback(null);
40
- closePopup(this);
39
+ async onEmpty() {
40
+ const reaction = await OxPrompt.open({
41
+ title: i18next.t('text.are_you_sure'),
42
+ text: i18next.t('prompt.sure to empty approval line ?'),
43
+ confirmButton: { text: i18next.t('button.confirm') },
44
+ cancelButton: { text: i18next.t('button.cancel') }
45
+ });
46
+ if (reaction) {
47
+ this.confirmCallback && this.confirmCallback(null);
48
+ closePopup(this);
49
+ }
41
50
  }
42
51
  onCancel() {
43
52
  closePopup(this);
@@ -1 +1 @@
1
- {"version":3,"file":"approval-line-items-editor-popup.js","sourceRoot":"","sources":["../../client/component/approval-line-items-editor-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAE3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAGtE;;GAEG;AAE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AAC;;2DAA2B;AAErD;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAA8D;AACzF;IAAC,KAAK,CAAC,4BAA4B,CAAC;8BAAU,uBAAuB;IAErE,wEAAwE;;4DAFH;AApB1D,4BAA4B;IADxC,aAAa,CAAC,kCAAkC,CAAC;GACrC,4BAA4B,CA6DxC;SA7DY,4BAA4B","sourcesContent":["import '@material/web/icon/icon.js'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ButtonContainerStyles } from '@operato/styles'\nimport { closePopup } from '@operato/popup'\n\nimport { ApprovalLineItemsEditor } from './approval-line-items-editor'\nimport { ApprovalLineItem } from '../types/approval-line'\n\n/**\n * 결재선의 각 결재자 리스트를 편집한다.\n */\n@customElement('approval-line-items-editor-popup')\nexport class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n approval-line-items-editor {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) value?: ApprovalLineItem[]\n\n @property({ type: Object }) confirmCallback?: (value?: ApprovalLineItem[] | null) => void\n @query('approval-line-items-editor') editor!: ApprovalLineItemsEditor\n\n /* this.value는 (원인불명으로) 값이 Reset되므로, 변화값을 유지하도록 별도로 changedValue를 사용함 */\n private changedValue?: ApprovalLineItem[] = this.value\n\n render() {\n return html`\n <approval-line-items-editor\n .value=${this.value}\n @change=${(e: CustomEvent) => {\n this.changedValue = [...e.detail]\n }}\n ></approval-line-items-editor>\n\n <div class=\"button-container\" style=\"margin-left:unset;\">\n <button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>\n <div filler></div>\n <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>\n </div>\n `\n }\n\n firstUpdated() {\n this.changedValue = this.value\n }\n\n onEmpty() {\n this.confirmCallback && this.confirmCallback(null)\n closePopup(this)\n }\n\n onCancel() {\n closePopup(this)\n }\n\n onConfirm() {\n this.confirmCallback && this.confirmCallback(this.changedValue)\n\n closePopup(this)\n }\n}\n"]}
1
+ {"version":3,"file":"approval-line-items-editor-popup.js","sourceRoot":"","sources":["../../client/component/approval-line-items-editor-popup.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAA;AAEzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAA;AAGtE;;GAEG;AAEI,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAxE;;QAsBL,wEAAwE;QAChE,iBAAY,GAAwB,IAAI,CAAC,KAAK,CAAA;IA+CxD,CAAC;IA7CC,MAAM;QACJ,OAAO,IAAI,CAAA;;iBAEE,IAAI,CAAC,KAAK;kBACT,CAAC,CAAc,EAAE,EAAE;YAC3B,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;QACnC,CAAC;;;;yBAIgB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,8CAA8C,OAAO,CAAC,C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,IAAI,EAAE,MAAM,EAAE,CAAC;;qEAA8D;AACzF;IAAC,KAAK,CAAC,4BAA4B,CAAC;8BAAU,uBAAuB;IAErE,wEAAwE;;4DAFH;AApB1D,4BAA4B;IADxC,aAAa,CAAC,kCAAkC,CAAC;GACrC,4BAA4B,CAsExC;SAtEY,4BAA4B","sourcesContent":["import '@material/web/icon/icon.js'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ButtonContainerStyles } from '@operato/styles'\nimport { closePopup } from '@operato/popup'\nimport { OxPrompt } from '@operato/popup/ox-prompt.js'\n\nimport { ApprovalLineItemsEditor } from './approval-line-items-editor'\nimport { ApprovalLineItem } from '../types/approval-line'\n\n/**\n * 결재선의 각 결재자 리스트를 편집한다.\n */\n@customElement('approval-line-items-editor-popup')\nexport class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement) {\n static styles = [\n ButtonContainerStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n approval-line-items-editor {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Array }) value?: ApprovalLineItem[]\n\n @property({ type: Object }) confirmCallback?: (value?: ApprovalLineItem[] | null) => void\n @query('approval-line-items-editor') editor!: ApprovalLineItemsEditor\n\n /* this.value는 (원인불명으로) 값이 Reset되므로, 변화값을 유지하도록 별도로 changedValue를 사용함 */\n private changedValue?: ApprovalLineItem[] = this.value\n\n render() {\n return html`\n <approval-line-items-editor\n .value=${this.value}\n @change=${(e: CustomEvent) => {\n this.changedValue = [...e.detail]\n }}\n ></approval-line-items-editor>\n\n <div class=\"button-container\" style=\"margin-left:unset;\">\n <button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>\n <div filler></div>\n <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>\n </div>\n `\n }\n\n firstUpdated() {\n this.changedValue = this.value\n }\n\n async onEmpty() {\n const reaction = await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('prompt.sure to empty approval line ?'),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n\n if (reaction) {\n this.confirmCallback && this.confirmCallback(null)\n closePopup(this)\n }\n }\n\n onCancel() {\n closePopup(this)\n }\n\n onConfirm() {\n this.confirmCallback && this.confirmCallback(this.changedValue)\n\n closePopup(this)\n }\n}\n"]}
@@ -6,7 +6,7 @@ import { customElement, property, query, state } from 'lit/decorators.js';
6
6
  import { i18next, localize } from '@operato/i18n';
7
7
  import { DataGrist, getEditor, getRenderer } from '@operato/data-grist';
8
8
  import { isMobileDevice } from '@operato/utils';
9
- import { ButtonContainerStyles } from '@operato/styles';
9
+ import { ButtonContainerStyles, CommonHeaderStyles } from '@operato/styles';
10
10
  import { openPopup } from '@operato/layout';
11
11
  import { ApprovalLineView } from './approval-line-view';
12
12
  /**
@@ -34,10 +34,10 @@ let ApprovalLineItemsEditor = class ApprovalLineItemsEditor extends localize(i18
34
34
  }));
35
35
  }}
36
36
  >
37
- <div slot="headroom">
38
- <div id="select">
39
- <mwc-button @click=${this.openSelector.bind(this)}>${i18next.t('button.copy from')}</mwc-button>
40
- <mwc-button raised danger @click=${() => this.deleteDataItems()}>${i18next.t('button.delete')}</mwc-button>
37
+ <div slot="headroom" class="header">
38
+ <div class="actions">
39
+ <button @click=${this.openSelector.bind(this)}><md-icon>content_copy</md-icon>${i18next.t('button.copy from')}</button>
40
+ <button danger @click=${() => this.deleteDataItems()}><md-icon>delete</md-icon>${i18next.t('button.delete')}</button>
41
41
  </div>
42
42
  </div>
43
43
  </ox-grist>
@@ -261,6 +261,7 @@ let ApprovalLineItemsEditor = class ApprovalLineItemsEditor extends localize(i18
261
261
  }
262
262
  };
263
263
  ApprovalLineItemsEditor.styles = [
264
+ CommonHeaderStyles,
264
265
  ButtonContainerStyles,
265
266
  css `
266
267
  :host {
@@ -286,7 +287,7 @@ ApprovalLineItemsEditor.styles = [
286
287
  `
287
288
  ];
288
289
  __decorate([
289
- property({ type: Object }),
290
+ property({ type: Array }),
290
291
  __metadata("design:type", Array)
291
292
  ], ApprovalLineItemsEditor.prototype, "value", void 0);
292
293
  __decorate([