@things-factory/organization 6.2.52 → 6.2.64
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/pages/approval-line/common-approval-line-templates-page.ts +15 -35
- package/client/pages/approval-line/my-approval-line-templates-page.ts +15 -35
- package/client/pages/department/department-list-page.ts +25 -15
- package/client/pages/employee/employee-list-page.ts +70 -72
- package/client/pages/employee/employees-by-department.ts +47 -44
- package/dist-client/pages/approval-line/common-approval-line-templates-page.d.ts +2 -7
- package/dist-client/pages/approval-line/common-approval-line-templates-page.js +20 -35
- 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 +2 -7
- package/dist-client/pages/approval-line/my-approval-line-templates-page.js +20 -35
- package/dist-client/pages/approval-line/my-approval-line-templates-page.js.map +1 -1
- package/dist-client/pages/department/department-list-page.d.ts +2 -6
- package/dist-client/pages/department/department-list-page.js +35 -6
- package/dist-client/pages/department/department-list-page.js.map +1 -1
- package/dist-client/pages/employee/employee-list-page.d.ts +2 -7
- package/dist-client/pages/employee/employee-list-page.js +40 -37
- package/dist-client/pages/employee/employee-list-page.js.map +1 -1
- package/dist-client/pages/employee/employees-by-department.js +15 -9
- package/dist-client/pages/employee/employees-by-department.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
|
2
3
|
import '../../component/approval-line-items-editor-popup'
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
|
5
6
|
import { PageView, store } from '@operato/shell'
|
|
6
7
|
import { css, html } from 'lit'
|
|
7
8
|
|
|
8
9
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
9
10
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
10
|
-
import {
|
|
11
|
+
import { getRenderer, DataGrist, FetchOption } from '@operato/data-grist'
|
|
11
12
|
import { client } from '@operato/graphql'
|
|
12
13
|
import { i18next, localize } from '@operato/i18n'
|
|
13
14
|
import { notify, openPopup } from '@operato/layout'
|
|
14
|
-
import { OxPopup } from '@operato/popup'
|
|
15
15
|
import { adjustFilters, isMobileDevice } from '@operato/utils'
|
|
16
16
|
|
|
17
17
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
@@ -21,7 +21,7 @@ import gql from 'graphql-tag'
|
|
|
21
21
|
export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
22
22
|
static styles = [
|
|
23
23
|
ScrollbarStyles,
|
|
24
|
-
|
|
24
|
+
CommonHeaderStyles,
|
|
25
25
|
css`
|
|
26
26
|
:host {
|
|
27
27
|
display: flex;
|
|
@@ -38,7 +38,6 @@ export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18
|
|
|
38
38
|
@property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
39
39
|
|
|
40
40
|
@query('ox-grist') private grist!: DataGrist
|
|
41
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
|
42
41
|
|
|
43
42
|
get context() {
|
|
44
43
|
return {
|
|
@@ -57,16 +56,17 @@ export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18
|
|
|
57
56
|
help: 'organization/approval-line',
|
|
58
57
|
actions: [
|
|
59
58
|
{
|
|
59
|
+
icon: 'save',
|
|
60
60
|
title: i18next.t('button.save'),
|
|
61
|
-
action: this.updateApprovalLines.bind(this)
|
|
62
|
-
...CommonButtonStyles.save
|
|
61
|
+
action: this.updateApprovalLines.bind(this)
|
|
63
62
|
},
|
|
64
63
|
{
|
|
64
|
+
icon: 'delete',
|
|
65
65
|
title: i18next.t('button.delete'),
|
|
66
|
-
action: this.deleteApprovalLines.bind(this)
|
|
67
|
-
...CommonButtonStyles.delete
|
|
66
|
+
action: this.deleteApprovalLines.bind(this)
|
|
68
67
|
}
|
|
69
|
-
]
|
|
68
|
+
],
|
|
69
|
+
toolbar: false
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,33 +75,13 @@ export class CommonApprovalLineTemplatesPage extends connect(store)(localize(i18
|
|
|
75
75
|
|
|
76
76
|
return html`
|
|
77
77
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
78
|
-
<div slot="headroom">
|
|
79
|
-
<div
|
|
80
|
-
<
|
|
78
|
+
<div slot="headroom" class="header">
|
|
79
|
+
<div class="title">
|
|
80
|
+
<mwc-icon>summarize</mwc-icon>
|
|
81
|
+
${i18next.t('title.common-approval-line template list')}
|
|
81
82
|
</div>
|
|
82
83
|
|
|
83
|
-
<
|
|
84
|
-
Sort
|
|
85
|
-
<mwc-icon
|
|
86
|
-
@click=${e => {
|
|
87
|
-
const target = e.currentTarget
|
|
88
|
-
this.sortersControl.open({
|
|
89
|
-
right: 0,
|
|
90
|
-
top: target.offsetTop + target.offsetHeight
|
|
91
|
-
})
|
|
92
|
-
}}
|
|
93
|
-
>expand_more</mwc-icon
|
|
94
|
-
>
|
|
95
|
-
<ox-popup id="sorter-control">
|
|
96
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
97
|
-
</ox-popup>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div id="modes">
|
|
101
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
102
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
103
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
104
|
-
</div>
|
|
84
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
105
85
|
</div>
|
|
106
86
|
</ox-grist>
|
|
107
87
|
`
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
|
2
3
|
import '../../component/approval-line-items-editor-popup'
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
|
5
6
|
import { PageView, store } from '@operato/shell'
|
|
6
7
|
import { css, html } from 'lit'
|
|
7
8
|
|
|
8
9
|
import { customElement, property, query } from 'lit/decorators.js'
|
|
9
10
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
10
|
-
import {
|
|
11
|
+
import { getRenderer, DataGrist, FetchOption } from '@operato/data-grist'
|
|
11
12
|
import { client } from '@operato/graphql'
|
|
12
13
|
import { i18next, localize } from '@operato/i18n'
|
|
13
14
|
import { notify, openPopup } from '@operato/layout'
|
|
14
|
-
import { OxPopup } from '@operato/popup'
|
|
15
15
|
import { isMobileDevice } from '@operato/utils'
|
|
16
16
|
|
|
17
17
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
@@ -21,7 +21,7 @@ import gql from 'graphql-tag'
|
|
|
21
21
|
export class MyApprovalLineTemplatesPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
22
22
|
static styles = [
|
|
23
23
|
ScrollbarStyles,
|
|
24
|
-
|
|
24
|
+
CommonHeaderStyles,
|
|
25
25
|
css`
|
|
26
26
|
:host {
|
|
27
27
|
display: flex;
|
|
@@ -38,7 +38,6 @@ export class MyApprovalLineTemplatesPage extends connect(store)(localize(i18next
|
|
|
38
38
|
@property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
39
39
|
|
|
40
40
|
@query('ox-grist') private grist!: DataGrist
|
|
41
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
|
42
41
|
|
|
43
42
|
get context() {
|
|
44
43
|
return {
|
|
@@ -57,16 +56,17 @@ export class MyApprovalLineTemplatesPage extends connect(store)(localize(i18next
|
|
|
57
56
|
help: 'organization/approval-line',
|
|
58
57
|
actions: [
|
|
59
58
|
{
|
|
59
|
+
icon: 'save',
|
|
60
60
|
title: i18next.t('button.save'),
|
|
61
|
-
action: this.updateApprovalLines.bind(this)
|
|
62
|
-
...CommonButtonStyles.save
|
|
61
|
+
action: this.updateApprovalLines.bind(this)
|
|
63
62
|
},
|
|
64
63
|
{
|
|
64
|
+
icon: 'delete',
|
|
65
65
|
title: i18next.t('button.delete'),
|
|
66
|
-
action: this.deleteApprovalLines.bind(this)
|
|
67
|
-
...CommonButtonStyles.delete
|
|
66
|
+
action: this.deleteApprovalLines.bind(this)
|
|
68
67
|
}
|
|
69
|
-
]
|
|
68
|
+
],
|
|
69
|
+
toolbar: false
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,33 +75,13 @@ export class MyApprovalLineTemplatesPage extends connect(store)(localize(i18next
|
|
|
75
75
|
|
|
76
76
|
return html`
|
|
77
77
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
78
|
-
<div slot="headroom">
|
|
79
|
-
<div
|
|
80
|
-
<
|
|
78
|
+
<div slot="headroom" class="header">
|
|
79
|
+
<div class="title">
|
|
80
|
+
<mwc-icon>summarize</mwc-icon>
|
|
81
|
+
${i18next.t('title.my-approval-line template list')}
|
|
81
82
|
</div>
|
|
82
83
|
|
|
83
|
-
<
|
|
84
|
-
Sort
|
|
85
|
-
<mwc-icon
|
|
86
|
-
@click=${e => {
|
|
87
|
-
const target = e.currentTarget
|
|
88
|
-
this.sortersControl.open({
|
|
89
|
-
right: 0,
|
|
90
|
-
top: target.offsetTop + target.offsetHeight
|
|
91
|
-
})
|
|
92
|
-
}}
|
|
93
|
-
>expand_more</mwc-icon
|
|
94
|
-
>
|
|
95
|
-
<ox-popup id="sorter-control">
|
|
96
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
97
|
-
</ox-popup>
|
|
98
|
-
</div>
|
|
99
|
-
|
|
100
|
-
<div id="modes">
|
|
101
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
102
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
103
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
104
|
-
</div>
|
|
84
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
105
85
|
</div>
|
|
106
86
|
</ox-grist>
|
|
107
87
|
`
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import '@operato/data-tree'
|
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
|
4
5
|
import { PageView, store } from '@operato/shell'
|
|
5
6
|
import { css, html } from 'lit'
|
|
6
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import { ScopedElementsMixin } from '@open-wc/scoped-elements'
|
|
8
9
|
import { client } from '@operato/graphql'
|
|
9
10
|
import { i18next, localize } from '@operato/i18n'
|
|
10
|
-
import { notify, openPopup } from '@operato/layout'
|
|
11
|
-
import { OxPopup } from '@operato/popup'
|
|
12
11
|
|
|
13
12
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
14
13
|
import gql from 'graphql-tag'
|
|
@@ -47,6 +46,7 @@ const departmentFragment = gql`
|
|
|
47
46
|
@customElement('department-list-page')
|
|
48
47
|
export class DepartmentListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
49
48
|
static styles = [
|
|
49
|
+
CommonHeaderStyles,
|
|
50
50
|
ScrollbarStyles,
|
|
51
51
|
css`
|
|
52
52
|
:host {
|
|
@@ -86,27 +86,27 @@ export class DepartmentListPage extends connect(store)(localize(i18next)(ScopedE
|
|
|
86
86
|
title: i18next.t('title.department list'),
|
|
87
87
|
help: 'organization/department',
|
|
88
88
|
actions: [
|
|
89
|
+
{
|
|
90
|
+
icon: 'add',
|
|
91
|
+
title: i18next.t('button.add'),
|
|
92
|
+
action: this.create.bind(this)
|
|
93
|
+
},
|
|
89
94
|
this.selected
|
|
90
95
|
? {
|
|
96
|
+
icon: 'save',
|
|
91
97
|
title: i18next.t('button.save'),
|
|
92
|
-
action: this.save.bind(this)
|
|
93
|
-
...CommonButtonStyles.save
|
|
98
|
+
action: this.save.bind(this)
|
|
94
99
|
}
|
|
95
100
|
: null,
|
|
96
101
|
{
|
|
97
|
-
|
|
98
|
-
action: this.create.bind(this),
|
|
99
|
-
...CommonButtonStyles.add
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
+
icon: 'refresh',
|
|
102
103
|
title: i18next.t('button.reset'),
|
|
103
|
-
action: this.reset.bind(this)
|
|
104
|
-
...CommonButtonStyles.save
|
|
104
|
+
action: this.reset.bind(this)
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
+
icon: 'delete',
|
|
107
108
|
title: i18next.t('button.delete'),
|
|
108
|
-
action: this.delete.bind(this)
|
|
109
|
-
...CommonButtonStyles.delete
|
|
109
|
+
action: this.delete.bind(this)
|
|
110
110
|
}
|
|
111
111
|
].filter(Boolean),
|
|
112
112
|
exportable: {
|
|
@@ -115,12 +115,22 @@ export class DepartmentListPage extends connect(store)(localize(i18next)(ScopedE
|
|
|
115
115
|
},
|
|
116
116
|
importable: {
|
|
117
117
|
handler: this.importHandler.bind(this)
|
|
118
|
-
}
|
|
118
|
+
},
|
|
119
|
+
toolbar: false
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
render() {
|
|
123
124
|
return html`
|
|
125
|
+
<div class="header">
|
|
126
|
+
<div class="title">
|
|
127
|
+
<mwc-icon>summarize</mwc-icon>
|
|
128
|
+
${i18next.t('title.department list')}
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
124
134
|
<ox-tree-vertical
|
|
125
135
|
.data=${this.root}
|
|
126
136
|
.selected=${this.selected}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
|
2
3
|
import '@things-factory/contact'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
@@ -12,9 +13,8 @@ import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
|
|
12
13
|
import { client } from '@operato/graphql'
|
|
13
14
|
import { i18next, localize } from '@operato/i18n'
|
|
14
15
|
import { notify, openPopup } from '@operato/layout'
|
|
15
|
-
import { OxPopup } from '@operato/popup'
|
|
16
16
|
import { PageView, store } from '@operato/shell'
|
|
17
|
-
import {
|
|
17
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
|
18
18
|
import { isMobileDevice } from '@operato/utils'
|
|
19
19
|
|
|
20
20
|
import { EmployeeImporter } from './employee-importer'
|
|
@@ -23,7 +23,7 @@ import { EmployeeImporter } from './employee-importer'
|
|
|
23
23
|
export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedElementsMixin(PageView))) {
|
|
24
24
|
static styles = [
|
|
25
25
|
ScrollbarStyles,
|
|
26
|
-
|
|
26
|
+
CommonHeaderStyles,
|
|
27
27
|
css`
|
|
28
28
|
:host {
|
|
29
29
|
display: flex;
|
|
@@ -46,7 +46,6 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
46
46
|
@property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
47
47
|
|
|
48
48
|
@query('ox-grist') private grist!: DataGrist
|
|
49
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
|
50
49
|
|
|
51
50
|
get context() {
|
|
52
51
|
return {
|
|
@@ -65,14 +64,14 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
65
64
|
help: 'organization/employee',
|
|
66
65
|
actions: [
|
|
67
66
|
{
|
|
67
|
+
icon: 'save',
|
|
68
68
|
title: i18next.t('button.save'),
|
|
69
|
-
action: this._updateEmployee.bind(this)
|
|
70
|
-
...CommonButtonStyles.save
|
|
69
|
+
action: this._updateEmployee.bind(this)
|
|
71
70
|
},
|
|
72
71
|
{
|
|
72
|
+
icon: 'delete',
|
|
73
73
|
title: i18next.t('button.delete'),
|
|
74
|
-
action: this._deleteEmployee.bind(this)
|
|
75
|
-
...CommonButtonStyles.delete
|
|
74
|
+
action: this._deleteEmployee.bind(this)
|
|
76
75
|
}
|
|
77
76
|
],
|
|
78
77
|
exportable: {
|
|
@@ -81,7 +80,8 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
81
80
|
},
|
|
82
81
|
importable: {
|
|
83
82
|
handler: this.importHandler.bind(this)
|
|
84
|
-
}
|
|
83
|
+
},
|
|
84
|
+
toolbar: false
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
@@ -90,33 +90,17 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
90
90
|
|
|
91
91
|
return html`
|
|
92
92
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
93
|
-
<div slot="headroom">
|
|
94
|
-
<div
|
|
95
|
-
<
|
|
93
|
+
<div slot="headroom" class="header">
|
|
94
|
+
<div class="title">
|
|
95
|
+
<mwc-icon>summarize</mwc-icon>
|
|
96
|
+
${i18next.t('title.employee list')}
|
|
96
97
|
</div>
|
|
97
98
|
|
|
98
|
-
<div
|
|
99
|
-
|
|
100
|
-
<mwc-icon
|
|
101
|
-
@click=${e => {
|
|
102
|
-
const target = e.currentTarget
|
|
103
|
-
this.sortersControl.open({
|
|
104
|
-
right: 0,
|
|
105
|
-
top: target.offsetTop + target.offsetHeight
|
|
106
|
-
})
|
|
107
|
-
}}
|
|
108
|
-
>expand_more</mwc-icon
|
|
109
|
-
>
|
|
110
|
-
<ox-popup id="sorter-control">
|
|
111
|
-
<ox-sorters-control> </ox-sorters-control>
|
|
112
|
-
</ox-popup>
|
|
99
|
+
<div class="filters">
|
|
100
|
+
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
|
113
101
|
</div>
|
|
114
102
|
|
|
115
|
-
<
|
|
116
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
117
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
118
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
119
|
-
</div>
|
|
103
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
120
104
|
</div>
|
|
121
105
|
</ox-grist>
|
|
122
106
|
`
|
|
@@ -124,7 +108,7 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
124
108
|
|
|
125
109
|
async pageInitialized(lifecycle: any) {
|
|
126
110
|
this.gristConfig = {
|
|
127
|
-
pagination: { pages
|
|
111
|
+
pagination: { pages: [50, 100, 200] },
|
|
128
112
|
list: {
|
|
129
113
|
thumbnail: 'profile',
|
|
130
114
|
fields: ['controlNo', 'name'],
|
|
@@ -212,9 +196,9 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
212
196
|
width: 115,
|
|
213
197
|
sortable: false,
|
|
214
198
|
filter: false,
|
|
215
|
-
record: {
|
|
216
|
-
editable: true,
|
|
217
|
-
codeName: 'EMPLOYEE_TYPE'
|
|
199
|
+
record: {
|
|
200
|
+
editable: true,
|
|
201
|
+
codeName: 'EMPLOYEE_TYPE'
|
|
218
202
|
}
|
|
219
203
|
},
|
|
220
204
|
{
|
|
@@ -237,11 +221,15 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
237
221
|
options: {
|
|
238
222
|
title: i18next.t('title.employee list'),
|
|
239
223
|
queryName: 'employees',
|
|
240
|
-
pagination: { pages
|
|
224
|
+
pagination: { pages: [50, 100, 200] },
|
|
241
225
|
basicArgs: {
|
|
242
|
-
filters: [
|
|
243
|
-
|
|
244
|
-
|
|
226
|
+
filters: [
|
|
227
|
+
{
|
|
228
|
+
name: 'active',
|
|
229
|
+
operator: 'eq',
|
|
230
|
+
value: true
|
|
231
|
+
}
|
|
232
|
+
]
|
|
245
233
|
},
|
|
246
234
|
list: { fields: ['controlNo', 'name', 'alias', 'hiredOn'] },
|
|
247
235
|
columns: [
|
|
@@ -253,54 +241,54 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
253
241
|
filter: 'search',
|
|
254
242
|
sortable: true
|
|
255
243
|
},
|
|
256
|
-
{
|
|
244
|
+
{
|
|
257
245
|
name: 'name',
|
|
258
246
|
width: 120,
|
|
259
|
-
header: { renderer: () => i18next.t('field.name') },
|
|
247
|
+
header: { renderer: () => i18next.t('field.name') },
|
|
260
248
|
filter: 'search',
|
|
261
249
|
sortable: true
|
|
262
250
|
},
|
|
263
|
-
{
|
|
264
|
-
name: 'alias',
|
|
251
|
+
{
|
|
252
|
+
name: 'alias',
|
|
265
253
|
width: 150,
|
|
266
|
-
header: { renderer: () => i18next.t('label.alias') },
|
|
254
|
+
header: { renderer: () => i18next.t('label.alias') },
|
|
267
255
|
filter: 'search',
|
|
268
256
|
sortable: true
|
|
269
257
|
},
|
|
270
|
-
{
|
|
271
|
-
type: 'code',
|
|
272
|
-
name: 'type',
|
|
258
|
+
{
|
|
259
|
+
type: 'code',
|
|
260
|
+
name: 'type',
|
|
273
261
|
width: 110,
|
|
274
|
-
header: { renderer: () => i18next.t('label.type') },
|
|
275
|
-
record: {
|
|
276
|
-
editable: false,
|
|
277
|
-
codeName: 'EMPLOYEE_TYPE'
|
|
262
|
+
header: { renderer: () => i18next.t('label.type') },
|
|
263
|
+
record: {
|
|
264
|
+
editable: false,
|
|
265
|
+
codeName: 'EMPLOYEE_TYPE'
|
|
278
266
|
}
|
|
279
267
|
},
|
|
280
|
-
{
|
|
281
|
-
type: 'code',
|
|
282
|
-
name: 'jobPosition',
|
|
268
|
+
{
|
|
269
|
+
type: 'code',
|
|
270
|
+
name: 'jobPosition',
|
|
283
271
|
width: 110,
|
|
284
|
-
header: { renderer: () => i18next.t('label.job-position') },
|
|
285
|
-
record: {
|
|
286
|
-
editable: false,
|
|
287
|
-
codeName: 'JOB_POSITION'
|
|
272
|
+
header: { renderer: () => i18next.t('label.job-position') },
|
|
273
|
+
record: {
|
|
274
|
+
editable: false,
|
|
275
|
+
codeName: 'JOB_POSITION'
|
|
288
276
|
}
|
|
289
277
|
},
|
|
290
|
-
{
|
|
291
|
-
type: 'code',
|
|
292
|
-
name: 'jobResponsibility',
|
|
278
|
+
{
|
|
279
|
+
type: 'code',
|
|
280
|
+
name: 'jobResponsibility',
|
|
293
281
|
width: 200,
|
|
294
|
-
header: { renderer: () => i18next.t('label.job-responsibility') },
|
|
295
|
-
record: {
|
|
296
|
-
editable: false,
|
|
297
|
-
codeName: 'JOB_RESPONSIBILITY'
|
|
282
|
+
header: { renderer: () => i18next.t('label.job-responsibility') },
|
|
283
|
+
record: {
|
|
284
|
+
editable: false,
|
|
285
|
+
codeName: 'JOB_RESPONSIBILITY'
|
|
298
286
|
}
|
|
299
287
|
},
|
|
300
288
|
{
|
|
301
289
|
type: 'date',
|
|
302
290
|
name: 'hiredOn',
|
|
303
|
-
header: { renderer: () => i18next.t('field.hired-on') },
|
|
291
|
+
header: { renderer: () => i18next.t('field.hired-on') },
|
|
304
292
|
width: 100
|
|
305
293
|
}
|
|
306
294
|
],
|
|
@@ -343,9 +331,9 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
343
331
|
name: 'jobResponsibility',
|
|
344
332
|
header: i18next.t('label.job-responsibility'),
|
|
345
333
|
width: 175,
|
|
346
|
-
record: {
|
|
347
|
-
editable: true,
|
|
348
|
-
codeName: 'JOB_RESPONSIBILITY'
|
|
334
|
+
record: {
|
|
335
|
+
editable: true,
|
|
336
|
+
codeName: 'JOB_RESPONSIBILITY'
|
|
349
337
|
}
|
|
350
338
|
},
|
|
351
339
|
{
|
|
@@ -355,7 +343,7 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
355
343
|
width: 100,
|
|
356
344
|
record: {
|
|
357
345
|
editable: true,
|
|
358
|
-
codeName: 'JOB_POSITION'
|
|
346
|
+
codeName: 'JOB_POSITION'
|
|
359
347
|
}
|
|
360
348
|
},
|
|
361
349
|
{
|
|
@@ -578,7 +566,17 @@ export class EmployeeListPage extends connect(store)(localize(i18next)(ScopedEle
|
|
|
578
566
|
|
|
579
567
|
async exportHandler() {
|
|
580
568
|
const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records
|
|
581
|
-
const targetFieldSet = new Set([
|
|
569
|
+
const targetFieldSet = new Set([
|
|
570
|
+
'id',
|
|
571
|
+
'controlNo',
|
|
572
|
+
'name',
|
|
573
|
+
'alias',
|
|
574
|
+
'type',
|
|
575
|
+
'hiredOn',
|
|
576
|
+
'retiredAt',
|
|
577
|
+
'active',
|
|
578
|
+
'note'
|
|
579
|
+
])
|
|
582
580
|
|
|
583
581
|
return exportTargets.map(employee => {
|
|
584
582
|
let tempObj = {}
|