@things-factory/organization 7.0.1-alpha.4 → 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.
- package/client/component/approval-line-items-editor-popup.ts +19 -7
- package/client/component/approval-line-items-editor.ts +44 -46
- package/client/component/approval-line-selector.ts +7 -18
- package/client/component/approval-line-templates-manager.ts +7 -8
- package/client/component/assignees-editor-popup.ts +7 -5
- package/client/component/assignees-editor.ts +2 -1
- package/client/component/department-selector.ts +8 -16
- package/client/component/department-view.ts +1 -5
- package/client/component/recipients-editor-popup.ts +7 -5
- package/client/component/recipients-editor.ts +7 -11
- package/client/grist-editor/grist-editor-approval-line.ts +4 -9
- package/client/grist-editor/grist-editor-assignees.ts +4 -7
- package/client/grist-editor/grist-editor-recipients.ts +4 -10
- package/client/grist-editor/grist-renderer-approval-line.ts +4 -3
- package/client/grist-editor/grist-renderer-assignees.ts +4 -3
- package/client/grist-editor/grist-renderer-recipients.ts +4 -3
- package/client/pages/approval-line/common-approval-line-templates-page.ts +5 -5
- package/client/pages/approval-line/my-approval-line-templates-page.ts +7 -5
- package/client/pages/department/department-importer.ts +7 -18
- package/client/pages/department/department-list-page.ts +5 -5
- package/client/pages/department/department-tree-page.ts +5 -5
- package/client/pages/employee/employee-importer.ts +4 -11
- package/client/pages/employee/employee-list-page.ts +12 -31
- package/client/pages/employee/employees-by-department.ts +1 -6
- package/dist-client/component/approval-line-items-editor-popup.d.ts +2 -1
- package/dist-client/component/approval-line-items-editor-popup.js +18 -7
- package/dist-client/component/approval-line-items-editor-popup.js.map +1 -1
- package/dist-client/component/approval-line-items-editor.js +7 -6
- package/dist-client/component/approval-line-items-editor.js.map +1 -1
- package/dist-client/component/approval-line-selector.d.ts +1 -0
- package/dist-client/component/approval-line-selector.js +6 -9
- package/dist-client/component/approval-line-selector.js.map +1 -1
- package/dist-client/component/approval-line-templates-manager.d.ts +3 -2
- package/dist-client/component/approval-line-templates-manager.js +5 -7
- package/dist-client/component/approval-line-templates-manager.js.map +1 -1
- package/dist-client/component/assignees-editor-popup.d.ts +1 -0
- package/dist-client/component/assignees-editor-popup.js +7 -5
- package/dist-client/component/assignees-editor-popup.js.map +1 -1
- package/dist-client/component/assignees-editor.d.ts +1 -0
- package/dist-client/component/assignees-editor.js +2 -1
- package/dist-client/component/assignees-editor.js.map +1 -1
- package/dist-client/component/department-selector.d.ts +1 -0
- package/dist-client/component/department-selector.js +7 -15
- package/dist-client/component/department-selector.js.map +1 -1
- package/dist-client/component/department-view.js +1 -5
- package/dist-client/component/department-view.js.map +1 -1
- package/dist-client/component/recipients-editor-popup.d.ts +1 -0
- package/dist-client/component/recipients-editor-popup.js +7 -5
- package/dist-client/component/recipients-editor-popup.js.map +1 -1
- package/dist-client/component/recipients-editor.d.ts +1 -0
- package/dist-client/component/recipients-editor.js +7 -11
- package/dist-client/component/recipients-editor.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-approval-line.d.ts +1 -0
- package/dist-client/grist-editor/grist-editor-approval-line.js +4 -9
- package/dist-client/grist-editor/grist-editor-approval-line.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-assignees.d.ts +1 -0
- package/dist-client/grist-editor/grist-editor-assignees.js +4 -6
- package/dist-client/grist-editor/grist-editor-assignees.js.map +1 -1
- package/dist-client/grist-editor/grist-editor-recipients.d.ts +1 -0
- package/dist-client/grist-editor/grist-editor-recipients.js +4 -9
- package/dist-client/grist-editor/grist-editor-recipients.js.map +1 -1
- package/dist-client/grist-editor/grist-renderer-approval-line.d.ts +1 -1
- package/dist-client/grist-editor/grist-renderer-approval-line.js +3 -3
- package/dist-client/grist-editor/grist-renderer-approval-line.js.map +1 -1
- package/dist-client/grist-editor/grist-renderer-assignees.d.ts +1 -1
- package/dist-client/grist-editor/grist-renderer-assignees.js +3 -3
- package/dist-client/grist-editor/grist-renderer-assignees.js.map +1 -1
- package/dist-client/grist-editor/grist-renderer-recipients.d.ts +1 -1
- package/dist-client/grist-editor/grist-renderer-recipients.js +3 -3
- package/dist-client/grist-editor/grist-renderer-recipients.js.map +1 -1
- package/dist-client/pages/approval-line/common-approval-line-templates-page.d.ts +10 -2
- package/dist-client/pages/approval-line/common-approval-line-templates-page.js +5 -5
- package/dist-client/pages/approval-line/common-approval-line-templates-page.js.map +1 -1
- package/dist-client/pages/approval-line/my-approval-line-templates-page.d.ts +10 -2
- package/dist-client/pages/approval-line/my-approval-line-templates-page.js +6 -5
- package/dist-client/pages/approval-line/my-approval-line-templates-page.js.map +1 -1
- package/dist-client/pages/department/department-importer.d.ts +1 -0
- package/dist-client/pages/department/department-importer.js +4 -11
- package/dist-client/pages/department/department-importer.js.map +1 -1
- package/dist-client/pages/department/department-list-page.d.ts +10 -2
- package/dist-client/pages/department/department-list-page.js +5 -5
- package/dist-client/pages/department/department-list-page.js.map +1 -1
- package/dist-client/pages/department/department-tree-page.d.ts +8 -0
- package/dist-client/pages/department/department-tree-page.js +5 -5
- package/dist-client/pages/department/department-tree-page.js.map +1 -1
- package/dist-client/pages/employee/employee-importer.d.ts +1 -0
- package/dist-client/pages/employee/employee-importer.js +4 -11
- package/dist-client/pages/employee/employee-importer.js.map +1 -1
- package/dist-client/pages/employee/employee-list-page.d.ts +10 -2
- package/dist-client/pages/employee/employee-list-page.js +8 -24
- package/dist-client/pages/employee/employee-list-page.js.map +1 -1
- package/dist-client/pages/employee/employees-by-department.js +1 -6
- package/dist-client/pages/employee/employees-by-department.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import { css, html, LitElement } from 'lit'
|
|
2
3
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
3
4
|
|
|
4
5
|
import { i18next, localize } from '@operato/i18n'
|
|
5
6
|
import { ButtonContainerStyles } from '@operato/styles'
|
|
6
7
|
import { closePopup } from '@operato/popup'
|
|
8
|
+
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
|
7
9
|
|
|
8
10
|
import { ApprovalLineItemsEditor } from './approval-line-items-editor'
|
|
9
11
|
import { ApprovalLineItem } from '../types/approval-line'
|
|
@@ -46,10 +48,11 @@ export class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement)
|
|
|
46
48
|
}}
|
|
47
49
|
></approval-line-items-editor>
|
|
48
50
|
|
|
49
|
-
<div class="button-container">
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
51
|
+
<div class="button-container" style="margin-left:unset;">
|
|
52
|
+
<button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>
|
|
53
|
+
<div filler></div>
|
|
54
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
55
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
53
56
|
</div>
|
|
54
57
|
`
|
|
55
58
|
}
|
|
@@ -58,9 +61,18 @@ export class ApprovalLineItemsEditorPopup extends localize(i18next)(LitElement)
|
|
|
58
61
|
this.changedValue = this.value
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
onEmpty() {
|
|
62
|
-
|
|
63
|
-
|
|
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
|
+
}
|
|
64
76
|
}
|
|
65
77
|
|
|
66
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:
|
|
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
|
|
81
|
-
<
|
|
82
|
-
<
|
|
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
|
|
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
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
import './approval-line-view'
|
|
3
4
|
|
|
@@ -5,15 +6,7 @@ import gql from 'graphql-tag'
|
|
|
5
6
|
import { css, html, LitElement } from 'lit'
|
|
6
7
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
8
|
|
|
8
|
-
import {
|
|
9
|
-
getRenderer,
|
|
10
|
-
DataGrist,
|
|
11
|
-
FetchOption,
|
|
12
|
-
GristEventHandler,
|
|
13
|
-
GristData,
|
|
14
|
-
GristRecord,
|
|
15
|
-
ZERO_DATA
|
|
16
|
-
} from '@operato/data-grist'
|
|
9
|
+
import { getRenderer, DataGrist, FetchOption, GristEventHandler, GristData, GristRecord, ZERO_DATA } from '@operato/data-grist'
|
|
17
10
|
import { client } from '@operato/graphql'
|
|
18
11
|
import { i18next } from '@operato/i18n'
|
|
19
12
|
import { closePopup } from '@operato/popup'
|
|
@@ -44,11 +37,6 @@ export class ApprovalLineSelector extends LitElement {
|
|
|
44
37
|
ox-grist {
|
|
45
38
|
flex: 1;
|
|
46
39
|
}
|
|
47
|
-
|
|
48
|
-
.button-container {
|
|
49
|
-
display: flex;
|
|
50
|
-
margin-left: auto;
|
|
51
|
-
}
|
|
52
40
|
`
|
|
53
41
|
]
|
|
54
42
|
|
|
@@ -76,10 +64,11 @@ export class ApprovalLineSelector extends LitElement {
|
|
|
76
64
|
>
|
|
77
65
|
</ox-grist>
|
|
78
66
|
|
|
79
|
-
<div class="button-container">
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
<
|
|
67
|
+
<div class="button-container" style="margin-left:unset;">
|
|
68
|
+
<button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>
|
|
69
|
+
<div filler></div>
|
|
70
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
71
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
83
72
|
</div>
|
|
84
73
|
`
|
|
85
74
|
}
|
|
@@ -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
|
|
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
|
-
|
|
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
|
-
<
|
|
50
|
-
<
|
|
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 { css, html, LitElement } from 'lit'
|
|
2
3
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
3
4
|
|
|
@@ -29,7 +30,7 @@ export class AssigneesEditorPopup extends localize(i18next)(LitElement) {
|
|
|
29
30
|
`
|
|
30
31
|
]
|
|
31
32
|
|
|
32
|
-
@property({ type:
|
|
33
|
+
@property({ type: Array }) value?: AssigneeItem[]
|
|
33
34
|
|
|
34
35
|
@property({ type: Object }) confirmCallback?: (value?: AssigneeItem[] | null) => void
|
|
35
36
|
@query('assignees-editor') editor!: AssigneesEditor
|
|
@@ -46,10 +47,11 @@ export class AssigneesEditorPopup extends localize(i18next)(LitElement) {
|
|
|
46
47
|
}}
|
|
47
48
|
></assignees-editor>
|
|
48
49
|
|
|
49
|
-
<div class="button-container">
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
50
|
+
<div class="button-container" style="margin-left:unset;">
|
|
51
|
+
<button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>
|
|
52
|
+
<div filler></div>
|
|
53
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
54
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
53
55
|
</div>
|
|
54
56
|
`
|
|
55
57
|
}
|
|
@@ -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
|
-
<
|
|
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 '@operato/data-tree'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -55,11 +56,6 @@ export class DepartmentSelector extends LitElement {
|
|
|
55
56
|
ox-tree-vertical {
|
|
56
57
|
flex: 1;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
.button-container {
|
|
60
|
-
display: flex;
|
|
61
|
-
margin-left: auto;
|
|
62
|
-
}
|
|
63
59
|
`
|
|
64
60
|
]
|
|
65
61
|
|
|
@@ -70,17 +66,13 @@ export class DepartmentSelector extends LitElement {
|
|
|
70
66
|
|
|
71
67
|
render() {
|
|
72
68
|
return html`
|
|
73
|
-
<ox-tree-vertical
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
@
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<div class="button-container">
|
|
81
|
-
<mwc-button @click=${this.onEmpty.bind(this)}>${i18next.t('button.empty')}</mwc-button>
|
|
82
|
-
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
83
|
-
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
69
|
+
<ox-tree-vertical .data=${this.root} .selected=${this.value} @select=${this.onSelect.bind(this)} label-property="name"></ox-tree-vertical>
|
|
70
|
+
|
|
71
|
+
<div class="button-container" style="margin-left:unset;">
|
|
72
|
+
<button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>
|
|
73
|
+
<div filler></div>
|
|
74
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
75
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
84
76
|
</div>
|
|
85
77
|
`
|
|
86
78
|
}
|
|
@@ -91,11 +91,7 @@ export class DepartmentView extends localize(i18next)(ScopedElementsMixin(LitEle
|
|
|
91
91
|
|
|
92
92
|
render() {
|
|
93
93
|
return html`
|
|
94
|
-
<ox-properties-dynamic-view
|
|
95
|
-
.props=${this.properties}
|
|
96
|
-
.value=${this.department}
|
|
97
|
-
@property-change=${this.onPropertyChange.bind(this)}
|
|
98
|
-
></ox-properties-dynamic-view>
|
|
94
|
+
<ox-properties-dynamic-view .props=${this.properties} .value=${this.department} @property-change=${this.onPropertyChange.bind(this)}></ox-properties-dynamic-view>
|
|
99
95
|
`
|
|
100
96
|
}
|
|
101
97
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import { css, html, LitElement } from 'lit'
|
|
2
3
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
3
4
|
|
|
@@ -29,7 +30,7 @@ export class RecipientsEditorPopup extends localize(i18next)(LitElement) {
|
|
|
29
30
|
`
|
|
30
31
|
]
|
|
31
32
|
|
|
32
|
-
@property({ type:
|
|
33
|
+
@property({ type: Array }) value?: AssigneeItem[]
|
|
33
34
|
|
|
34
35
|
@property({ type: Object }) confirmCallback?: (value?: AssigneeItem[] | null) => void
|
|
35
36
|
@query('recipients-editor') editor!: RecipientsEditor
|
|
@@ -46,10 +47,11 @@ export class RecipientsEditorPopup extends localize(i18next)(LitElement) {
|
|
|
46
47
|
}}
|
|
47
48
|
></recipients-editor>
|
|
48
49
|
|
|
49
|
-
<div class="button-container">
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
<
|
|
50
|
+
<div class="button-container" style="margin-left:unset;">
|
|
51
|
+
<button @click=${this.onEmpty.bind(this)}><md-icon>check_box_outline_blank</md-icon>${i18next.t('button.empty')}</button>
|
|
52
|
+
<div filler></div>
|
|
53
|
+
<button @click=${this.onCancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
54
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
53
55
|
</div>
|
|
54
56
|
`
|
|
55
57
|
}
|
|
@@ -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:
|
|
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="
|
|
76
|
-
<
|
|
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`<
|
|
21
|
-
: html`<
|
|
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`<
|
|
21
|
-
: html`<
|
|
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`<
|
|
21
|
-
: html`<
|
|
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/
|
|
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`<
|
|
11
|
-
: html`<
|
|
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/
|
|
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`<
|
|
11
|
-
: html`<
|
|
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/
|
|
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`<
|
|
11
|
-
: html`<
|
|
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
|
}
|
|
@@ -67,7 +67,10 @@ export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18
|
|
|
67
67
|
{
|
|
68
68
|
icon: 'delete',
|
|
69
69
|
title: i18next.t('button.delete'),
|
|
70
|
-
action: this.deleteApprovalLines.bind(this)
|
|
70
|
+
action: this.deleteApprovalLines.bind(this),
|
|
71
|
+
emphasis: {
|
|
72
|
+
danger: true
|
|
73
|
+
}
|
|
71
74
|
}
|
|
72
75
|
],
|
|
73
76
|
toolbar: false
|
|
@@ -80,10 +83,7 @@ export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18
|
|
|
80
83
|
return html`
|
|
81
84
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
82
85
|
<div slot="headroom" class="header">
|
|
83
|
-
<div class="title">
|
|
84
|
-
<mwc-icon>summarize</mwc-icon>
|
|
85
|
-
${i18next.t('title.common-approval-line template list')}
|
|
86
|
-
</div>
|
|
86
|
+
<div class="title">${i18next.t('title.common-approval-line template list')}</div>
|
|
87
87
|
|
|
88
88
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
89
89
|
</div>
|