pict-section-recordset 1.0.53 → 1.0.54
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/example_applications/simple_entity/Simple-RecordSet-Application.js +221 -1
- package/example_applications/simple_entity/html/index.html +2 -0
- package/package.json +1 -1
- package/source/application/Pict-Application-RecordSet.js +2 -0
- package/source/providers/RecordSet-Link-Manager.js +1 -1
- package/source/providers/RecordSet-RecordProvider-Base.js +10 -0
- package/source/providers/RecordSet-RecordProvider-MeadowEndpoints.js +44 -14
- package/source/providers/RecordSet-Router.js +1 -1
- package/source/services/RecordsSet-MetaController.js +9 -6
- package/source/views/RecordSet-RecordBaseView.js +1 -1
- package/source/views/create/RecordSet-Create.js +344 -0
- package/source/views/dashboard/RecordSet-Dashboard.js +3 -2
- package/source/views/list/RecordSet-List.js +2 -2
- package/source/views/read/RecordSet-Read.js +760 -44
- package/types/application/Pict-Application-RecordSet.d.ts.map +1 -1
- package/types/providers/RecordSet-RecordProvider-Base.d.ts +2 -0
- package/types/providers/RecordSet-RecordProvider-Base.d.ts.map +1 -1
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts +3 -5
- package/types/providers/RecordSet-RecordProvider-MeadowEndpoints.d.ts.map +1 -1
- package/types/services/RecordsSet-MetaController.d.ts +1 -1
- package/types/services/RecordsSet-MetaController.d.ts.map +1 -1
- package/types/views/create/RecordSet-Create.d.ts +39 -0
- package/types/views/create/RecordSet-Create.d.ts.map +1 -0
- package/types/views/dashboard/RecordSet-Dashboard.d.ts.map +1 -1
- package/types/views/read/RecordSet-Read.d.ts +65 -5
- package/types/views/read/RecordSet-Read.d.ts.map +1 -1
- package/source/views/edit/RecordSet-Edit-HeaderEdit.js +0 -64
- package/source/views/edit/RecordSet-Edit-RecordEdit.js +0 -64
- package/source/views/edit/RecordSet-Edit-RecordEditControls.js +0 -64
- package/source/views/edit/RecordSet-Edit-RecordEditExtra.js +0 -64
- package/source/views/edit/RecordSet-Edit-TabBarEdit.js +0 -64
- package/source/views/edit/RecordSet-Edit.js +0 -64
- package/source/views/read/RecordSet-Read-HeaderRead.js +0 -64
- package/source/views/read/RecordSet-Read-RecordRead.js +0 -78
- package/source/views/read/RecordSet-Read-RecordReadExtra.js +0 -64
- package/source/views/read/RecordSet-Read-TabBarRead.js +0 -64
|
@@ -157,6 +157,34 @@ class SimpleApplication extends libPictRecordSet.PictRecordSetApplication
|
|
|
157
157
|
onInitialize()
|
|
158
158
|
{
|
|
159
159
|
this.pict.addView('PRSP-FilterType-ExternalJoinSelectedValueList-MyCoolView', {}, CustomFilterView);
|
|
160
|
+
this.pict.addView('SpecialBookView',
|
|
161
|
+
{
|
|
162
|
+
"ViewIdentifier": "SpecialBookView",
|
|
163
|
+
|
|
164
|
+
"DefaultRenderable": "SpecialBookView",
|
|
165
|
+
"DefaultDestinationAddress": "#Placeholder",
|
|
166
|
+
"IncludeInMetacontrollerOperations": true,
|
|
167
|
+
|
|
168
|
+
"AutoRender": false,
|
|
169
|
+
|
|
170
|
+
"Templates": [
|
|
171
|
+
{
|
|
172
|
+
"Hash": "SpecialBookView-Content",
|
|
173
|
+
"Template": /*html*/`
|
|
174
|
+
<div>
|
|
175
|
+
This is a special book view, here's some text: <br />
|
|
176
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
177
|
+
</div>
|
|
178
|
+
`
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"Renderables": [
|
|
182
|
+
{
|
|
183
|
+
"RenderableHash": "SpecialBookView",
|
|
184
|
+
"TemplateHash": "SpecialBookView-Content"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
});
|
|
160
188
|
|
|
161
189
|
return super.onInitialize();
|
|
162
190
|
}
|
|
@@ -175,6 +203,156 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
175
203
|
|
|
176
204
|
"Manifests": // Manifest'Ohs: Breakfast of Champions
|
|
177
205
|
{
|
|
206
|
+
"Book-View":
|
|
207
|
+
{
|
|
208
|
+
"Form": "BookViewManifest",
|
|
209
|
+
"Scope": "Book-View",
|
|
210
|
+
"Descriptors":
|
|
211
|
+
{
|
|
212
|
+
"BookDetails.Title":
|
|
213
|
+
{
|
|
214
|
+
"Name": "Title",
|
|
215
|
+
"Hash": "ViewBookName",
|
|
216
|
+
"DataType": "String",
|
|
217
|
+
"PictForm":
|
|
218
|
+
{
|
|
219
|
+
"Row": "1",
|
|
220
|
+
"Section": "BookView",
|
|
221
|
+
"Group": "BookView"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"BookDetails.Genre":
|
|
225
|
+
{
|
|
226
|
+
"Name": "Genre",
|
|
227
|
+
"Hash": "ViewBookGenre",
|
|
228
|
+
"DataType": "String",
|
|
229
|
+
"PictForm":
|
|
230
|
+
{
|
|
231
|
+
"Row": "1",
|
|
232
|
+
"Section": "BookView",
|
|
233
|
+
"Group": "BookView"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"BookDetails.ISBN":
|
|
237
|
+
{
|
|
238
|
+
"Name": "ISBN",
|
|
239
|
+
"Hash": "ViewBookISBN",
|
|
240
|
+
"DataType": "String",
|
|
241
|
+
"PictForm":
|
|
242
|
+
{
|
|
243
|
+
"Row": "2",
|
|
244
|
+
"Section": "BookView",
|
|
245
|
+
"Group": "BookView"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"Sections":
|
|
250
|
+
[
|
|
251
|
+
{
|
|
252
|
+
"Name": "Book View",
|
|
253
|
+
"Hash": "BookView",
|
|
254
|
+
"Solvers": [],
|
|
255
|
+
"ShowTitle": false,
|
|
256
|
+
"Groups": [
|
|
257
|
+
{
|
|
258
|
+
"Name": "Book View",
|
|
259
|
+
"Hash": "BookView",
|
|
260
|
+
"Rows": [],
|
|
261
|
+
"RecordSetSolvers": [],
|
|
262
|
+
"ShowTitle": false
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"Author-View":
|
|
269
|
+
{
|
|
270
|
+
"Form": "AuthorViewManifest",
|
|
271
|
+
"Scope": "Author-View",
|
|
272
|
+
"Descriptors":
|
|
273
|
+
{
|
|
274
|
+
"AuthorDetails.Name":
|
|
275
|
+
{
|
|
276
|
+
"Name": "Author Name",
|
|
277
|
+
"Hash": "ViewAuthorName",
|
|
278
|
+
"DataType": "String",
|
|
279
|
+
"PictForm":
|
|
280
|
+
{
|
|
281
|
+
"Row": "1",
|
|
282
|
+
"Section": "AuthorView",
|
|
283
|
+
"Group": "AuthorView"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
"Sections":
|
|
288
|
+
[
|
|
289
|
+
{
|
|
290
|
+
"Name": "Author View",
|
|
291
|
+
"Hash": "AuthorView",
|
|
292
|
+
"Solvers": [],
|
|
293
|
+
"ShowTitle": false,
|
|
294
|
+
"Groups": [
|
|
295
|
+
{
|
|
296
|
+
"Name": "Author View",
|
|
297
|
+
"Hash": "AuthorView",
|
|
298
|
+
"Rows": [],
|
|
299
|
+
"RecordSetSolvers": [],
|
|
300
|
+
"ShowTitle": false
|
|
301
|
+
}
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"AuthorMetadata":
|
|
307
|
+
{
|
|
308
|
+
"Form": "AuthorMetadataManifest",
|
|
309
|
+
"Scope": "AuthorMetadata",
|
|
310
|
+
"Descriptors":
|
|
311
|
+
{
|
|
312
|
+
"AuthorDetails.GUIDAuthor":
|
|
313
|
+
{
|
|
314
|
+
"Name": "Author GUID",
|
|
315
|
+
"Hash": "ViewGUIDAuthor",
|
|
316
|
+
"DataType": "String",
|
|
317
|
+
"PictForm":
|
|
318
|
+
{
|
|
319
|
+
"Row": "1",
|
|
320
|
+
"Section": "AuthorMetadata",
|
|
321
|
+
"Group": "AuthorMetadata"
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"AuthorDetails.IDAuthor":
|
|
325
|
+
{
|
|
326
|
+
"Name": "ID Author",
|
|
327
|
+
"Hash": "ViewIDAuthor",
|
|
328
|
+
"DataType": "String",
|
|
329
|
+
"PictForm":
|
|
330
|
+
{
|
|
331
|
+
"Row": "1",
|
|
332
|
+
"Section": "AuthorMetadata",
|
|
333
|
+
"Group": "AuthorMetadata"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
"Sections":
|
|
338
|
+
[
|
|
339
|
+
{
|
|
340
|
+
"Name": "Author Metadata",
|
|
341
|
+
"Hash": "AuthorMetadata",
|
|
342
|
+
"Solvers": [],
|
|
343
|
+
"ShowTitle": false,
|
|
344
|
+
"Groups": [
|
|
345
|
+
{
|
|
346
|
+
"Name": "Author Metadata",
|
|
347
|
+
"Hash": "AuthorMetadata",
|
|
348
|
+
"Rows": [],
|
|
349
|
+
"RecordSetSolvers": [],
|
|
350
|
+
"ShowTitle": false
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
},
|
|
178
356
|
"Bestsellers":
|
|
179
357
|
{
|
|
180
358
|
"Scope": "Bestsellers",
|
|
@@ -481,6 +659,32 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
481
659
|
}
|
|
482
660
|
},
|
|
483
661
|
|
|
662
|
+
"RecordSetReadManifestOnly": true,
|
|
663
|
+
"RecordSetReadDefaultManifestView": "Book-View",
|
|
664
|
+
"RecordSetReadManifestsView": [ "Book-View" ],
|
|
665
|
+
|
|
666
|
+
"ReadLayout": "Split",
|
|
667
|
+
|
|
668
|
+
"RecordSetReadTabs":
|
|
669
|
+
[
|
|
670
|
+
{
|
|
671
|
+
Type: "AttachedRecord",
|
|
672
|
+
RecordSet: "Author",
|
|
673
|
+
Title: "Author",
|
|
674
|
+
JoiningRecordSet: "BookAuthorJoin"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
Type: "Manifest",
|
|
678
|
+
Manifest: "AuthorMetadata",
|
|
679
|
+
Title: "Author Metadata"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
Type: "View",
|
|
683
|
+
View: "SpecialBookView",
|
|
684
|
+
Title: "More Book Info"
|
|
685
|
+
}
|
|
686
|
+
],
|
|
687
|
+
|
|
484
688
|
"RecordSetListManifestOnly": false,
|
|
485
689
|
|
|
486
690
|
"RecordSetListManifests": [ "Bestsellers", "Underdogs", "NewReleases" ],
|
|
@@ -579,7 +783,23 @@ module.exports.default_configuration.pict_configuration = (
|
|
|
579
783
|
"RecordSetType": "MeadowEndpoint",
|
|
580
784
|
"RecordSetMeadowEntity": "Author",
|
|
581
785
|
|
|
582
|
-
"RecordSetURLPrefix": "/1.0/"
|
|
786
|
+
"RecordSetURLPrefix": "/1.0/",
|
|
787
|
+
|
|
788
|
+
"RecordSetReadManifestOnly": true,
|
|
789
|
+
"RecordSetReadManifestsView": [ "Author-View" ],
|
|
790
|
+
|
|
791
|
+
"ReadLayout": "Tab",
|
|
792
|
+
"RecordSetReadTabTitle": "Author",
|
|
793
|
+
|
|
794
|
+
"RecordSetReadTabs":
|
|
795
|
+
[
|
|
796
|
+
{
|
|
797
|
+
Type: "Manifest",
|
|
798
|
+
Manifest: "AuthorMetadata",
|
|
799
|
+
Title: "Author Metadata"
|
|
800
|
+
}
|
|
801
|
+
],
|
|
802
|
+
|
|
583
803
|
},
|
|
584
804
|
{
|
|
585
805
|
"RecordSet": "RandomizedValues",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
<ul>
|
|
18
18
|
<li><a href="#/PSRS/Book/List">Book List</a></li>
|
|
19
19
|
<li><a href="#/PSRS/Author/List">Author List</a></li>
|
|
20
|
+
<li><a href="#/PSRS/Book/Create">Book Create</a></li>
|
|
21
|
+
<li><a href="#/PSRS/Author/Create">Author Create</a></li>
|
|
20
22
|
</ul>
|
|
21
23
|
</nav>
|
|
22
24
|
<div id="PRSP_Container"></div>
|
package/package.json
CHANGED
|
@@ -26,6 +26,8 @@ class PictSectionRecordSetApplication extends libPictApplication
|
|
|
26
26
|
//FIXME: this is probably wrong, but needed for now?
|
|
27
27
|
this.pict.addServiceType('PictSectionForm', libPictSectionForm);
|
|
28
28
|
|
|
29
|
+
this.pict.addView('PictFormMetacontroller', {}, libPictSectionForm.PictFormMetacontroller);
|
|
30
|
+
|
|
29
31
|
this.fable.addProviderSingleton('DynamicRecordsetSolver', libDynamicSolver.default_configuration, libDynamicSolver);
|
|
30
32
|
|
|
31
33
|
// add the dependencies for dynamic controls
|
|
@@ -25,7 +25,7 @@ class PictRecordSetLinkManager extends libPictProvider
|
|
|
25
25
|
// Format:
|
|
26
26
|
// {
|
|
27
27
|
// Name: "View Record",
|
|
28
|
-
// URL: "#/PSRS/{~D:Record.Payload.RecordSet~}/
|
|
28
|
+
// URL: "#/PSRS/{~D:Record.Payload.RecordSet~}/View/{~DVBK:Record.Data:Record.Payload.GUIDAddress~}",
|
|
29
29
|
// Default: true
|
|
30
30
|
// }
|
|
31
31
|
this.linkTemplates = [];
|
|
@@ -102,6 +102,16 @@ class RecordSetProviderBase extends libPictProvider
|
|
|
102
102
|
}
|
|
103
103
|
*/
|
|
104
104
|
|
|
105
|
+
getGUIDField()
|
|
106
|
+
{
|
|
107
|
+
return `GUID${ this.options.Entity }`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
getIDField()
|
|
111
|
+
{
|
|
112
|
+
return `ID${ this.options.Entity }`;
|
|
113
|
+
}
|
|
114
|
+
|
|
105
115
|
/**
|
|
106
116
|
* Read records from the provider.
|
|
107
117
|
*
|
|
@@ -111,6 +111,36 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
getGUIDField()
|
|
115
|
+
{
|
|
116
|
+
if (this._Schema?.MeadowSchema?.Schema?.length)
|
|
117
|
+
{
|
|
118
|
+
for (let field of this._Schema.MeadowSchema.Schema)
|
|
119
|
+
{
|
|
120
|
+
if (field.Type == 'AutoGUID')
|
|
121
|
+
{
|
|
122
|
+
return field.Column;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return `GUID${ this.options.Entity }`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
getIDField()
|
|
130
|
+
{
|
|
131
|
+
if (this._Schema?.MeadowSchema?.Schema?.length)
|
|
132
|
+
{
|
|
133
|
+
for (let field of this._Schema.MeadowSchema.Schema)
|
|
134
|
+
{
|
|
135
|
+
if (field.Type == 'AutoIdentity')
|
|
136
|
+
{
|
|
137
|
+
return field.Column;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return `ID${ this.options.Entity }`;
|
|
142
|
+
}
|
|
143
|
+
|
|
114
144
|
/**
|
|
115
145
|
* Get a record by its ID or GUID.
|
|
116
146
|
*
|
|
@@ -128,7 +158,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
128
158
|
}
|
|
129
159
|
return new Promise((resolve, reject) =>
|
|
130
160
|
{
|
|
131
|
-
this.entityProvider.getEntitySet(this.options.Entity, `FBV
|
|
161
|
+
this.entityProvider.getEntitySet(this.options.Entity, `FBV~${ this.getGUIDField() }~EQ~${encodeURIComponent(pGuid)}`, (pError, pResult) =>
|
|
132
162
|
{
|
|
133
163
|
if (pError)
|
|
134
164
|
{
|
|
@@ -289,7 +319,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
289
319
|
{
|
|
290
320
|
if (this.pict.LogNoisiness > 1)
|
|
291
321
|
{
|
|
292
|
-
this.pict.log.info(`Updating record ${this.options.Entity} ${pRecord[
|
|
322
|
+
this.pict.log.info(`Updating record ${this.options.Entity} ${pRecord[this.getIDField()]}`);
|
|
293
323
|
}
|
|
294
324
|
return new Promise((resolve, reject) =>
|
|
295
325
|
{
|
|
@@ -316,12 +346,12 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
316
346
|
{
|
|
317
347
|
if (this.pict.LogNoisiness > 1)
|
|
318
348
|
{
|
|
319
|
-
this.pict.log.info(`Deleting record ${this.options.Entity} ${pRecord[
|
|
349
|
+
this.pict.log.info(`Deleting record ${this.options.Entity} ${pRecord[this.getIDField()]}`);
|
|
320
350
|
}
|
|
321
351
|
return new Promise((resolve, reject) =>
|
|
322
352
|
{
|
|
323
353
|
this.entityProvider.restClient.delJSON({
|
|
324
|
-
url: `${this.options.URLPrefix}${this.options.Entity}/${pRecord[
|
|
354
|
+
url: `${this.options.URLPrefix}${this.options.Entity}/${pRecord[this.getIDField()]}`,
|
|
325
355
|
body: pRecord,
|
|
326
356
|
}, (error, response, result) =>
|
|
327
357
|
{
|
|
@@ -372,8 +402,8 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
372
402
|
*/
|
|
373
403
|
cleanRecord(pRecord)
|
|
374
404
|
{
|
|
375
|
-
delete pRecord[
|
|
376
|
-
delete pRecord[
|
|
405
|
+
delete pRecord[this.getIDField()];
|
|
406
|
+
delete pRecord[this.getGUIDField()];
|
|
377
407
|
return pRecord;
|
|
378
408
|
}
|
|
379
409
|
|
|
@@ -395,7 +425,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
395
425
|
tmpFieldType = pMeadowSchemaField.Type.toLowerCase();
|
|
396
426
|
}
|
|
397
427
|
tmpFieldFilterClauses = [];
|
|
398
|
-
const tmpFieldHumanName = this.
|
|
428
|
+
const tmpFieldHumanName = this.getHumanReadableFieldName(pSchemaField);
|
|
399
429
|
const isUserAuditField = ['CreatingIDUser', 'DeletingIDUser', 'UpdatingIDUser'].includes(pSchemaField);
|
|
400
430
|
const customFilterClauses = this.options.Filters?.[pSchemaField];
|
|
401
431
|
if (pSchemaField.startsWith('ID') || pSchemaField.startsWith('ParentID') || isUserAuditField || customFilterClauses)
|
|
@@ -403,7 +433,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
403
433
|
for (const customField of Array.isArray(customFilterClauses) ? customFilterClauses : [customFilterClauses])
|
|
404
434
|
{
|
|
405
435
|
const remoteTableName = customField?.RemoteTable || pSchemaField.split('ID')[1];
|
|
406
|
-
const fieldName = this.
|
|
436
|
+
const fieldName = this.getHumanReadableFieldName(pSchemaField);
|
|
407
437
|
tmpFieldFilterClauses.push(Object.assign(
|
|
408
438
|
{
|
|
409
439
|
"Label": `${ fieldName }`,
|
|
@@ -575,17 +605,17 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
575
605
|
* @param {string} pSchemaField - The schema field name.
|
|
576
606
|
* @return {string} - The human-readable name for the schema field.
|
|
577
607
|
*/
|
|
578
|
-
|
|
608
|
+
getHumanReadableFieldName(pSchemaField)
|
|
579
609
|
{
|
|
580
610
|
if (!this._Schema || !this._Schema.properties || !this._Schema.properties[pSchemaField])
|
|
581
611
|
{
|
|
582
612
|
return pSchemaField;
|
|
583
613
|
}
|
|
584
|
-
if (pSchemaField ===
|
|
614
|
+
if (pSchemaField === this.getIDField())
|
|
585
615
|
{
|
|
586
616
|
return `${this._getHumanReadableEntityName(this.options.Entity)} Unique Database ID`;
|
|
587
617
|
}
|
|
588
|
-
if (pSchemaField ===
|
|
618
|
+
if (pSchemaField === this.getGUIDField())
|
|
589
619
|
{
|
|
590
620
|
return `${this._getHumanReadableEntityName(this.options.Entity)} Unique Identifier`;
|
|
591
621
|
}
|
|
@@ -682,7 +712,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
682
712
|
}
|
|
683
713
|
if (!tmpFieldFilterSchema.DisplayName)
|
|
684
714
|
{
|
|
685
|
-
tmpFieldFilterSchema.DisplayName = this.
|
|
715
|
+
tmpFieldFilterSchema.DisplayName = this.getHumanReadableFieldName(tmpSchemaField);
|
|
686
716
|
}
|
|
687
717
|
if (!tmpFieldFilterSchema.Description)
|
|
688
718
|
{
|
|
@@ -716,7 +746,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
716
746
|
for (const tmpFilterKey of Object.keys(this.pict.providers.FilterManager.filters))
|
|
717
747
|
{
|
|
718
748
|
const tmpFilterClause = this.pict.providers.FilterManager.filters[tmpFilterKey];
|
|
719
|
-
if (tmpFilterClause.CoreConnectionColumn ===
|
|
749
|
+
if (tmpFilterClause.CoreConnectionColumn === this.getIDField())
|
|
720
750
|
{
|
|
721
751
|
//FIXME: I don't think using filter key is right here
|
|
722
752
|
let tmpFieldFilterSchema = this._FilterSchema[tmpFilterKey];
|
|
@@ -732,7 +762,7 @@ class MeadowEndpointsRecordSetProvider extends libRecordSetProviderBase
|
|
|
732
762
|
{
|
|
733
763
|
tmpFieldFilterSchema.RecordSet = this.options.RecordSet;
|
|
734
764
|
}
|
|
735
|
-
const tmpFieldHumanName = this.
|
|
765
|
+
const tmpFieldHumanName = this.getHumanReadableFieldName(tmpFilterKey);
|
|
736
766
|
if (tmpFilterClause.DisplayName)
|
|
737
767
|
{
|
|
738
768
|
tmpFieldFilterSchema.DisplayName = tmpFilterClause.DisplayName;
|
|
@@ -46,7 +46,7 @@ class PictRecordSetRouter extends libPictProvider
|
|
|
46
46
|
//this.pictRouter.addRoute('/PSRS/:RecordSet/List/:Begin/:Cap', "{~LV:Record~}");
|
|
47
47
|
this.pict.views['RSP-RecordSet-List'].addRoutes(pRouter);
|
|
48
48
|
this.pict.views['RSP-RecordSet-Read'].addRoutes(pRouter);
|
|
49
|
-
this.pict.views['RSP-RecordSet-
|
|
49
|
+
this.pict.views['RSP-RecordSet-Create'].addRoutes(pRouter);
|
|
50
50
|
this.pict.views['RSP-RecordSet-Dashboard'].addRoutes(pRouter);
|
|
51
51
|
|
|
52
52
|
this.pict.PictSectionRecordSet.addRoutes(pRouter);
|
|
@@ -2,8 +2,8 @@ const libFableServiceProviderBase = require('fable-serviceproviderbase');
|
|
|
2
2
|
|
|
3
3
|
const ViewDefinitionRecordSetErrorNotFound = require('../views/error/RecordSet-Error-NotFound.json');
|
|
4
4
|
const ViewRecordSetList = require('../views/list/RecordSet-List.js');
|
|
5
|
-
const ViewRecordSetEdit = require('../views/edit/RecordSet-Edit.js');
|
|
6
5
|
const ViewRecordSetRead = require('../views/read/RecordSet-Read.js');
|
|
6
|
+
const ViewRecordSetCreate = require('../views/create/RecordSet-Create.js');
|
|
7
7
|
const ViewRecordSetDashboard = require('../views/dashboard/RecordSet-Dashboard.js');
|
|
8
8
|
|
|
9
9
|
//_Pict.addProvider('BooksProvider', { Entity: 'Book', URLPrefix: 'http://www.datadebase.com:8086/1.0/' }, require('../source/providers/RecordSet-RecordProvider-MeadowEndpoints.js'));
|
|
@@ -41,7 +41,7 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
41
41
|
|
|
42
42
|
this.childViews = {
|
|
43
43
|
list: null,
|
|
44
|
-
|
|
44
|
+
create: null,
|
|
45
45
|
read: null,
|
|
46
46
|
dashboard: null
|
|
47
47
|
};
|
|
@@ -432,14 +432,14 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
432
432
|
this.pict.addTemplate(require('../views/filters').Base);
|
|
433
433
|
this.childViews.errorNotFound = this.fable.addView('RSP-RecordSet-Error-NotFound', ViewDefinitionRecordSetErrorNotFound);
|
|
434
434
|
this.childViews.list = this.fable.addView('RSP-RecordSet-List', this.options, ViewRecordSetList);
|
|
435
|
-
this.childViews.edit = this.fable.addView('RSP-RecordSet-Edit', this.options, ViewRecordSetEdit);
|
|
436
435
|
this.childViews.read = this.fable.addView('RSP-RecordSet-Read', this.options, ViewRecordSetRead);
|
|
436
|
+
this.childViews.create = this.fable.addView('RSP-RecordSet-Create', this.options, ViewRecordSetCreate);
|
|
437
437
|
this.childViews.dashboard = this.fable.addView('RSP-RecordSet-Dashboard', this.options, ViewRecordSetDashboard);
|
|
438
438
|
|
|
439
439
|
// Initialize the subviews
|
|
440
440
|
this.childViews.list.initialize();
|
|
441
|
-
this.childViews.edit.initialize();
|
|
442
441
|
this.childViews.read.initialize();
|
|
442
|
+
this.childViews.create.initialize();
|
|
443
443
|
this.childViews.dashboard.initialize();
|
|
444
444
|
|
|
445
445
|
// Now initialize the router
|
|
@@ -484,9 +484,12 @@ class RecordSetMetacontroller extends libFableServiceProviderBase
|
|
|
484
484
|
{
|
|
485
485
|
this.pict.log.error(`RecordSetDashboard: Manifest key ${tmpManifestKey} does not match manifest scope ${tmpManifest.Scope}. This is bad. Fix it.`);
|
|
486
486
|
}
|
|
487
|
-
|
|
487
|
+
if (!tmpManifest.Form)
|
|
488
|
+
{
|
|
489
|
+
this.generateManifestTableCells(tmpManifest);
|
|
490
|
+
}
|
|
488
491
|
this.manifestDefinitions[tmpManifest.Scope] = tmpManifest;
|
|
489
|
-
this.manifests[tmpManifest.Scope] = this.pict.newManyfest(tmpManifest);
|
|
492
|
+
this.manifests[tmpManifest.Scope] = tmpManifest.Form ? tmpManifest : this.pict.newManyfest(tmpManifest);
|
|
490
493
|
}
|
|
491
494
|
|
|
492
495
|
this.has_initialized = true;
|