backend-plus 2.2.1 → 2.2.3

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.
@@ -448,7 +448,7 @@ myOwn.TableConnectorLocal = function(context, opts){
448
448
  connector.pick = connector.opts.pick;
449
449
  connector.hideBecauseRelated = {};
450
450
  connector.fixedFields.forEach(function(pair){
451
- if(!pair.range && pair.value != myOwn.skipInFixedFields){
451
+ if(!pair.range && !pair.until && pair.value != myOwn.skipInFixedFields){
452
452
  connector.fixedField[pair.fieldName] = pair.value;
453
453
  if (!pair.show) {
454
454
  connector.hideBecauseRelated[pair.fieldName] = true;
@@ -1192,6 +1192,9 @@ myOwn.DetailColumnGrid.prototype.td = function td(depot, iColumn, tr){
1192
1192
  if(pair.range){
1193
1193
  fieldCondition.range=pair.range;
1194
1194
  }
1195
+ if(pair.until){
1196
+ fieldCondition.until=pair.until;
1197
+ }
1195
1198
  return fieldCondition;
1196
1199
  });
1197
1200
  }
@@ -2249,7 +2252,7 @@ myOwn.TableGrid.prototype.createRowInsertElements = function createRowInsertElem
2249
2252
  var depotForInsert = grid.createDepotFromRow({$allow:{delete:true, update:true}}, 'new');
2250
2253
  grid.connector.fixedFields.forEach(function(pair){
2251
2254
  var fieldDef = grid.def.field[pair.fieldName];
2252
- if(!pair.range && (fieldDef.inTable !== false || fieldDef.isPk && pair.value !=null)){
2255
+ if(!pair.range && !pair.until && (fieldDef.inTable !== false || fieldDef.isPk && pair.value !=null)){
2253
2256
  depotForInsert.row[pair.fieldName] = pair.value;
2254
2257
  depotForInsert.rowPendingForUpdate[pair.fieldName] = pair.value;
2255
2258
  }
@@ -2360,7 +2363,7 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2360
2363
  return (specialMandatories[fieldDef.name] || fieldDef.nullable!==true && fieldDef.isPk || fieldDef.nullable===false)
2361
2364
  && depot.row[fieldDef.name]==null
2362
2365
  && (grid.connector.fixedFields.find(function(pair){
2363
- return !pair.range && pair.fieldName===fieldDef.name
2366
+ return !pair.range && !pair.until && pair.fieldName===fieldDef.name
2364
2367
  })||{}).value == null
2365
2368
  }
2366
2369
  //var cual=grid.def.fields.filter(mandatoryOmitted)
@@ -266,6 +266,7 @@ export type TableDefinition = EditableDbDefinition & {
266
266
  tableName?:string
267
267
  schema?:string
268
268
  title?:string
269
+ prefix?:string // this prefix will be striped out from the fields name to compute the title of the column in the grid
269
270
  fields:FieldDefinition[]
270
271
  primaryKey:string[]
271
272
  refrescable?: boolean
@@ -553,7 +554,7 @@ export class AppBackend{
553
554
  addUnloggedServices(mainApp:ExpressPlus, baseUrl:string):void
554
555
  addLoggedServices():void
555
556
  getProcedures():Promise<ProcedureDef[]>
556
- isAdmin():boolean
557
+ isAdmin(reqOrContext:Request|Context):boolean
557
558
  canChangePass():Promise<boolean>
558
559
  getMenu(context?:Context):MenuDefinition
559
560
  inDbClient<T>(req:RequestDb|null, doThisWithDbClient:(client:Client)=>Promise<T>):Promise<T>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for the anti Pareto rule",
4
- "version": "2.2.1",
4
+ "version": "2.2.3",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -34,7 +34,7 @@
34
34
  "backend-skins": "^0.1.15",
35
35
  "best-globals": "^1.1.6",
36
36
  "big.js": "^6.2.2",
37
- "body-parser": "^1.20.3",
37
+ "body-parser": "^2.2.0",
38
38
  "cast-error": "^0.1.1",
39
39
  "castellano": "^0.1.4",
40
40
  "connect-pg-simple": "^10.0.0",
@@ -82,7 +82,7 @@
82
82
  "@types/js-yaml": "^4.0.9",
83
83
  "@types/mocha": "^10.0.10",
84
84
  "@types/multiparty": "~4.2.1",
85
- "@types/node": "^22.13.13",
85
+ "@types/node": "^22.14.0",
86
86
  "@types/nodemailer": "^6.4.17",
87
87
  "@types/numeral": "~2.0.5",
88
88
  "@types/session-file-store": "^1.2.5",
@@ -99,11 +99,11 @@
99
99
  "kill-9": "~0.4.3",
100
100
  "mocha": "^11.1.0",
101
101
  "nyc": "^17.1.0",
102
- "puppeteer": "^24.4.0",
103
- "sinon": "^19.0.4",
102
+ "puppeteer": "^24.6.0",
103
+ "sinon": "^20.0.0",
104
104
  "supertest": "^7.1.0",
105
105
  "types.d.ts": "~0.6.22",
106
- "typescript": "^5.8.2",
106
+ "typescript": "^5.8.3",
107
107
  "why-is-node-running": "^3.2.2"
108
108
  },
109
109
  "engines": {