@mixd-id/web-scaffold 0.1.2301231357 → 0.1.2301231359

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.2301231357",
4
+ "version": "0.1.2301231359",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -106,7 +106,7 @@ let ListPage1 = {
106
106
  }
107
107
 
108
108
  if(preset.search){
109
- const tableName = this.model.tableName
109
+ const tableName = this.model.name
110
110
  where = {
111
111
  ...where,
112
112
  [Op.and]: Sequelize.literal(`MATCH(\`${tableName}\`.tag) AGAINST (? IN BOOLEAN MODE)`)
@@ -236,7 +236,10 @@ let ListPage1 = {
236
236
 
237
237
  switch(value.aggregrate){
238
238
  case 'count':
239
- attributes.push([Sequelize.fn("SUM", Sequelize.fn("IF", Sequelize.literal(`${colKey} = '${columnValue}'`), 1, 0)), colKey + "-" + columnValue])
239
+ const fn = columnValue === null ?
240
+ Sequelize.literal(`${colKey} is null`) :
241
+ Sequelize.literal(`${colKey} = '${columnValue}'`)
242
+ attributes.push([Sequelize.fn("SUM", Sequelize.fn("IF", fn, 1, 0)), colKey + "-" + columnValue])
240
243
  summaryColumns.push({ key:colKey + "-" + columnValue, label:(columnValue ?? '').toString(), visible:true, aggregrate:"count" })
241
244
  break
242
245