sumba 1.1.10 → 1.1.12
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 +1 -0
- package/bajo/intl/id.json +1 -0
- package/bajoTemplate/partial/my-stuff/profile/edit.html +2 -2
- package/bajoTemplate/partial/my-stuff/profile/view.html +2 -2
- package/package.json +1 -1
- package/plugin/factory.js +1 -10
- package/waibuMpa/route/help/trouble-tickets/list.js +2 -1
package/bajo/intl/en-US.json
CHANGED
package/bajo/intl/id.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<c:form referer enctype="multipart/form-data">
|
|
2
2
|
<c:grid-row>
|
|
3
|
-
<c:grid-col col="
|
|
3
|
+
<c:grid-col col="9-md">
|
|
4
4
|
<c:fieldset t:legend="meta" grid-gutter="2" margin="bottom-3">
|
|
5
5
|
<c:form-plaintext name="createdAt" label-floating col="6-md"/>
|
|
6
6
|
<c:form-plaintext name="updatedAt" label-floating col="6-md"/>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<c:form-input name="website" label-floating col="6-lg"/>
|
|
23
23
|
</c:fieldset>
|
|
24
24
|
</c:grid-col>
|
|
25
|
-
<c:grid-col col="
|
|
25
|
+
<c:grid-col col="3-md">
|
|
26
26
|
<c:heading type="5" t:content="image" />
|
|
27
27
|
<c:div border rounded flex="justify-content:center">
|
|
28
28
|
<c:img src="dobo:/attachment/SumbaUser/<%= form.id %>/profile/main.png?notfound=sumba.asset:/user-profile.png" responsive rounded />
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<c:grid-row gutter="4">
|
|
2
|
-
<c:grid-col col="
|
|
2
|
+
<c:grid-col col="9-md">
|
|
3
3
|
<c:fieldset t:legend="meta" grid-gutter="2" margin="bottom-3">
|
|
4
4
|
<c:form-plaintext name="createdAt" label-floating col="6-md"/>
|
|
5
5
|
<c:form-plaintext name="updatedAt" label-floating col="6-md"/>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<c:form-plaintext name="website" label-floating col="6-lg"/>
|
|
22
22
|
</c:fieldset>
|
|
23
23
|
</c:grid-col>
|
|
24
|
-
<c:grid-col col="
|
|
24
|
+
<c:grid-col col="3-md">
|
|
25
25
|
<c:heading type="5" t:content="image" />
|
|
26
26
|
<c:div border rounded flex="justify-content:center">
|
|
27
27
|
<c:img src="dobo:/attachment/SumbaUser/<%= form.id %>/profile/main.png?notfound=sumba.asset:/user-profile.png" responsive rounded />
|
package/package.json
CHANGED
package/plugin/factory.js
CHANGED
|
@@ -28,7 +28,7 @@ async function factory (pkgName) {
|
|
|
28
28
|
constructor () {
|
|
29
29
|
super(pkgName, me.app)
|
|
30
30
|
this.alias = 'sumba'
|
|
31
|
-
this.dependencies = ['
|
|
31
|
+
this.dependencies = ['bajo-extra', 'bajo-common-db']
|
|
32
32
|
this.config = {
|
|
33
33
|
multiSite: false,
|
|
34
34
|
waibu: {
|
|
@@ -169,15 +169,6 @@ async function factory (pkgName) {
|
|
|
169
169
|
return { token, expiresAt }
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
// based on: https://medium.com/@paulohfev/problem-solving-how-to-create-an-excerpt-fdb048687928
|
|
173
|
-
createExcerpt = (content, maxWords = 100, trailChars = '...') => {
|
|
174
|
-
const listOfWords = content.trim().split(' ')
|
|
175
|
-
const truncatedContent = listOfWords.slice(0, maxWords).join(' ')
|
|
176
|
-
const excerpt = truncatedContent + trailChars
|
|
177
|
-
const output = listOfWords.length > maxWords ? excerpt : content
|
|
178
|
-
return output
|
|
179
|
-
}
|
|
180
|
-
|
|
181
172
|
verifySession = async (req, reply, source, payload) => {
|
|
182
173
|
const { getUser } = this
|
|
183
174
|
const { routePath } = this.app.waibu
|
|
@@ -4,6 +4,7 @@ const list = {
|
|
|
4
4
|
method: ['GET'],
|
|
5
5
|
handler: async function (req, reply) {
|
|
6
6
|
const { recordFind, getSchemaExt } = this.app.waibuDb
|
|
7
|
+
const { getExcerpt } = this.app.bajoTemplate
|
|
7
8
|
const { schema } = await getSchemaExt(model, 'list')
|
|
8
9
|
const options = { count: true }
|
|
9
10
|
const list = await recordFind({ model, req, options })
|
|
@@ -12,7 +13,7 @@ const list = {
|
|
|
12
13
|
schema.view.label = { subject: 'Your Message' }
|
|
13
14
|
schema.view.formatter = {
|
|
14
15
|
subject: (val, rec) => {
|
|
15
|
-
return `<strong>${val}</strong><br />${
|
|
16
|
+
return `<strong>${val}</strong><br />${getExcerpt(rec.message, 35)}`
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
return reply.view('sumba.template:/help/trouble-tickets/list.html', { list, schema })
|