sumba 2.38.1 → 2.40.0

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.
@@ -267,6 +267,15 @@ async function hook () {
267
267
  const routes = ['waibuAdmin:/site/x/site/*']
268
268
  this.app.waibu.config.route.disabled.push(...routes)
269
269
  }
270
+ }, {
271
+ name: 'dobo.sumbaDownload:afterRemoveRecord',
272
+ handler: async function (id, rec, options = {}) {
273
+ const { fs } = this.app.lib
274
+ try {
275
+ await fs.remove(rec.oldData.jobQueue.result.file)
276
+ } catch (err) {
277
+ }
278
+ }
270
279
  }]
271
280
  }
272
281
 
@@ -142,6 +142,12 @@
142
142
  "x": "Cross-Site",
143
143
  "misc": "Miscellaneous",
144
144
  "populateRouteGuard": "Populate route guard",
145
+ "statusQueue": "Queue",
146
+ "statusMqueue": "Masohi Queue",
147
+ "statusProcessing": "Processing",
148
+ "statusComplete": "Complete",
149
+ "statusFail": "Fail",
150
+ "fileDownloadNA": "File download is no longer available, has been removed, expired or you don't have permission to access it",
145
151
  "field": {
146
152
  "currentPassword": "Current Password",
147
153
  "newPassword": "New Password",
@@ -178,7 +184,8 @@
178
184
  "allTeams": "All Teams?",
179
185
  "condition": "Condition",
180
186
  "hiddenFields": "Hide Fields",
181
- "_immutable": "Immutable"
187
+ "_immutable": "Immutable",
188
+ "download": "Download"
182
189
  },
183
190
  "validation": {
184
191
  "password": {
@@ -148,6 +148,12 @@
148
148
  "x": "Antar Situs",
149
149
  "misc": "Lain-lain",
150
150
  "populateRouteGuard": "Isikan pelindung rute",
151
+ "statusQueue": "Antrian",
152
+ "statusMqueue": "Antrian Masohi",
153
+ "statusProcessing": "Sedang Diproses",
154
+ "statusComplete": "Selesai",
155
+ "statusFail": "Gagal",
156
+ "fileDownloadNA": "Unduhan file tidak lagi tersedia, telah dihapus, kedaluwarsa, atau Anda tidak memiliki izin untuk mengaksesnya",
151
157
  "field": {
152
158
  "currentPassword": "Kata Sandi Saat Ini",
153
159
  "newPassword": "Kata Sandi Baru",
@@ -184,7 +190,8 @@
184
190
  "allTeams": "Semua Tim?",
185
191
  "condition": "Kondisi",
186
192
  "hiddenFields": "Sembunyikan Kolom",
187
- "_immutable": "Immutable"
193
+ "_immutable": "Immutable",
194
+ "download": "Unduh"
188
195
  },
189
196
  "validation": {
190
197
  "password": {
@@ -44,9 +44,38 @@ const routeGuard = {
44
44
  options: { ...options }
45
45
  }
46
46
 
47
+ const download = {
48
+ baseName: 'download',
49
+ properties: [
50
+ 'description,,50,true',
51
+ 'file,text,,,true',
52
+ 'type,,20,true',
53
+ 'jobQueue,object',
54
+ {
55
+ name: 'size',
56
+ type: 'integer',
57
+ default: 0,
58
+ index: true
59
+ },
60
+ {
61
+ name: 'download',
62
+ type: 'string',
63
+ virtual: true,
64
+ getValue: async function (val, rec) {
65
+ return rec.status === 'COMPLETE' ? 'download' : 'nA'
66
+ }
67
+ }
68
+ ],
69
+ features: ['sumba:siteId', 'sumba:userId', 'dobo:createdAt', 'dobo:updatedAt', {
70
+ name: 'sumba:status',
71
+ default: 'QUEUE',
72
+ values: ['QUEUE', 'MQUEUE', 'PROCESSING', 'COMPLETE', 'FAIL']
73
+ }]
74
+ }
75
+
47
76
  async function model () {
48
77
  const { merge, cloneDeep } = this.app.lib._
49
- return [{
78
+ return [download, {
50
79
  baseName: 'attrib-guard',
51
80
  properties: [
52
81
  {
@@ -17,25 +17,6 @@
17
17
  "values": ["NEW", "ACK"]
18
18
  }, "sumba:userId", "sumba:siteId", "dobo:createdAt", "dobo:updatedAt"
19
19
  ]
20
- }, {
21
- "baseName": "download",
22
- "properties": [
23
- "description,,50,true",
24
- "file,text,,,true",
25
- "type,,20,true",
26
- "jobQueue,object",
27
- {
28
- "name": "size",
29
- "type": "integer",
30
- "default": 0,
31
- "index": true
32
- }
33
- ],
34
- "features": ["sumba:siteId", "sumba:userId", "dobo:createdAt", "dobo:updatedAt", {
35
- "name": "sumba:status",
36
- "default": "INQUEUE",
37
- "values": ["INQUEUE", "PROCESSING", "COMPLETE", "FAIL"]
38
- }]
39
20
  }, {
40
21
  "baseName": "site-setting",
41
22
  "properties": [
@@ -3,10 +3,15 @@ async function download () {
3
3
  common: {
4
4
  disabled: ['create', 'update', 'get'],
5
5
  format: {
6
- description: async function (val, rec) {
7
- const sentence = `<c:a target="_blank" href="sumba:/your-stuff/download/get/${rec.file}" content="${val}" @click.stop />`
6
+ download: async function (val, rec, { req } = {}) {
7
+ let sentence = req.t(val)
8
+ if (rec.status === 'COMPLETE') sentence = `<c:btn size="sm" icon="download" color="primary" href="sumba:/your-stuff/download/get/${rec.id}" content="${val}" @click.stop />`
8
9
  return await this.component.buildSentence(sentence)
9
10
  },
11
+ type: async function (val, rec, { req } = {}) {
12
+ const { camelCase } = this.app.lib._
13
+ return req.t(camelCase(`file ${val}`))
14
+ },
10
15
  size: function (val, rec) {
11
16
  const { formatByte } = this.app.bajoExtra
12
17
  return formatByte(rec.size)
@@ -15,7 +20,7 @@ async function download () {
15
20
  },
16
21
  view: {
17
22
  list: {
18
- fields: ['description', 'type', 'size', 'status', 'updatedAt'],
23
+ fields: ['description', 'type', 'size', 'status', 'updatedAt', 'download'],
19
24
  stat: {
20
25
  aggregate: [
21
26
  { fields: ['type'], group: 'type', aggregate: ['count'] },
@@ -1,11 +1,15 @@
1
1
  const get = {
2
2
  method: ['GET'],
3
- url: '/your-stuff/download/get/*',
3
+ url: '/your-stuff/download/get/:id',
4
4
  handler: async function (req, reply) {
5
5
  const { importModule } = this.app.bajo
6
+ const { getModel } = this.app.dobo
7
+ const { fs } = this.app.lib
6
8
  const { download } = await importModule('waibu:/lib/helper.js', { asDefaultImport: false })
7
- const file = `${this.downloadDir}/${req.params['*']}`
8
- return await download.call(this, file, req, reply)
9
+ const query = { id: req.params.id, siteId: req.site.id, userId: req.user.id, status: 'COMPLETE' }
10
+ const rec = await getModel('SumbaDownload').findOneRecord({ query }, { noMagic: true })
11
+ if (!rec || !fs.existsSync(rec.jobQueue.result.file)) throw this.error('fileDownloadNA', { forceShowMessage: true })
12
+ return await download.call(this, rec.jobQueue.result.file, req, reply, rec.file)
9
13
  }
10
14
  }
11
15
 
package/index.js CHANGED
@@ -107,6 +107,10 @@ async function factory (pkgName) {
107
107
  const user = await getModel('SumbaUser').findOneRecord({ query: { username: 'admin', siteId: site.id + '' } }, { noMagic: true })
108
108
  this.config.xSiteAdmins.push(`${site.alias}:${user.username}`)
109
109
  }
110
+ this._queueIntv = setInterval(() => {
111
+ this.execDownload()
112
+ }, this.config.queue.intvDur)
113
+ await this.execDownload()
110
114
  }
111
115
 
112
116
  /**
@@ -556,24 +560,71 @@ async function factory (pkgName) {
556
560
  return passwd
557
561
  }
558
562
 
559
- pushDownload = async ({ description, worker, data, source, req, file, type }) => {
563
+ /**
564
+ * Push a download job to the download manager
565
+ *
566
+ * @method
567
+ * @param {object} options - Options object
568
+ * @param {string} [options.description] - Description of the download. If not provided, the file name will be used as the description
569
+ * @param {string} options.worker - Worker handler
570
+ * @param {object} options.data - Data to be passed to the worker
571
+ * @param {string} options.source - Source of the job
572
+ * @param {object} options.req - Request object
573
+ * @param {string} options.file - File name
574
+ * @param {string} options.type - File type
575
+ */
576
+ pushDownload = async (options = {}) => {
560
577
  const { createRecord } = this.app.getPlugin('waibuDb')
561
- const { push } = this.app.getPlugin('bajoQueue')
578
+ let { description, worker, data, source, req, file, type } = options
562
579
  description = description ?? file
563
580
  const jobQueue = {
564
- worker,
565
- source,
581
+ worker, // handler that gets executed by the worker
582
+ source, // source of the job, usually the plugin namespace
566
583
  payload: {
567
584
  type: 'object',
568
- data
585
+ data // payload data to be passed to the worker (filter etc)
569
586
  }
570
587
  }
571
588
  if (!type) type = path.extname(file)
572
589
  if (type[0] === '.') type = type.slice(1)
573
590
  const body = { file, description, jobQueue, type }
574
591
  const rec = await createRecord({ model: 'SumbaDownload', body, req, options: { noFlash: true } })
575
- jobQueue.payload.data.download = { id: rec.data.id, file }
576
- await push(jobQueue)
592
+ const download = { id: rec.data.id, file }
593
+ jobQueue.payload.data.download = download
594
+ if (this.app.masohi) await this.app.masohi.pushJob(jobQueue)
595
+ }
596
+
597
+ /**
598
+ * Execute download job from the queue
599
+ * @async
600
+ * @method
601
+ * @returns {Promise<void>} - A promise that resolves when the download job has been executed
602
+ */
603
+ execDownload = async () => {
604
+ const { isEmpty } = this.app.lib._
605
+ const { fs } = this.app.lib
606
+ const { callHandler } = this.app.bajo
607
+ const { getModel } = this.app.dobo
608
+ const { lock } = this.app.bajoExtra
609
+ const query = { status: 'QUEUE', sort: { createdAt: 1 } }
610
+ const model = getModel('SumbaDownload')
611
+ const rec = await model.findOneRecord({ query }, { noMagic: true, dataOnly: true })
612
+ if (isEmpty(rec)) return
613
+ const opts = { payload: { data: rec.jobQueue.payload.data } }
614
+ opts.payload.data.file = rec.file
615
+ const release = await lock(`sumba-download-${rec.id}`)
616
+ if (!release) return
617
+ try {
618
+ await model.updateRecord(rec.id, { status: 'PROCESSING' })
619
+ rec.jobQueue.result = await callHandler(rec.jobQueue.worker, opts)
620
+ const { size } = fs.statSync(rec.jobQueue.result.file)
621
+ await model.updateRecord(rec.id, { size, status: 'COMPLETE', jobQueue: rec.jobQueue })
622
+ } catch (err) {
623
+ rec.jobQueue.error = err.message
624
+ await model.updateRecord(rec.id, { status: 'FAIL', jobQueue: rec.jobQueue })
625
+ }
626
+ // TODO: notify user that the download is ready
627
+ await release()
577
628
  }
578
629
 
579
630
  /**
package/lib/config.js CHANGED
@@ -53,6 +53,8 @@ export const defMultiSite = {
53
53
  * @property {string} [config.auth.jwt.secret] - JWT authentication secret. Default: hard coded value, should be changed in production
54
54
  * @property {string} [config.auth.jwt.expiresInDur='7d'] - JWT authentication token expiration duration. Default: '7d'
55
55
  * @property {object} [config.redirect={}] - Redirection configuration object
56
+ * @property {object} [config.queue={}] - Internal Queue configuration object
57
+ * @property {string} [config.queue.intvDur='1m'] - Queue interval duration. Default: '1m'
56
58
  */
57
59
 
58
60
  async function configFactory () {
@@ -189,6 +191,9 @@ async function configFactory () {
189
191
  getSiteDur: '1m',
190
192
  getUserByIdDur: '1m',
191
193
  getUserByTokenDur: '1m'
194
+ },
195
+ queue: {
196
+ intvDur: '1m'
192
197
  }
193
198
  }
194
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.38.1",
3
+ "version": "2.40.0",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-07-28
4
+
5
+ - [2.40.0] Add queue for `download` & all necessary methods to support it
6
+
7
+ ## 2026-07-26
8
+
9
+ - [2.39.0] Rename `pushDownload()` to `download()`
10
+
3
11
  ## 2026-07-13
4
12
 
5
13
  - [2.38.0] Update documentations
@@ -11,116 +19,116 @@
11
19
 
12
20
  ## 2026-06-29
13
21
 
14
- - [2.36.0] Move ```config``` object to dedicated file ```lib/config.js```
15
- - [2.36.0] Changes in ```_getAuthSetting()```
16
- - [2.36.0] Bug fix in ```runQueryGuard()```
22
+ - [2.36.0] Move `config` object to dedicated file `lib/config.js`
23
+ - [2.36.0] Changes in `_getAuthSetting()`
24
+ - [2.36.0] Bug fix in `runQueryGuard()`
17
25
 
18
26
  ## 2026-06-29
19
27
 
20
- - [2.35.0] Add ```SumbaActionGuard``` model & its helpers
28
+ - [2.35.0] Add `SumbaActionGuard` model & its helpers
21
29
  - [2.35.0] Restructure admin menu
22
30
  - [2.35.0] Documentations overhaul
23
31
 
24
32
  ## 2026-06-20
25
33
 
26
- - [2.34.3] Bug fix in ```checkTeam()```
27
- - [2.34.3] Bug fix in ```hook.js```
28
- - [2.34.4] Bug fix in ```fixture/site.json```
34
+ - [2.34.3] Bug fix in `checkTeam()`
35
+ - [2.34.3] Bug fix in `hook.js`
36
+ - [2.34.4] Bug fix in `fixture/site.json`
29
37
 
30
38
  ## 2026-06-19
31
39
 
32
- - [2.33.5] Bug fix in ```team-user.json```
33
- - [2.34.0] Add ```checkRoute()```
34
- - [2.34.0] Add route checking to ```waibu:preParsing``` hook
35
- - [2.34.1] Bug fix in ```pathsToCheck()```
36
- - [2.34.1] Bug fix in ```hook.js```
37
- - [2.34.2] Bug fix in ```verifySession()```
40
+ - [2.33.5] Bug fix in `team-user.json`
41
+ - [2.34.0] Add `checkRoute()`
42
+ - [2.34.0] Add route checking to `waibu:preParsing` hook
43
+ - [2.34.1] Bug fix in `pathsToCheck()`
44
+ - [2.34.1] Bug fix in `hook.js`
45
+ - [2.34.2] Bug fix in `verifySession()`
38
46
 
39
47
  ## 2026-06-18
40
48
 
41
- - [2.33.2] Bug fix in ```hook.js```
42
- - [2.33.3] Bug fix in ```hook.js```
43
- - [2.33.4] Bug fix in ```create-new-site.js```
44
- - [2.33.4] Normalize ```siteId``` & ```userId``` fields
49
+ - [2.33.2] Bug fix in `hook.js`
50
+ - [2.33.3] Bug fix in `hook.js`
51
+ - [2.33.4] Bug fix in `create-new-site.js`
52
+ - [2.33.4] Normalize `siteId` & `userId` fields
45
53
 
46
54
  ## 2026-06-17
47
55
 
48
- - [2.33.0] Add ```Site Setting``` in ```Cross-Site```
49
- - [2.33.0] Bug fix in ```hook.js```
50
- - [2.33.0] Bug fix in ```sumba:siteId``` feature
51
- - [2.33.1] Bug fix in ```checkUser()```, ```checkTeam()``` & ```checkXSite()```
52
- - [2.33.1] Bug fix in ```sumba:country``` feature
56
+ - [2.33.0] Add `Site Setting` in `Cross-Site`
57
+ - [2.33.0] Bug fix in `hook.js`
58
+ - [2.33.0] Bug fix in `sumba:siteId` feature
59
+ - [2.33.1] Bug fix in `checkUser()`, `checkTeam()` & `checkXSite()`
60
+ - [2.33.1] Bug fix in `sumba:country` feature
53
61
 
54
62
  ## 2026-06-15
55
63
 
56
- - [2.32.3] Bug fix in ```hook.js```
57
- - [2.32.4] Bug fix in ```create-new-site.js```
64
+ - [2.32.3] Bug fix in `hook.js`
65
+ - [2.32.4] Bug fix in `create-new-site.js`
58
66
 
59
67
  ## 2026-06-12
60
68
 
61
- - [2.32.2] Bug fix in ```preRequest``` hook
69
+ - [2.32.2] Bug fix in `preRequest` hook
62
70
 
63
71
  ## 2026-06-12
64
72
 
65
- - [2.32.0] Necessary updates to ```bajo@2.18.0``` specs
66
- - [2.32.0] Bug fix in ```_getGuards()```
67
- - [2.32.0] Bug fix in ```getAttribGuards()```
68
- - [2.32.0] Bug fix in ```hooks.js```
69
- - [2.32.0] Change ```behavior``` to ```condition``` in ```SumbaModelGuard``` model
70
- - [2.32.1] Bug fix in ```allowEmptyQuery``` options
73
+ - [2.32.0] Necessary updates to `bajo@2.18.0` specs
74
+ - [2.32.0] Bug fix in `_getGuards()`
75
+ - [2.32.0] Bug fix in `getAttribGuards()`
76
+ - [2.32.0] Bug fix in `hooks.js`
77
+ - [2.32.0] Change `behavior` to `condition` in `SumbaModelGuard` model
78
+ - [2.32.1] Bug fix in `allowEmptyQuery` options
71
79
 
72
80
  ## 2026-06-11
73
81
 
74
- - [2.31.0] Add ```status``` field on ```SumbaTeamUser```
75
- - [2.31.0] Remove ```util.js``` as all functions now moved to base class
82
+ - [2.31.0] Add `status` field on `SumbaTeamUser`
83
+ - [2.31.0] Remove `util.js` as all functions now moved to base class
76
84
 
77
85
  ## 2026-06-10
78
86
 
79
87
  - [2.30.0] Refactoring all guards
80
- - [2.30.0] Feature ```sumba:status``` now by default using ```ACTIVE``` and ```INACTIVE``` states
81
- - [2.30.0] Bug in ```multiSite``` handling
82
- - [2.30.0] Add ```populateRouteGuards()```
83
- - [2.30.0] Bug fix in ```hook.js```
88
+ - [2.30.0] Feature `sumba:status` now by default using `ACTIVE` and `INACTIVE` states
89
+ - [2.30.0] Bug in `multiSite` handling
90
+ - [2.30.0] Add `populateRouteGuards()`
91
+ - [2.30.0] Bug fix in `hook.js`
84
92
 
85
93
  ## 2026-06-03
86
94
 
87
- - [2.29.0] Some models with property ```values``` now use the newly introduced function values
95
+ - [2.29.0] Some models with property `values` now use the newly introduced function values
88
96
  - [2.29.0] Add redirections from empty folder to the right page
89
97
 
90
98
  ## 2026-06-01
91
99
 
92
- - [2.27.3] Bug fix in ```user.js``` schema
93
- - [2.28.0] Now using new ```format``` definition for ```virtual``` column
100
+ - [2.27.3] Bug fix in `user.js` schema
101
+ - [2.28.0] Now using new `format` definition for `virtual` column
94
102
 
95
103
  ## 2026-05-30
96
104
 
97
- - [2.27.0] Move all ```sumbaUser``` hooks to model hooks
98
- - [2.27.0] Bug fix in ```model.js```
99
- - [2.27.0] Bug fix in ```create-new-site.js```
100
- - [2.27.0] Bug fix in ```team-user.json``` fixture
101
- - [2.27.1] Bug fix in ```util.pathToCheck()```
102
- - [2.27.2] Bug fix in ```hook.js```
105
+ - [2.27.0] Move all `sumbaUser` hooks to model hooks
106
+ - [2.27.0] Bug fix in `model.js`
107
+ - [2.27.0] Bug fix in `create-new-site.js`
108
+ - [2.27.0] Bug fix in `team-user.json` fixture
109
+ - [2.27.1] Bug fix in `util.pathToCheck()`
110
+ - [2.27.2] Bug fix in `hook.js`
103
111
 
104
112
  ## 2026-05-29
105
113
 
106
- - [2.26.1] Bug fix in ```util.js```
107
- - [2.26.1] Bug fix in ```checkPathsByRoute()```
114
+ - [2.26.1] Bug fix in `util.js`
115
+ - [2.26.1] Bug fix in `checkPathsByRoute()`
108
116
 
109
117
  ## 2026-05-28
110
118
 
111
- - [2.26.0] Change hooks to be written in one ```hook.js``` file
112
- - [2.26.0] Change model schemas to be written in one ```model.js``` file
119
+ - [2.26.0] Change hooks to be written in one `hook.js` file
120
+ - [2.26.0] Change model schemas to be written in one `model.js` file
113
121
 
114
122
  ## 2026-05-25
115
123
 
116
- - [2.25.1] Bug fix in several places because name changing ```crossSiteAdmins``` to ```xSiteAdmins```
124
+ - [2.25.1] Bug fix in several places because name changing `crossSiteAdmins` to `xSiteAdmins`
117
125
 
118
126
  ## 2026-05-22
119
127
 
120
128
  - [2.25.0] Reorganize admin menu layout & order
121
- - [2.25.0] Add ```getModelGuards()```
122
- - [2.25.0] Add ```getAttribGuards()```
123
- - [2.25.0] Bug fix in ```getRouteGuards()```
129
+ - [2.25.0] Add `getModelGuards()`
130
+ - [2.25.0] Add `getAttribGuards()`
131
+ - [2.25.0] Bug fix in `getRouteGuards()`
124
132
 
125
133
  ## 2026-05-11
126
134
 
@@ -130,8 +138,8 @@
130
138
 
131
139
  ## 2026-05-11
132
140
 
133
- - [2.23.0] Unify route guards and put it in ```SumbaRouteGuard``` database
134
- - [2.23.0] Phased out ```setting.noRoutes```
141
+ - [2.23.0] Unify route guards and put it in `SumbaRouteGuard` database
142
+ - [2.23.0] Phased out `setting.noRoutes`
135
143
 
136
144
  ## 2026-04-25
137
145
 
@@ -140,30 +148,30 @@
140
148
  ## 2026-04-25
141
149
 
142
150
  - [2.21.0] Change options to format value using the new key set by dobo
143
- - [2.21.0] Remove ```options.retainOriginalValue``` since it is not needed anymore
144
- - [2.21.0] Remove ```property.formatValue``` from all properties
145
- - [2.21.0] Remove ```schema.formatValue``` from all schemas
146
- - [2.21.0] Remove ```schema.calcFields``` from all schemas
151
+ - [2.21.0] Remove `options.retainOriginalValue` since it is not needed anymore
152
+ - [2.21.0] Remove `property.formatValue` from all properties
153
+ - [2.21.0] Remove `schema.formatValue` from all schemas
154
+ - [2.21.0] Remove `schema.calcFields` from all schemas
147
155
 
148
156
  ## 2026-04-23
149
157
 
150
- - [2.20.0] Add ```parseRouteGuard()```
151
- - [2.20.0] Change endpoint ```sumba/route``` to ```sumba/route-guard```
158
+ - [2.20.0] Add `parseRouteGuard()`
159
+ - [2.20.0] Change endpoint `sumba/route` to `sumba/route-guard`
152
160
  - [2.20.0] Deep merging of route guards
153
161
 
154
162
  ## 2026-04-21
155
163
 
156
- - [2.19.4] Bug fix in ```getCountriesValues()```
164
+ - [2.19.4] Bug fix in `getCountriesValues()`
157
165
 
158
166
  ## 2026-04-19
159
167
 
160
- - [2.19.3] Update all widgets ```wdb-table``` to ```wdb-data-table```
168
+ - [2.19.3] Update all widgets `wdb-table` to `wdb-data-table`
161
169
 
162
170
  ## 2026-04-18
163
171
 
164
- - [2.19.2] Bug fix in ```sumba:personInCharge``` feature: add email rules
165
- - [2.19.2] Bug fix in ```SumbaUser``` schema
166
- - [2.19.2] Bug fix in ```reset-user-password``` route
172
+ - [2.19.2] Bug fix in `sumba:personInCharge` feature: add email rules
173
+ - [2.19.2] Bug fix in `SumbaUser` schema
174
+ - [2.19.2] Bug fix in `reset-user-password` route
167
175
 
168
176
  ## 2026-04-17
169
177
 
@@ -173,13 +181,13 @@
173
181
 
174
182
  - [2.19.0] Add cache clearing if a site is updated/removed
175
183
  - [2.19.0] Add cache clearing if a user is updated/removed
176
- - [2.19.0] Necessary changes to all routes to support ```formatValue``` & ```retainOriginalValue``` options
177
- - [2.19.0] Change cache key for ```getUser()```
178
- - [2.19.0] Change cache key for ```getSite()```
184
+ - [2.19.0] Necessary changes to all routes to support `formatValue` & `retainOriginalValue` options
185
+ - [2.19.0] Change cache key for `getUser()`
186
+ - [2.19.0] Change cache key for `getSite()`
179
187
 
180
188
  ## 2026-04-13
181
189
 
182
- - [2.18.1] Bug fix on ```SumbaSite``` model
190
+ - [2.18.1] Bug fix on `SumbaSite` model
183
191
 
184
192
  ## 2026-04-11
185
193
 
@@ -187,20 +195,20 @@
187
195
 
188
196
  ## 2026-04-07
189
197
 
190
- - [2.17.0] Change all ```opts.fieldName``` to ```opts.field``` in features
198
+ - [2.17.0] Change all `opts.fieldName` to `opts.field` in features
191
199
  - [2.17.0] Rewrite necessary changes on model reference to match the new architecture
192
200
 
193
201
  ## 2026-04-02
194
202
 
195
- - [2.16.0] Add ```SumbaUserSetting``` model and necessary handlings
203
+ - [2.16.0] Add `SumbaUserSetting` model and necessary handlings
196
204
  - [2.16.0] Reorganize admin menu
197
205
 
198
206
  ## 2026-03-30
199
207
 
200
208
  - [2.15.0] Add inter site module mechanism
201
209
  - [2.15.0] Add admin sub route for inter site modules
202
- - [2.15.0] Bug fix in ```createNewSite()```
203
- - [2.15.0] Bug fix in ```removeSite()```
210
+ - [2.15.0] Bug fix in `createNewSite()`
211
+ - [2.15.0] Bug fix in `removeSite()`
204
212
  - [2.15.1] Code cleanups
205
213
 
206
214
  ## 2026-03-27
@@ -209,8 +217,8 @@
209
217
 
210
218
  ## 2026-03-25
211
219
 
212
- - [2.13.0] Add bajo cache handling for ```getUser*()``` and ```getSite()```
213
- - [2.13.1] Bug fix in ```collect.js```
220
+ - [2.13.0] Add bajo cache handling for `getUser*()` and `getSite()`
221
+ - [2.13.1] Bug fix in `collect.js`
214
222
 
215
223
  ## 2026-03-22
216
224
 
@@ -220,69 +228,69 @@
220
228
 
221
229
  ## 2026-03-22
222
230
 
223
- - [2.11.0] Add ```Team Setting``` feature
224
- - [2.11.0] Rewrite ```getUser()```
225
- - [2.11.0] Rewrite ```getSite()```
226
- - [2.11.0] Bug fix in model reference not displayed correctly on ```Details View```
227
- - [2.11.1] Bug fix in ```parseNsSetting()```
231
+ - [2.11.0] Add `Team Setting` feature
232
+ - [2.11.0] Rewrite `getUser()`
233
+ - [2.11.0] Rewrite `getSite()`
234
+ - [2.11.0] Bug fix in model reference not displayed correctly on `Details View`
235
+ - [2.11.1] Bug fix in `parseNsSetting()`
228
236
 
229
237
  ## 2026-03-13
230
238
 
231
- - [2.10.0] ```getSite()``` now accept object & array based on their keys to
239
+ - [2.10.0] `getSite()` now accept object & array based on their keys to
232
240
 
233
241
  ## 2026-03-12
234
242
 
235
243
  - [2.9.0] Add ability to restrict/filter dobo's records through site setting
236
- - [2.9.0] Multisite config now accept object. If set to ```true``` it defaults to ```catchAll: 'default'```
244
+ - [2.9.0] Multisite config now accept object. If set to `true` it defaults to `catchAll: 'default'`
237
245
 
238
246
  ## 2026-03-11
239
247
 
240
- - [2.8.0] Add ```createNewSite()``` and ```applet.crateNewSite```
241
- - [2.8.0] Add ```removeSite()``` and ```applet.removeSite```
242
- - [2.8.0] Set ```site.json```, ```user.json```, ```team.json```, ```team-user.json``` first fixture as immutable row
243
- - [2.8.1] Bug fix in ```createNewSite()```
248
+ - [2.8.0] Add `createNewSite()` and `applet.crateNewSite`
249
+ - [2.8.0] Add `removeSite()` and `applet.removeSite`
250
+ - [2.8.0] Set `site.json`, `user.json`, `team.json`, `team-user.json` first fixture as immutable row
251
+ - [2.8.1] Bug fix in `createNewSite()`
244
252
 
245
253
  ## 2026-03-08
246
254
 
247
- - [2.7.3] Bug fix on ```mergeTeam()```
255
+ - [2.7.3] Bug fix on `mergeTeam()`
248
256
 
249
257
  ## 2026-03-07
250
258
 
251
- - [2.7.1] Bug fix on ```site``` attachment
252
- - [2.7.1] Bug fix on ```getUserFromUsernamePassword()```
259
+ - [2.7.1] Bug fix on `site` attachment
260
+ - [2.7.1] Bug fix on `getUserFromUsernamePassword()`
253
261
 
254
262
  ## 2026-03-05
255
263
 
256
264
  - [2.6.0] Update multiple endpoints to support dobo's transaction
257
- - [2.6.0] Bug fix on ```profile.edit``` route
258
- - [2.7.0] Add hook ```sumba:afterCollectSecureRoutes```
259
- - [2.7.0] Add hook ```sumba:afterCollectAnonymousRoutes```
260
- - [2.7.0] Add hook ```sumba:afterCollectTeamRoutes```
265
+ - [2.6.0] Bug fix on `profile.edit` route
266
+ - [2.7.0] Add hook `sumba:afterCollectSecureRoutes`
267
+ - [2.7.0] Add hook `sumba:afterCollectAnonymousRoutes`
268
+ - [2.7.0] Add hook `sumba:afterCollectTeamRoutes`
261
269
 
262
270
  ## 2026-03-02
263
271
 
264
- - [2.5.0] Add ```sendMail()``` to send mail using ```masohiMail```
272
+ - [2.5.0] Add `sendMail()` to send mail using `masohiMail`
265
273
  - [2.5.0] Update all mail templates and hooks to match with the new specs
266
274
 
267
275
  ## 2026-02-21
268
276
 
269
- - [2.4.1] Bug fix on intl functions. Now moved to ```preParsing``` instead of ```onRequest```
277
+ - [2.4.1] Bug fix on intl functions. Now moved to `preParsing` instead of `onRequest`
270
278
 
271
279
  ## 2026-02-20
272
280
 
273
- - [2.4.0] Add ```getCountriesValues()```
274
- - [2.4.0] Update ```sumba:country``` feature to use ```prop.values``` as a handler
275
- - [2.4.0] No longer use the removed ```FormSelectCountry```, instead use ```FormSelectExt```
281
+ - [2.4.0] Add `getCountriesValues()`
282
+ - [2.4.0] Update `sumba:country` feature to use `prop.values` as a handler
283
+ - [2.4.0] No longer use the removed `FormSelectCountry`, instead use `FormSelectExt`
276
284
 
277
285
  ## 2026-02-17
278
286
 
279
- - [2.3.0] Add admin menu links to ```siteSetting```
280
- - [2.3.0] Bug fix on ```getSite()```
281
- - [2.3.0] Add unique index on model ```SumbaSiteSetting```
287
+ - [2.3.0] Add admin menu links to `siteSetting`
288
+ - [2.3.0] Bug fix on `getSite()`
289
+ - [2.3.0] Add unique index on model `SumbaSiteSetting`
282
290
  - [2.3.0] Add admin subroute to manage site setting
283
- - [2.3.0] Bug fix on ```req.theme``` and ```req.iconset``` resolver
291
+ - [2.3.0] Bug fix on `req.theme` and `req.iconset` resolver
284
292
  - [2.3.1] Update translations
285
- - [2.3.1] Bug fix on ```sumba:country``` feature
293
+ - [2.3.1] Bug fix on `sumba:country` feature
286
294
 
287
295
  ## 2026-02-09
288
296
 
@@ -292,21 +300,21 @@
292
300
 
293
301
  ## 2026-02-08
294
302
 
295
- - [2.2.0] Add ```siteSetting.timeZone``` in config object
303
+ - [2.2.0] Add `siteSetting.timeZone` in config object
296
304
 
297
305
  ## 2026-02-06
298
306
 
299
- - [2.1.9] Bug fix on ```getSite()``` for multisite system
307
+ - [2.1.9] Bug fix on `getSite()` for multisite system
300
308
 
301
309
  ## 2026-02-05
302
310
 
303
- - [2.1.8] Bug fix on site update: ```hostname``` should be editable
304
- - [2.1.8] Missing icon on ```account``` menu
311
+ - [2.1.8] Bug fix on site update: `hostname` should be editable
312
+ - [2.1.8] Missing icon on `account` menu
305
313
 
306
314
  ## 2026-02-04
307
315
 
308
316
  - [2.1.7] Add icon to the menu
309
- - [2.1.7] Bug fix on ```<c:nav-dropdown-user>```
317
+ - [2.1.7] Bug fix on `<c:nav-dropdown-user>`
310
318
 
311
319
  ## 2026-02-03
312
320
 
@@ -314,8 +322,8 @@
314
322
 
315
323
  ## 2026-01-26
316
324
 
317
- - [2.1.5] Bug fix on feature ```siteId```
318
- - [2.1.5] Bug fix on feature ```userId```
325
+ - [2.1.5] Bug fix on feature `siteId`
326
+ - [2.1.5] Bug fix on feature `userId`
319
327
 
320
328
  ## 2026-01-21
321
329
 
@@ -327,7 +335,7 @@
327
335
 
328
336
  ## 2026-01-17
329
337
 
330
- - [2.1.2] Add theme & iconset check from ```req.headers['x-theme']``` & ```req.headers['x-iconset']```
338
+ - [2.1.2] Add theme & iconset check from `req.headers['x-theme']` & `req.headers['x-iconset']`
331
339
 
332
340
  ## 2026-01-13
333
341
 
@@ -335,5 +343,5 @@
335
343
 
336
344
  ## 2026-01-01
337
345
 
338
- - [2.1.0] Ported to match ```bajo@2.2.x``` & ```dobo@2.2.x``` specs
339
- - [2.1.0] Upgrade to ```slug@11.0.1```
346
+ - [2.1.0] Ported to match `bajo@2.2.x` & `dobo@2.2.x` specs
347
+ - [2.1.0] Upgrade to `slug@11.0.1`