@things-factory/organization 7.0.55 → 7.0.56

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 (84) hide show
  1. package/client/component/approval-line-brief.ts +2 -2
  2. package/client/component/approval-line-items-editor-popup.ts +6 -4
  3. package/client/component/approval-line-items-editor.ts +5 -6
  4. package/client/component/approval-line-selector.ts +4 -4
  5. package/client/component/approval-line-templates-manager.ts +8 -6
  6. package/client/component/approval-line-view.ts +10 -6
  7. package/client/component/assignees-editor-popup.ts +4 -4
  8. package/client/component/assignees-editor.ts +3 -3
  9. package/client/component/department-selector.ts +20 -17
  10. package/client/component/recipients-editor-popup.ts +4 -4
  11. package/client/component/recipients-editor.ts +2 -2
  12. package/client/grist-editor/grist-editor-department-object.ts +1 -0
  13. package/client/pages/department/department-importer.ts +5 -4
  14. package/client/pages/department/department-list-page.ts +11 -11
  15. package/client/pages/department/department-tree-page.ts +15 -15
  16. package/client/pages/employee/employee-importer.ts +5 -4
  17. package/client/pages/employee/employee-list-page.ts +94 -86
  18. package/client/pages/employee/employees-by-department.ts +10 -10
  19. package/dist-client/component/approval-line-brief.js +2 -2
  20. package/dist-client/component/approval-line-brief.js.map +1 -1
  21. package/dist-client/component/approval-line-items-editor-popup.d.ts +1 -1
  22. package/dist-client/component/approval-line-items-editor-popup.js +6 -4
  23. package/dist-client/component/approval-line-items-editor-popup.js.map +1 -1
  24. package/dist-client/component/approval-line-items-editor.d.ts +4 -9
  25. package/dist-client/component/approval-line-items-editor.js +4 -5
  26. package/dist-client/component/approval-line-items-editor.js.map +1 -1
  27. package/dist-client/component/approval-line-selector.d.ts +1 -1
  28. package/dist-client/component/approval-line-selector.js +4 -4
  29. package/dist-client/component/approval-line-selector.js.map +1 -1
  30. package/dist-client/component/approval-line-templates-manager.d.ts +3 -7
  31. package/dist-client/component/approval-line-templates-manager.js +6 -4
  32. package/dist-client/component/approval-line-templates-manager.js.map +1 -1
  33. package/dist-client/component/approval-line-view.js +10 -6
  34. package/dist-client/component/approval-line-view.js.map +1 -1
  35. package/dist-client/component/assignees-editor-popup.d.ts +1 -1
  36. package/dist-client/component/assignees-editor-popup.js +4 -4
  37. package/dist-client/component/assignees-editor-popup.js.map +1 -1
  38. package/dist-client/component/assignees-editor.d.ts +3 -8
  39. package/dist-client/component/assignees-editor.js +1 -1
  40. package/dist-client/component/assignees-editor.js.map +1 -1
  41. package/dist-client/component/department-selector.d.ts +1 -1
  42. package/dist-client/component/department-selector.js +19 -17
  43. package/dist-client/component/department-selector.js.map +1 -1
  44. package/dist-client/component/department-view.d.ts +1 -1
  45. package/dist-client/component/recipients-editor-popup.d.ts +1 -1
  46. package/dist-client/component/recipients-editor-popup.js +4 -4
  47. package/dist-client/component/recipients-editor-popup.js.map +1 -1
  48. package/dist-client/component/recipients-editor.d.ts +3 -8
  49. package/dist-client/component/recipients-editor.js.map +1 -1
  50. package/dist-client/grist-editor/grist-editor-department-object.js +1 -0
  51. package/dist-client/grist-editor/grist-editor-department-object.js.map +1 -1
  52. package/dist-client/pages/approval-line/common-approval-line-templates-page.d.ts +1 -1
  53. package/dist-client/pages/approval-line/my-approval-line-templates-page.d.ts +1 -1
  54. package/dist-client/pages/department/department-importer.d.ts +1 -1
  55. package/dist-client/pages/department/department-importer.js +5 -4
  56. package/dist-client/pages/department/department-importer.js.map +1 -1
  57. package/dist-client/pages/department/department-list-page.d.ts +1 -1
  58. package/dist-client/pages/department/department-list-page.js +11 -11
  59. package/dist-client/pages/department/department-list-page.js.map +1 -1
  60. package/dist-client/pages/department/department-tree-page.d.ts +1 -1
  61. package/dist-client/pages/department/department-tree-page.js +15 -15
  62. package/dist-client/pages/department/department-tree-page.js.map +1 -1
  63. package/dist-client/pages/employee/employee-importer.d.ts +1 -1
  64. package/dist-client/pages/employee/employee-importer.js +5 -4
  65. package/dist-client/pages/employee/employee-importer.js.map +1 -1
  66. package/dist-client/pages/employee/employee-list-page.d.ts +3 -3
  67. package/dist-client/pages/employee/employee-list-page.js +94 -83
  68. package/dist-client/pages/employee/employee-list-page.js.map +1 -1
  69. package/dist-client/pages/employee/employees-by-department.d.ts +1 -1
  70. package/dist-client/pages/employee/employees-by-department.js +10 -10
  71. package/dist-client/pages/employee/employees-by-department.js.map +1 -1
  72. package/dist-client/route.d.ts +1 -1
  73. package/dist-client/tsconfig.tsbuildinfo +1 -1
  74. package/dist-server/service/employee/employee-type.d.ts +12 -2
  75. package/dist-server/service/employee/employee-type.js +41 -5
  76. package/dist-server/service/employee/employee-type.js.map +1 -1
  77. package/dist-server/tsconfig.tsbuildinfo +1 -1
  78. package/package.json +4 -4
  79. package/server/service/employee/employee-type.ts +28 -4
  80. package/translations/en.json +2 -0
  81. package/translations/ja.json +6 -4
  82. package/translations/ko.json +2 -0
  83. package/translations/ms.json +5 -3
  84. package/translations/zh.json +6 -4
@@ -57,8 +57,8 @@ export class ApprovalLineBrief extends localize(i18next)(LitElement) {
57
57
  }
58
58
 
59
59
  [past] span {
60
- background-color: rgba(255, 255, 255, 0.9);
61
- color: var(--primary-text-color);
60
+ background-color: var(--md-sys-color-surface);
61
+ color: var(--md-sys-color-on-surface);
62
62
  }
63
63
 
64
64
  [current] span {
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit'
3
3
  import { customElement, property, query, state } from 'lit/decorators.js'
4
4
 
5
5
  import { i18next, localize } from '@operato/i18n'
6
- import { ButtonContainerStyles } from '@operato/styles'
6
+ import { CommonHeaderStyles } from '@operato/styles'
7
7
  import { closePopup } from '@operato/popup'
8
8
  import { OxPrompt } from '@operato/popup/ox-prompt.js'
9
9
 
@@ -16,7 +16,7 @@ import { ApprovalLineItem } from '../types/approval-line'
16
16
  @customElement('approval-line-items-editor-popup')
17
17
  export class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement) {
18
18
  static styles = [
19
- ButtonContainerStyles,
19
+ CommonHeaderStyles,
20
20
  css`
21
21
  :host {
22
22
  display: flex;
@@ -48,13 +48,15 @@ export class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement)
48
48
  }}
49
49
  ></approval-line-items-editor>
50
50
 
51
- <div class="button-container" style="margin-left:unset;">
51
+ <div class="footer">
52
52
  <button @click=${this.onEmpty.bind(this)}>
53
53
  <md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}
54
54
  </button>
55
+
55
56
  <div filler></div>
57
+
56
58
  <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
57
- <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
59
+ <button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
58
60
  </div>
59
61
  `
60
62
  }
@@ -5,7 +5,7 @@ import { css, html, LitElement } from 'lit'
5
5
  import { customElement, property, query, state } from 'lit/decorators.js'
6
6
 
7
7
  import { i18next, localize } from '@operato/i18n'
8
- import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
8
+ import { DataGrist, FetchOption, getEditor, getRenderer } from '@operato/data-grist'
9
9
  import { isMobileDevice } from '@operato/utils'
10
10
  import { ButtonContainerStyles, CommonHeaderStyles } from '@operato/styles'
11
11
  import { openPopup, PopupHandle } from '@operato/layout'
@@ -37,10 +37,8 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
37
37
  flex: 1;
38
38
  }
39
39
 
40
- #select {
41
- display: flex;
42
- justify-content: end;
43
- padding: 10px;
40
+ .header {
41
+ grid-template-areas: 'filters actions';
44
42
  }
45
43
  `
46
44
  ]
@@ -82,6 +80,7 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
82
80
  <button @click=${this.openSelector.bind(this)}>
83
81
  <md-icon>content_copy</md-icon>${i18next.t('button.copy from')}
84
82
  </button>
83
+
85
84
  <button danger @click=${() => this.deleteDataItems()}>
86
85
  <md-icon>delete</md-icon>${i18next.t('button.delete')}
87
86
  </button>
@@ -275,7 +274,7 @@ export class ApprovalLineItemsEditor extends localize(i18next)(LitElement) {
275
274
  }
276
275
  }
277
276
 
278
- async fetchHandler({ filters, page, limit, sortings = [] }) {
277
+ fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {
279
278
  const value = [...(this.value || [])]
280
279
  this.value = value
281
280
 
@@ -19,14 +19,14 @@ import { client } from '@operato/graphql'
19
19
  import { i18next } from '@operato/i18n'
20
20
  import { closePopup } from '@operato/popup'
21
21
  import { isMobileDevice } from '@operato/utils'
22
- import { ButtonContainerStyles } from '@operato/styles'
22
+ import { CommonHeaderStyles } from '@operato/styles'
23
23
 
24
24
  import { ApprovalLineView } from './approval-line-view'
25
25
 
26
26
  @customElement('approval-line-selector')
27
27
  export class ApprovalLineSelector extends LitElement {
28
28
  static styles = [
29
- ButtonContainerStyles,
29
+ CommonHeaderStyles,
30
30
  css`
31
31
  :host {
32
32
  display: flex;
@@ -72,13 +72,13 @@ export class ApprovalLineSelector extends LitElement {
72
72
  >
73
73
  </ox-grist>
74
74
 
75
- <div class="button-container" style="margin-left:unset;">
75
+ <div class="footer">
76
76
  <button @click=${this.onEmpty.bind(this)}>
77
77
  <md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}
78
78
  </button>
79
79
  <div filler></div>
80
80
  <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
81
- <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
81
+ <button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
82
82
  </div>
83
83
  `
84
84
  }
@@ -6,9 +6,9 @@ import { customElement, property, query } from 'lit/decorators.js'
6
6
 
7
7
  import { client } from '@operato/graphql'
8
8
  import { i18next, localize } from '@operato/i18n'
9
- import { getEditor, getRenderer } from '@operato/data-grist'
9
+ import { FetchOption, getEditor, getRenderer } from '@operato/data-grist'
10
10
  import { isMobileDevice } from '@operato/utils'
11
- import { ButtonContainerStyles } from '@operato/styles'
11
+ import { CommonHeaderStyles } from '@operato/styles'
12
12
 
13
13
  import { ApprovalLine } from '../types/approval-line'
14
14
 
@@ -20,7 +20,7 @@ import { ApprovalLine } from '../types/approval-line'
20
20
  @customElement('approval-line-templates-manager')
21
21
  export class ApprovalLineTemplatesManager extends localize(i18next)(LitElement) {
22
22
  static styles = [
23
- ButtonContainerStyles,
23
+ CommonHeaderStyles,
24
24
  css`
25
25
  :host {
26
26
  display: flex;
@@ -48,11 +48,13 @@ export class ApprovalLineTemplatesManager extends localize(i18next)(LitElement)
48
48
  .fetchHandler=${this.fetchHandler.bind(this)}
49
49
  ></ox-grist>
50
50
 
51
- <div class="button-container">
51
+ <div class="footer">
52
52
  <button danger @click=${this._deleteDataItems.bind(this)}>
53
53
  <md-icon>delete</md-icon>${i18next.t('button.delete')}
54
54
  </button>
55
- <button @click=${this._updateDataItems.bind(this)}><md-icon>save</md-icon>${i18next.t('button.save')}</button>
55
+ <button @click=${this._updateDataItems.bind(this)} done>
56
+ <md-icon>save</md-icon>${i18next.t('button.save')}
57
+ </button>
56
58
  </div>
57
59
  `
58
60
  }
@@ -175,7 +177,7 @@ export class ApprovalLineTemplatesManager extends localize(i18next)(LitElement)
175
177
  }
176
178
  }
177
179
 
178
- async fetchHandler({ filters, page, limit, sortings = [] }) {
180
+ async fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {
179
181
  const model = this.approvalLine?.model || []
180
182
 
181
183
  return {
@@ -44,7 +44,7 @@ export class ApprovalLineView extends localize(i18next)(LitElement) {
44
44
  position: absolute;
45
45
  margin-left: -25px;
46
46
  margin-top: 10px;
47
- background-color: var(--secondary-text-color);
47
+ background-color: var(--md-sys-color-primary);
48
48
  opacity: 0.4;
49
49
  }
50
50
 
@@ -56,27 +56,31 @@ export class ApprovalLineView extends localize(i18next)(LitElement) {
56
56
  display: block;
57
57
  margin: auto;
58
58
  margin-bottom: var(--spacing-small);
59
+ color: var(--md-sys-color-primary);
59
60
  background-color: var(--md-sys-color-surface-variant);
60
61
  border-radius: 5px;
61
- border: 2px solid var(--secondary-text-color);
62
+ border: 2px solid var(--md-sys-color-primary);
62
63
  font-size: var(--fontsize-small);
63
- color: var(--secondary-text-color);
64
64
  line-height: 1;
65
65
  padding: var(--spacing-small) var(--spacing-medium);
66
66
  }
67
+
67
68
  [approver][current] span {
68
- background-color: var(--secondary-text-color);
69
- border-color: var(--secondary-text-color);
69
+ background-color: var(--md-sys-color-primary);
70
+ border-color: var(--md-sys-color-primary);
70
71
  color: var(--md-sys-color-on-primary);
71
72
  }
73
+
72
74
  [approver][current] {
73
75
  font-weight: bold;
74
76
  }
77
+
75
78
  [approver][current] ~ li span {
76
79
  background-color: rgba(0, 0, 0, 0.5);
77
80
  border-color: transparent;
78
81
  color: var(--md-sys-color-on-primary);
79
82
  }
83
+
80
84
  [approver][current] ~ li:before {
81
85
  background-color: rgba(0, 0, 0, 0.4);
82
86
  opacity: 1;
@@ -84,7 +88,7 @@ export class ApprovalLineView extends localize(i18next)(LitElement) {
84
88
  `
85
89
  ]
86
90
 
87
- @property({ type: Object }) model?: ApprovalLineItem[]
91
+ @property({ type: Array }) model?: ApprovalLineItem[]
88
92
  @property({ type: Number }) current?: number = -1
89
93
 
90
94
  render() {
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit'
3
3
  import { customElement, property, query, state } from 'lit/decorators.js'
4
4
 
5
5
  import { i18next, localize } from '@operato/i18n'
6
- import { ButtonContainerStyles } from '@operato/styles'
6
+ import { CommonHeaderStyles } from '@operato/styles'
7
7
  import { closePopup } from '@operato/popup'
8
8
 
9
9
  import { AssigneesEditor } from './assignees-editor'
@@ -15,7 +15,7 @@ import { AssigneeItem } from '../types/org-member'
15
15
  @customElement('assignees-editor-popup')
16
16
  export class AssigneesEditorPopup extends localize(i18next)(LitElement) {
17
17
  static styles = [
18
- ButtonContainerStyles,
18
+ CommonHeaderStyles,
19
19
  css`
20
20
  :host {
21
21
  display: flex;
@@ -47,13 +47,13 @@ export class AssigneesEditorPopup extends localize(i18next)(LitElement) {
47
47
  }}
48
48
  ></assignees-editor>
49
49
 
50
- <div class="button-container" style="margin-left:unset;">
50
+ <div class="footer">
51
51
  <button @click=${this.onEmpty.bind(this)}>
52
52
  <md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}
53
53
  </button>
54
54
  <div filler></div>
55
55
  <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
56
- <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
56
+ <button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
57
57
  </div>
58
58
  `
59
59
  }
@@ -5,7 +5,7 @@ import { css, html, LitElement } from 'lit'
5
5
  import { customElement, property, query, state } from 'lit/decorators.js'
6
6
 
7
7
  import { i18next, localize } from '@operato/i18n'
8
- import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
8
+ import { DataGrist, FetchOption, getEditor, getRenderer } from '@operato/data-grist'
9
9
  import { isMobileDevice } from '@operato/utils'
10
10
  import { ButtonContainerStyles } from '@operato/styles'
11
11
 
@@ -42,7 +42,7 @@ export class AssigneesEditor extends localize(i18next)(LitElement) {
42
42
  `
43
43
  ]
44
44
 
45
- @property({ type: Object }) value?: AssigneeItem[]
45
+ @property({ type: Array }) value?: AssigneeItem[]
46
46
 
47
47
  @state() gristConfig?: any
48
48
 
@@ -201,7 +201,7 @@ export class AssigneesEditor extends localize(i18next)(LitElement) {
201
201
  }
202
202
  }
203
203
 
204
- async fetchHandler({ filters, page, limit, sortings = [] }) {
204
+ async fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {
205
205
  const value = [...(this.value || [])]
206
206
  this.value = value
207
207
 
@@ -8,12 +8,12 @@ import { customElement, property, query, state } from 'lit/decorators.js'
8
8
  import { client } from '@operato/graphql'
9
9
  import { i18next } from '@operato/i18n'
10
10
  import { closePopup } from '@operato/popup'
11
- import { ButtonContainerStyles } from '@operato/styles'
11
+ import { CommonHeaderStyles } from '@operato/styles'
12
12
 
13
13
  import { Department } from '../types/department'
14
14
 
15
15
  const departmentFragment = gql`
16
- fragment Department_department on Department {
16
+ fragment SubDepartment on Department {
17
17
  id
18
18
  controlNo
19
19
  name
@@ -27,7 +27,6 @@ const departmentFragment = gql`
27
27
  email
28
28
  }
29
29
  active
30
- state
31
30
  picture
32
31
 
33
32
  updater {
@@ -41,7 +40,7 @@ const departmentFragment = gql`
41
40
  @customElement('department-selector')
42
41
  export class DepartmentSelector extends LitElement {
43
42
  static styles = [
44
- ButtonContainerStyles,
43
+ CommonHeaderStyles,
45
44
  css`
46
45
  :host {
47
46
  display: flex;
@@ -70,16 +69,18 @@ export class DepartmentSelector extends LitElement {
70
69
  .data=${this.root}
71
70
  .selected=${this.value}
72
71
  @select=${this.onSelect.bind(this)}
72
+ id-property="controlNo"
73
73
  label-property="name"
74
+ description-property="description"
74
75
  ></ox-tree-vertical>
75
76
 
76
- <div class="button-container" style="margin-left:unset;">
77
+ <div class="footer" style="margin-left:unset;">
77
78
  <button @click=${this.onEmpty.bind(this)}>
78
79
  <md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}
79
80
  </button>
80
81
  <div filler></div>
81
82
  <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
82
- <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
83
+ <button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
83
84
  </div>
84
85
  `
85
86
  }
@@ -106,22 +107,22 @@ export class DepartmentSelector extends LitElement {
106
107
  const response = await client.query({
107
108
  query: gql`
108
109
  query {
109
- responses: departmentRoot {
110
- ...Department_department
111
- children {
112
- ...Department_department
110
+ responses: departmentRoots {
111
+ total
112
+ items {
113
+ ...SubDepartment
113
114
  children {
114
- ...Department_department
115
+ ...SubDepartment
115
116
  children {
116
- ...Department_department
117
+ ...SubDepartment
117
118
  children {
118
- ...Department_department
119
+ ...SubDepartment
119
120
  children {
120
- ...Department_department
121
+ ...SubDepartment
121
122
  children {
122
- ...Department_department
123
+ ...SubDepartment
123
124
  children {
124
- ...Department_department
125
+ ...SubDepartment
125
126
  }
126
127
  }
127
128
  }
@@ -136,6 +137,8 @@ export class DepartmentSelector extends LitElement {
136
137
  `
137
138
  })
138
139
 
139
- this.root = response.data.responses
140
+ const { items: records, total } = response.data.responses
141
+
142
+ this.root = records[0]
140
143
  }
141
144
  }
@@ -3,7 +3,7 @@ import { css, html, LitElement } from 'lit'
3
3
  import { customElement, property, query, state } from 'lit/decorators.js'
4
4
 
5
5
  import { i18next, localize } from '@operato/i18n'
6
- import { ButtonContainerStyles } from '@operato/styles'
6
+ import { CommonHeaderStyles } from '@operato/styles'
7
7
  import { closePopup } from '@operato/popup'
8
8
 
9
9
  import { RecipientsEditor } from './recipients-editor'
@@ -15,7 +15,7 @@ import { AssigneeItem } from '../types/org-member'
15
15
  @customElement('recipients-editor-popup')
16
16
  export class RecipientsEditorPopup extends localize(i18next)(LitElement) {
17
17
  static styles = [
18
- ButtonContainerStyles,
18
+ CommonHeaderStyles,
19
19
  css`
20
20
  :host {
21
21
  display: flex;
@@ -47,13 +47,13 @@ export class RecipientsEditorPopup extends localize(i18next)(LitElement) {
47
47
  }}
48
48
  ></recipients-editor>
49
49
 
50
- <div class="button-container" style="margin-left:unset;">
50
+ <div class="footer">
51
51
  <button @click=${this.onEmpty.bind(this)}>
52
52
  <md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}
53
53
  </button>
54
54
  <div filler></div>
55
55
  <button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
56
- <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
56
+ <button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
57
57
  </div>
58
58
  `
59
59
  }
@@ -5,7 +5,7 @@ import { css, html, LitElement } from 'lit'
5
5
  import { customElement, property, query, state } from 'lit/decorators.js'
6
6
 
7
7
  import { i18next, localize } from '@operato/i18n'
8
- import { DataGrist, getEditor, getRenderer } from '@operato/data-grist'
8
+ import { DataGrist, FetchOption, getEditor, getRenderer } from '@operato/data-grist'
9
9
  import { ButtonContainerStyles, CommonHeaderStyles } from '@operato/styles'
10
10
  import { isMobileDevice } from '@operato/utils'
11
11
 
@@ -196,7 +196,7 @@ export class RecipientsEditor extends localize(i18next)(LitElement) {
196
196
  }
197
197
  }
198
198
 
199
- async fetchHandler({ filters, page, limit, sortings = [] }) {
199
+ async fetchHandler({ filters, page, limit, sortings = [] }: FetchOption) {
200
200
  const value = [...(this.value || [])]
201
201
  this.value = value
202
202
 
@@ -50,6 +50,7 @@ export class GristEditorDepartmentObject extends OxGristEditor {
50
50
  after: selected
51
51
  ? {
52
52
  id: selected.id,
53
+ controlNo: selected.controlNo,
53
54
  name: selected.name,
54
55
  description: selected.description
55
56
  }
@@ -8,11 +8,11 @@ import { property } from 'lit/decorators.js'
8
8
  import { client } from '@operato/graphql'
9
9
  import { i18next } from '@operato/i18n'
10
10
  import { isMobileDevice } from '@operato/utils'
11
- import { ButtonContainerStyles } from '@operato/styles'
11
+ import { CommonHeaderStyles } from '@operato/styles'
12
12
 
13
13
  export class DepartmentImporter extends LitElement {
14
14
  static styles = [
15
- ButtonContainerStyles,
15
+ CommonHeaderStyles,
16
16
  css`
17
17
  :host {
18
18
  display: flex;
@@ -63,8 +63,9 @@ export class DepartmentImporter extends LitElement {
63
63
  }}
64
64
  ></ox-grist>
65
65
 
66
- <div class="button-container">
67
- <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
66
+ <div class="footer">
67
+ <div filler></div>
68
+ <button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
68
69
  </div>
69
70
  `
70
71
  }
@@ -19,8 +19,8 @@ import gql from 'graphql-tag'
19
19
  import { DepartmentImporter } from './department-importer'
20
20
  import { Department } from '../../types/department'
21
21
 
22
- const departmentFragment = gql`
23
- fragment departmentFragment on Department {
22
+ const SubDepartmentFragment = gql`
23
+ fragment SubDepartmentFragment on Department {
24
24
  id
25
25
  controlNo
26
26
  name
@@ -139,21 +139,21 @@ export class DepartmentListPage extends connect(store)(localize(i18next)(ScopedE
139
139
  responses: departmentRoots(filters: $filters, pagination: $pagination, sortings: $sortings) {
140
140
  total
141
141
  items {
142
- ...departmentFragment
142
+ ...SubDepartmentFragment
143
143
  children(filters: $filters, sortings: $sortings) {
144
- ...departmentFragment
144
+ ...SubDepartmentFragment
145
145
  children(filters: $filters, sortings: $sortings) {
146
- ...departmentFragment
146
+ ...SubDepartmentFragment
147
147
  children(filters: $filters, sortings: $sortings) {
148
- ...departmentFragment
148
+ ...SubDepartmentFragment
149
149
  children(filters: $filters, sortings: $sortings) {
150
- ...departmentFragment
150
+ ...SubDepartmentFragment
151
151
  children(filters: $filters, sortings: $sortings) {
152
- ...departmentFragment
152
+ ...SubDepartmentFragment
153
153
  children(filters: $filters, sortings: $sortings) {
154
- ...departmentFragment
154
+ ...SubDepartmentFragment
155
155
  children(filters: $filters, sortings: $sortings) {
156
- ...departmentFragment
156
+ ...SubDepartmentFragment
157
157
  }
158
158
  }
159
159
  }
@@ -165,7 +165,7 @@ export class DepartmentListPage extends connect(store)(localize(i18next)(ScopedE
165
165
  }
166
166
  }
167
167
 
168
- ${departmentFragment}
168
+ ${SubDepartmentFragment}
169
169
  `,
170
170
  variables: {
171
171
  filters,
@@ -17,8 +17,8 @@ import { Department } from '../../types/department'
17
17
 
18
18
  import { DepartmentView } from '../../component/department-view'
19
19
 
20
- const departmentFragment = gql`
21
- fragment departmentFragment on Department {
20
+ const SubDepartmentFragment = gql`
21
+ fragment SubDepartmentFragment on Department {
22
22
  id
23
23
  controlNo
24
24
  name
@@ -174,11 +174,11 @@ export class DepartmentTreePage extends connect(store)(localize(i18next)(ScopedE
174
174
  mutation: gql`
175
175
  mutation ($department: NewDepartment!) {
176
176
  createDepartment(department: $department) {
177
- ...departmentFragment
177
+ ...SubDepartmentFragment
178
178
  }
179
179
  }
180
180
 
181
- ${departmentFragment}
181
+ ${SubDepartmentFragment}
182
182
  `,
183
183
  variables: {
184
184
  department
@@ -224,11 +224,11 @@ export class DepartmentTreePage extends connect(store)(localize(i18next)(ScopedE
224
224
  mutation: gql`
225
225
  mutation ($id: String!, $patch: DepartmentPatch!) {
226
226
  updateDepartment(id: $id, patch: $patch) {
227
- ...departmentFragment
227
+ ...SubDepartmentFragment
228
228
  }
229
229
  }
230
230
 
231
- ${departmentFragment}
231
+ ${SubDepartmentFragment}
232
232
  `,
233
233
  variables: {
234
234
  id,
@@ -306,21 +306,21 @@ export class DepartmentTreePage extends connect(store)(localize(i18next)(ScopedE
306
306
  responses: departmentRoots {
307
307
  total
308
308
  items {
309
- ...departmentFragment
309
+ ...SubDepartmentFragment
310
310
  children {
311
- ...departmentFragment
311
+ ...SubDepartmentFragment
312
312
  children {
313
- ...departmentFragment
313
+ ...SubDepartmentFragment
314
314
  children {
315
- ...departmentFragment
315
+ ...SubDepartmentFragment
316
316
  children {
317
- ...departmentFragment
317
+ ...SubDepartmentFragment
318
318
  children {
319
- ...departmentFragment
319
+ ...SubDepartmentFragment
320
320
  children {
321
- ...departmentFragment
321
+ ...SubDepartmentFragment
322
322
  children {
323
- ...departmentFragment
323
+ ...SubDepartmentFragment
324
324
  }
325
325
  }
326
326
  }
@@ -332,7 +332,7 @@ export class DepartmentTreePage extends connect(store)(localize(i18next)(ScopedE
332
332
  }
333
333
  }
334
334
 
335
- ${departmentFragment}
335
+ ${SubDepartmentFragment}
336
336
  `
337
337
  })
338
338
  const { items: records, total } = response.data.responses
@@ -8,11 +8,11 @@ import { property } from 'lit/decorators.js'
8
8
  import { client } from '@operato/graphql'
9
9
  import { i18next } from '@operato/i18n'
10
10
  import { isMobileDevice } from '@operato/utils'
11
- import { ButtonContainerStyles } from '@operato/styles'
11
+ import { CommonHeaderStyles } from '@operato/styles'
12
12
 
13
13
  export class EmployeeImporter extends LitElement {
14
14
  static styles = [
15
- ButtonContainerStyles,
15
+ CommonHeaderStyles,
16
16
  css`
17
17
  :host {
18
18
  display: flex;
@@ -63,8 +63,9 @@ export class EmployeeImporter extends LitElement {
63
63
  }}
64
64
  ></ox-grist>
65
65
 
66
- <div class="button-container">
67
- <button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
66
+ <div class="footer">
67
+ <div filler></div>
68
+ <button @click=${this.save.bind(this)} done><md-icon>save</md-icon>${i18next.t('button.save')}</button>
68
69
  </div>
69
70
  `
70
71
  }