sumba 1.1.18 → 1.1.20
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/bajo/intl/en-US.json +11 -1
- package/bajo/intl/id.json +12 -2
- package/dobo/fixture/team-user.json +1 -1
- package/dobo/schema/contact-form.json +0 -1
- package/dobo/schema/team-user.json +15 -5
- package/package.json +1 -1
- package/plugin/factory.js +25 -0
- package/waibuDb/schema/contact-form-cat.json +17 -0
- package/waibuDb/schema/contact-form.json +28 -0
- package/waibuDb/schema/team-user.js +32 -0
- package/waibuDb/schema/team.json +31 -0
- package/waibuDb/schema/ticket-cat.json +17 -0
- package/waibuMpa/extend/waibuAdmin/route/contact-form/@action.js +11 -0
- package/waibuMpa/extend/waibuAdmin/route/contact-form-cat/@action.js +11 -0
- package/waibuMpa/extend/waibuAdmin/route/site/@action.js +1 -1
- package/waibuMpa/extend/waibuAdmin/route/team/@action.js +11 -0
- package/waibuMpa/extend/waibuAdmin/route/team-user/@action.js +11 -0
- package/waibuMpa/extend/waibuAdmin/route/ticket-cat/@action.js +11 -0
- package/waibuMpa/extend/waibuAdmin/route/user/@action.js +1 -1
- package/dobo/feature/parent-id.js +0 -19
package/bajo/intl/en-US.json
CHANGED
|
@@ -90,6 +90,15 @@
|
|
|
90
90
|
"activation": "Activation",
|
|
91
91
|
"addTroubleTickets": "Create New Ticket",
|
|
92
92
|
"ourAddress": "Our Address",
|
|
93
|
+
"contactFormCat": "Contact Form Category",
|
|
94
|
+
"ticket": "Ticket",
|
|
95
|
+
"ticketCat": "Ticket Category",
|
|
96
|
+
"supportSystem": "Support System",
|
|
97
|
+
"management": "Management",
|
|
98
|
+
"manageSite": "Manage Site",
|
|
99
|
+
"manageUser": "Manage User",
|
|
100
|
+
"manageTeam": "Manage Team",
|
|
101
|
+
"manageTeamUser": "Manage Team Member",
|
|
93
102
|
"field": {
|
|
94
103
|
"currentPassword": "Current Password",
|
|
95
104
|
"newPassword": "New Password",
|
|
@@ -102,7 +111,8 @@
|
|
|
102
111
|
"subject": "Subject",
|
|
103
112
|
"message": "Message",
|
|
104
113
|
"cat": "Category",
|
|
105
|
-
"waPhone": "WA Phone"
|
|
114
|
+
"waPhone": "WA Phone",
|
|
115
|
+
"teamId": "Team ID"
|
|
106
116
|
},
|
|
107
117
|
"validation": {
|
|
108
118
|
"password": {
|
package/bajo/intl/id.json
CHANGED
|
@@ -89,8 +89,17 @@
|
|
|
89
89
|
"catMisc": "Lain-lain",
|
|
90
90
|
"catTechnical": "Masalah Teknis",
|
|
91
91
|
"activation": "Aktivasi",
|
|
92
|
-
"addTroubleTickets": "Buat
|
|
92
|
+
"addTroubleTickets": "Buat Tiket Baru",
|
|
93
93
|
"ourAddress": "Alamat Kami",
|
|
94
|
+
"contactFormCat": "Kategori Form Kontak",
|
|
95
|
+
"ticket": "Tiket",
|
|
96
|
+
"ticketCat": "Kategori Tiket",
|
|
97
|
+
"supportSystem": "Sistim Dukungan",
|
|
98
|
+
"management": "Pengelolaan",
|
|
99
|
+
"manageSite": "Kelola Situs",
|
|
100
|
+
"manageUser": "Kelola Pengguna",
|
|
101
|
+
"manageTeam": "Kelola Tim",
|
|
102
|
+
"manageTeamUser": "Manage Anggota Tim",
|
|
94
103
|
"field": {
|
|
95
104
|
"currentPassword": "Kata Sandi Saat Ini",
|
|
96
105
|
"newPassword": "Kata Sandi Baru",
|
|
@@ -103,7 +112,8 @@
|
|
|
103
112
|
"subject": "Judul",
|
|
104
113
|
"message": "Pesan",
|
|
105
114
|
"cat": "Kategori",
|
|
106
|
-
"waPhone": "WA Phone"
|
|
115
|
+
"waPhone": "WA Phone",
|
|
116
|
+
"teamId": "ID Tim"
|
|
107
117
|
},
|
|
108
118
|
"validation": {
|
|
109
119
|
"password": {
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
"properties": [
|
|
3
|
-
|
|
2
|
+
"properties": [{
|
|
3
|
+
"name": "teamId",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"maxLength": 50,
|
|
6
|
+
"required": true,
|
|
7
|
+
"rel": {
|
|
8
|
+
"team": {
|
|
9
|
+
"schema": "SumbaTeam",
|
|
10
|
+
"propName": "id",
|
|
11
|
+
"type": "one-to-one"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}],
|
|
4
15
|
"indexes": [{
|
|
5
|
-
"fields": ["userId", "siteId", "
|
|
16
|
+
"fields": ["userId", "siteId", "teamId"],
|
|
6
17
|
"unique": true
|
|
7
18
|
}],
|
|
8
19
|
"feature": {
|
|
9
20
|
"createdAt": true,
|
|
10
21
|
"updatedAt": true,
|
|
11
22
|
"sumba.siteId": true,
|
|
12
|
-
"sumba.userId": true
|
|
13
|
-
"sumba.parentId": true
|
|
23
|
+
"sumba.userId": true
|
|
14
24
|
}
|
|
15
25
|
}
|
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -77,6 +77,8 @@ async function factory (pkgName) {
|
|
|
77
77
|
}]
|
|
78
78
|
},
|
|
79
79
|
waibuAdmin: {
|
|
80
|
+
menuHandler: 'sumba:adminMenu',
|
|
81
|
+
menuCollapsible: true,
|
|
80
82
|
modelDisabled: 'all'
|
|
81
83
|
},
|
|
82
84
|
auth: {
|
|
@@ -142,6 +144,29 @@ async function factory (pkgName) {
|
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
|
|
147
|
+
adminMenu = async (locals, req) => {
|
|
148
|
+
if (!this.app.waibuAdmin) return
|
|
149
|
+
const { getPluginPrefix } = this.app.waibu
|
|
150
|
+
const prefix = getPluginPrefix(this.name)
|
|
151
|
+
return [{
|
|
152
|
+
title: 'supportSystem',
|
|
153
|
+
children: [
|
|
154
|
+
{ title: 'contactForm', href: `waibuAdmin:/${prefix}/contact-form/list` },
|
|
155
|
+
{ title: 'contactFormCat', href: `waibuAdmin:/${prefix}/contact-form-cat/list` },
|
|
156
|
+
{ title: 'ticket', href: `waibuAdmin:/${prefix}/ticket/list` },
|
|
157
|
+
{ title: 'ticketCat', href: `waibuAdmin:/${prefix}/ticket-cat/list` }
|
|
158
|
+
]
|
|
159
|
+
}, {
|
|
160
|
+
title: 'management',
|
|
161
|
+
children: [
|
|
162
|
+
{ title: 'manageSite', href: `waibuAdmin:/${prefix}/site/list` },
|
|
163
|
+
{ title: 'manageUser', href: `waibuAdmin:/${prefix}/user/list` },
|
|
164
|
+
{ title: 'manageTeam', href: `waibuAdmin:/${prefix}/team/list` },
|
|
165
|
+
{ title: 'manageTeamUser', href: `waibuAdmin:/${prefix}/team-user/list` }
|
|
166
|
+
]
|
|
167
|
+
}]
|
|
168
|
+
}
|
|
169
|
+
|
|
145
170
|
getUser = async (rec, safe = true) => {
|
|
146
171
|
const { recordGet } = this.app.dobo
|
|
147
172
|
const { omit, isPlainObject } = this.lib._
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"hidden": ["siteId"],
|
|
4
|
+
"layout": [
|
|
5
|
+
{ "name": "meta", "fields": ["id"] },
|
|
6
|
+
{ "name": "general", "fields": ["name:9-md", "level:3-md"] }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"view": {
|
|
10
|
+
"add": {
|
|
11
|
+
"hidden": ["id"]
|
|
12
|
+
},
|
|
13
|
+
"edit": {
|
|
14
|
+
"readonly": ["id"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"disabled": ["create"],
|
|
4
|
+
"layout": [
|
|
5
|
+
{ "name": "meta", "fields": ["id", "createdAt", "updatedAt", "status", "userId"] },
|
|
6
|
+
{ "name": "general", "fields": ["firstName:6-md", "lastName:6-md", "email:6-md", "cat:6-md", "subject:12", "message:12"] }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"view": {
|
|
10
|
+
"list": {
|
|
11
|
+
"fields": ["createdAt", "status", "firstName", "lastName", "cat", "subject"],
|
|
12
|
+
"stat": {
|
|
13
|
+
"aggregate": [
|
|
14
|
+
{ "fields": ["status"], "group": "status", "aggregate": ["count"] },
|
|
15
|
+
{ "fields": ["cat"], "group": "cat", "aggregate": ["count"] }
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"details": {
|
|
20
|
+
},
|
|
21
|
+
"add": {
|
|
22
|
+
"hidden": ["id", "createdAt", "updatedAt", "userId", "status"]
|
|
23
|
+
},
|
|
24
|
+
"edit": {
|
|
25
|
+
"readonly": ["id", "createdAt", "updatedAt", "userId"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
async function teamUser () {
|
|
2
|
+
return {
|
|
3
|
+
common: {
|
|
4
|
+
hidden: ['siteId'],
|
|
5
|
+
layout: [
|
|
6
|
+
{ name: 'meta', fields: ['id', 'createdAt', 'updatedAt'] },
|
|
7
|
+
{ name: 'general', fields: ['userId:6-md', 'teamId:6-md'] }
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
view: {
|
|
11
|
+
list: {
|
|
12
|
+
fields: ['userId', 'teamId', 'createdAt', 'updatedAt'],
|
|
13
|
+
stat: {
|
|
14
|
+
aggregate: [
|
|
15
|
+
{ fields: ['userId'], group: 'userId', aggregate: ['count'] },
|
|
16
|
+
{ fields: ['teamId'], group: 'teamId', aggregate: ['count'] }
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
details: {
|
|
21
|
+
},
|
|
22
|
+
add: {
|
|
23
|
+
hidden: ['id', 'createdAt', 'updatedAt']
|
|
24
|
+
},
|
|
25
|
+
edit: {
|
|
26
|
+
readonly: ['id', 'createdAt', 'updatedAt']
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export default teamUser
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"hidden": ["siteId"],
|
|
4
|
+
"layout": [
|
|
5
|
+
{ "name": "meta", "fields": ["id", "createdAt", "updatedAt", "status"] },
|
|
6
|
+
{ "name": "general", "fields": ["alias:6-md", "name:6-md"] }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"view": {
|
|
10
|
+
"list": {
|
|
11
|
+
"qs": {
|
|
12
|
+
"sort": "alias:1",
|
|
13
|
+
"limit": 10
|
|
14
|
+
},
|
|
15
|
+
"fields": ["alias", "name", "status", "createdAt", "updatedAt"],
|
|
16
|
+
"stat": {
|
|
17
|
+
"aggregate": [
|
|
18
|
+
{ "fields": ["status"], "group": "status", "aggregate": ["count"] }
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"details": {
|
|
23
|
+
},
|
|
24
|
+
"add": {
|
|
25
|
+
"hidden": ["id", "createdAt", "updatedAt", "status"]
|
|
26
|
+
},
|
|
27
|
+
"edit": {
|
|
28
|
+
"readonly": ["id", "createdAt", "updatedAt", "alias"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"hidden": ["siteId"],
|
|
4
|
+
"layout": [
|
|
5
|
+
{ "name": "meta", "fields": ["id"] },
|
|
6
|
+
{ "name": "general", "fields": ["name:9-md", "level:3-md"] }
|
|
7
|
+
]
|
|
8
|
+
},
|
|
9
|
+
"view": {
|
|
10
|
+
"add": {
|
|
11
|
+
"hidden": ["id"]
|
|
12
|
+
},
|
|
13
|
+
"edit": {
|
|
14
|
+
"readonly": ["id"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'contactForm',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'SumbaContactForm', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'contactFormCat',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'SumbaContactFormCat', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'manageTeam',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'SumbaTeam', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'manageTeamUser',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'SumbaTeamUser', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const action = {
|
|
2
|
+
method: ['GET', 'POST'],
|
|
3
|
+
title: 'ticketCat',
|
|
4
|
+
handler: async function (req, reply) {
|
|
5
|
+
const { importModule } = this.app.bajo
|
|
6
|
+
const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
|
|
7
|
+
return await crudSkel.call(this, 'SumbaTicketCat', req, reply)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default action
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
async function parentId (opts = {}) {
|
|
2
|
-
return {
|
|
3
|
-
properties: [{
|
|
4
|
-
name: 'parentId',
|
|
5
|
-
type: 'string',
|
|
6
|
-
maxLength: 50,
|
|
7
|
-
rel: {
|
|
8
|
-
site: {
|
|
9
|
-
schema: 'SumbaSite',
|
|
10
|
-
propName: 'id',
|
|
11
|
-
type: 'one-to-one'
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
index: true
|
|
15
|
-
}]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default parentId
|