}
const fullTable = schema + '.' + table;
-
// Set the prefix to "server", "local", "workstation",
// extracted from the URL path.
+ // For admin pages that use none of these, avoid setting
+ // the prefix because that will cause it to double-up.
+ // e.g. eg.grid.acq.acq.cancel_reason
this.persistKeyPfx = this.route.snapshot.parent.url[0].path;
- if (this.persistKeyPfx === 'acq') {
- // ACQ is a special case, becaus unlike 'server', 'local',
+ const selfPrefixers = ['acq', 'booking'];
+ if (selfPrefixers.indexOf(this.persistKeyPfx) > -1) {
+ // ACQ is a special case, because unlike 'server', 'local',
// 'workstation', the schema ('acq') is the root of the path.
this.persistKeyPfx = '';
}
INSERT into config.workstation_setting_type (name, grp, datatype, label)
VALUES (
- 'eg.grid.admin.booking.booking.resource', 'gui', 'object',
+ 'eg.grid.admin.booking.resource', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource',
- 'Grid Config: admin.booking.booking.resource',
+ 'eg.grid.admin.booking.resource',
+ 'Grid Config: admin.booking.resource',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr',
- 'Grid Config: admin.booking.booking.resource_attr',
+ 'eg.grid.admin.booking.resource_attr',
+ 'Grid Config: admin.booking.resource_attr',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr_map', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr_map', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr_map',
- 'Grid Config: admin.booking.booking.resource_attr_map',
+ 'eg.grid.admin.booking.resource_attr_map',
+ 'Grid Config: admin.booking.resource_attr_map',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr_value', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr_value', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr_value',
- 'Grid Config: admin.booking.booking.resource_attr_value',
+ 'eg.grid.admin.booking.resource_attr_value',
+ 'Grid Config: admin.booking.resource_attr_value',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_type', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_type', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_type',
- 'Grid Config: admin.booking.booking.resource_type',
+ 'eg.grid.admin.booking.resource_type',
+ 'Grid Config: admin.booking.resource_type',
'cwst', 'label'
)
);
INSERT into config.workstation_setting_type (name, grp, datatype, label)
VALUES (
- 'eg.grid.admin.booking.booking.resource', 'gui', 'object',
+ 'eg.grid.admin.booking.resource', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource',
- 'Grid Config: admin.booking.booking.resource',
+ 'eg.grid.admin.booking.resource',
+ 'Grid Config: admin.booking.resource',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr',
- 'Grid Config: admin.booking.booking.resource_attr',
+ 'eg.grid.admin.booking.resource_attr',
+ 'Grid Config: admin.booking.resource_attr',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr_map', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr_map', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr_map',
- 'Grid Config: admin.booking.booking.resource_attr_map',
+ 'eg.grid.admin.booking.resource_attr_map',
+ 'Grid Config: admin.booking.resource_attr_map',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_attr_value', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_attr_value', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_attr_value',
- 'Grid Config: admin.booking.booking.resource_attr_value',
+ 'eg.grid.admin.booking.resource_attr_value',
+ 'Grid Config: admin.booking.resource_attr_value',
'cwst', 'label'
)
), (
- 'eg.grid.admin.booking.booking.resource_type', 'gui', 'object',
+ 'eg.grid.admin.booking.resource_type', 'gui', 'object',
oils_i18n_gettext (
- 'eg.grid.admin.booking.booking.resource_type',
- 'Grid Config: admin.booking.booking.resource_type',
+ 'eg.grid.admin.booking.resource_type',
+ 'Grid Config: admin.booking.resource_type',
'cwst', 'label'
)
);