sumba 1.2.14 → 1.2.15
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
CHANGED
package/bajo/intl/id.json
CHANGED
package/dobo/feature/user-id.js
CHANGED
|
@@ -9,7 +9,13 @@ async function userId (opts = {}) {
|
|
|
9
9
|
site: {
|
|
10
10
|
schema: 'SumbaSite',
|
|
11
11
|
propName: 'id',
|
|
12
|
-
type: 'one-
|
|
12
|
+
type: 'one-to-one'
|
|
13
|
+
},
|
|
14
|
+
user: {
|
|
15
|
+
schema: 'SumbaUser',
|
|
16
|
+
propName: 'id',
|
|
17
|
+
type: 'one-to-one',
|
|
18
|
+
fields: ['id', 'username', 'email', 'firstName', 'lastName']
|
|
13
19
|
}
|
|
14
20
|
},
|
|
15
21
|
index: true
|
package/package.json
CHANGED
|
@@ -6,6 +6,10 @@ async function download () {
|
|
|
6
6
|
description: async function (val, rec) {
|
|
7
7
|
const sentence = `<c:a target="_blank" href="sumba:/your-stuff/download/get/${rec.file}" content="${val}" @click.stop />`
|
|
8
8
|
return await this.component.buildSentence(sentence)
|
|
9
|
+
},
|
|
10
|
+
size: function (val, rec) {
|
|
11
|
+
const { formatByte } = this.plugin.app.bajoExtra
|
|
12
|
+
return formatByte(rec.size)
|
|
9
13
|
}
|
|
10
14
|
}
|
|
11
15
|
},
|
|
@@ -5,6 +5,18 @@ async function teamUser () {
|
|
|
5
5
|
{ name: 'meta', fields: ['id', 'createdAt', 'updatedAt'] },
|
|
6
6
|
{ name: 'general', fields: ['userId:6-md', 'teamId:6-md'] }
|
|
7
7
|
],
|
|
8
|
+
calcFields: [
|
|
9
|
+
{ name: 'user', type: 'string' },
|
|
10
|
+
{ name: 'team', type: 'string' }
|
|
11
|
+
],
|
|
12
|
+
valueFormatter: {
|
|
13
|
+
user: (val, rec) => {
|
|
14
|
+
return rec._rel.user.username
|
|
15
|
+
},
|
|
16
|
+
team: (val, rec) => {
|
|
17
|
+
return rec._rel.team.name
|
|
18
|
+
}
|
|
19
|
+
},
|
|
8
20
|
widget: {
|
|
9
21
|
userId: {
|
|
10
22
|
component: 'form-select-ext',
|
|
@@ -12,7 +24,8 @@ async function teamUser () {
|
|
|
12
24
|
remoteUrl: 'sumba.restapi:/manage/user',
|
|
13
25
|
remoteSearchField: 'username',
|
|
14
26
|
remoteLabelField: 'username',
|
|
15
|
-
remoteApiKey: true
|
|
27
|
+
remoteApiKey: true,
|
|
28
|
+
rel: 'user:username'
|
|
16
29
|
}
|
|
17
30
|
},
|
|
18
31
|
teamId: {
|
|
@@ -21,14 +34,15 @@ async function teamUser () {
|
|
|
21
34
|
remoteUrl: 'sumba.restapi:/manage/team',
|
|
22
35
|
remoteSearchField: 'name',
|
|
23
36
|
remoteLabelField: 'name',
|
|
24
|
-
remoteApiKey: true
|
|
37
|
+
remoteApiKey: true,
|
|
38
|
+
rel: 'team:name'
|
|
25
39
|
}
|
|
26
40
|
}
|
|
27
41
|
}
|
|
28
42
|
},
|
|
29
43
|
view: {
|
|
30
44
|
list: {
|
|
31
|
-
fields: ['
|
|
45
|
+
fields: ['user', 'team', 'createdAt', 'updatedAt'],
|
|
32
46
|
stat: {
|
|
33
47
|
aggregate: [
|
|
34
48
|
{ fields: ['userId'], group: 'userId', aggregate: ['count'] },
|