sumba 2.32.4 → 2.33.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.
@@ -40,8 +40,13 @@ async function applyModelGuard ({ model, q, teamIds, options }) {
40
40
  for (const field of fields) {
41
41
  if (!model.getNonVirtualProperties(true).includes(field)) continue // or, should it throws exception instead?
42
42
  const opValue = req.getSetting(`sumba:modelGuard.${field}`, {})
43
- for (const op of ['in', 'nin']) {
44
- if (!isEmpty(opValue[op]) && isArray(opValue[op])) results.push(set({}, field, set({}, '$' + op, opValue[op])))
43
+ for (const op of ['in', 'nin', 'inOrNull']) {
44
+ if (isEmpty(opValue[op]) || !isArray(opValue[op])) continue
45
+ if (op === 'inOrNull') {
46
+ const val = set({}, field, set({}, '$in', opValue[op]))
47
+ const nl = set({}, field, { $eq: null })
48
+ results.push({ $or: [val, nl] })
49
+ } else results.push(set({}, field, set({}, '$' + op, opValue[op])))
45
50
  }
46
51
  const prop = model.getProperty(field)
47
52
  const items = rules.filter(item => item.field === field)
@@ -175,7 +175,8 @@
175
175
  "siteIds": "Sites",
176
176
  "allTeams": "All Teams?",
177
177
  "condition": "Condition",
178
- "hiddenFields": "Hide Fields"
178
+ "hiddenFields": "Hide Fields",
179
+ "_immutable": "Immutable"
179
180
  },
180
181
  "validation": {
181
182
  "password": {
@@ -181,7 +181,8 @@
181
181
  "siteIds": "Situs",
182
182
  "allTeams": "Semua Tim?",
183
183
  "condition": "Kondisi",
184
- "hiddenFields": "Sembunyikan Kolom"
184
+ "hiddenFields": "Sembunyikan Kolom",
185
+ "_immutable": "Immutable"
185
186
  },
186
187
  "validation": {
187
188
  "password": {
@@ -5,10 +5,11 @@ async function siteId (opts = {}) {
5
5
  type: 'string',
6
6
  maxLength: 50,
7
7
  ref: {
8
- siteDetail: {
8
+ siteId: {
9
9
  model: 'SumbaSite',
10
10
  field: 'id',
11
- type: '1:1'
11
+ searchField: 'hostname',
12
+ fields: ['id', 'hostname']
12
13
  }
13
14
  },
14
15
  index: true
@@ -0,0 +1,15 @@
1
+ async function siteSetting () {
2
+ return {
3
+ common: {
4
+ widget: {
5
+ siteId: {
6
+ attr: {
7
+ url: 'sumba.restapi:/manage/site'
8
+ }
9
+ }
10
+ }
11
+ }
12
+ }
13
+ }
14
+
15
+ export default siteSetting
@@ -0,0 +1,12 @@
1
+ const action = {
2
+ method: ['GET', 'POST'],
3
+ title: 'siteSetting',
4
+ xSite: true,
5
+ handler: async function (req, reply) {
6
+ const { importModule } = this.app.bajo
7
+ const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
8
+ return await crudSkel.call(this, 'SumbaSiteSetting', req, reply)
9
+ }
10
+ }
11
+
12
+ export default action
package/index.js CHANGED
@@ -351,6 +351,7 @@ async function factory (pkgName) {
351
351
  title: 'xSite',
352
352
  children: [
353
353
  { title: 'allSites', href: `waibuAdmin:/${prefix}/x/site/:action`, params },
354
+ { title: 'siteSetting', href: `waibuAdmin:/${prefix}/x/site-setting/:action`, params },
354
355
  sessionMenu
355
356
  ]
356
357
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.32.4",
3
+ "version": "2.33.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,11 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-17
4
+
5
+ - [2.33.0] Add ```Site Setting``` in ```Cross-Site```
6
+ - [2.33.0] Bug fix in ```hook.js```
7
+ - [2.33.0] Bug fix in ```feature:siteId```
8
+
3
9
  ## 2026-06-15
4
10
 
5
11
  - [2.32.3] Bug fix in ```hook.js```