mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 16:42:56 +00:00
fix: adjust model to remove references from things without references
Fixes #69
This commit is contained in:
@@ -13,14 +13,15 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCThingInPlace, SCThingInPlaceMeta} from '../base/ThingInPlace';
|
||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
||||
import {SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||
import {SCMetaTranslations} from '../types/i18n';
|
||||
import {SCISO8601Duration} from '../types/Time';
|
||||
|
||||
/**
|
||||
* A ticket without references
|
||||
*/
|
||||
export interface SCTicketWithoutReferences extends SCThing {
|
||||
export interface SCTicketWithoutReferences
|
||||
extends SCThingWithoutReferences {
|
||||
/**
|
||||
* Approximate wait time
|
||||
*/
|
||||
@@ -47,7 +48,8 @@ export interface SCTicketWithoutReferences extends SCThing {
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace {
|
||||
export interface SCTicket
|
||||
extends SCTicketWithoutReferences, SCThingInPlace {
|
||||
/**
|
||||
* Type of a ticket
|
||||
*/
|
||||
@@ -57,29 +59,31 @@ export interface SCTicket extends SCTicketWithoutReferences, SCThingInPlace {
|
||||
/**
|
||||
* Meta information about a ticket
|
||||
*/
|
||||
export class SCTicketMeta extends SCThingMeta implements SCMetaTranslations<SCTicket> {
|
||||
export class SCTicketMeta
|
||||
extends SCThingMeta
|
||||
implements SCMetaTranslations<SCTicket> {
|
||||
/**
|
||||
* Translations of fields
|
||||
*/
|
||||
fieldTranslations = {
|
||||
de: {
|
||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
||||
...SCThingInPlaceMeta.getInstance().fieldTranslations.de,
|
||||
},
|
||||
en: {
|
||||
... SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
||||
...SCThingInPlaceMeta.getInstance().fieldTranslations.en,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Translations of values of fields
|
||||
*/
|
||||
fieldValueTranslations = {
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
||||
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.de,
|
||||
type: 'Ticket',
|
||||
},
|
||||
en: {
|
||||
... SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
||||
...SCThingInPlaceMeta.getInstance().fieldValueTranslations.en,
|
||||
type: SCThingType.Ticket,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user