mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
fix: adjust model to remove references from things without references
Fixes #69
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCThing, SCThingMeta, SCThingType} from '../Thing';
|
||||
import {SCThing, SCThingMeta, SCThingType, SCThingWithoutReferences} from '../Thing';
|
||||
import {SCMetaTranslations, SCNationality} from '../types/i18n';
|
||||
import {SCISO8601Date} from '../types/Time';
|
||||
import {SCBuildingWithoutReferences} from './Building';
|
||||
@@ -23,7 +23,8 @@ import {SCRoomWithoutReferences} from './Room';
|
||||
/**
|
||||
* A person without references
|
||||
*/
|
||||
export interface SCPersonWithoutReferences extends SCThing {
|
||||
export interface SCPersonWithoutReferences
|
||||
extends SCThingWithoutReferences {
|
||||
/**
|
||||
* Additional first names of the person.
|
||||
*/
|
||||
@@ -102,7 +103,8 @@ export interface SCPersonWithoutReferences extends SCThing {
|
||||
*
|
||||
* @validatable
|
||||
*/
|
||||
export interface SCPerson extends SCPersonWithoutReferences {
|
||||
export interface SCPerson
|
||||
extends SCPersonWithoutReferences, SCThing {
|
||||
/**
|
||||
* Organization the person works for
|
||||
*/
|
||||
@@ -129,29 +131,31 @@ export interface SCPerson extends SCPersonWithoutReferences {
|
||||
/**
|
||||
* Meta information about a person
|
||||
*/
|
||||
export class SCPersonMeta extends SCThingMeta implements SCMetaTranslations<SCPerson> {
|
||||
export class SCPersonMeta
|
||||
extends SCThingMeta
|
||||
implements SCMetaTranslations<SCPerson> {
|
||||
/**
|
||||
* Translations of fields
|
||||
*/
|
||||
fieldTranslations = {
|
||||
de: {
|
||||
... SCThingMeta.getInstance().fieldTranslations.de,
|
||||
...SCThingMeta.getInstance().fieldTranslations.de,
|
||||
},
|
||||
en: {
|
||||
... SCThingMeta.getInstance().fieldTranslations.en,
|
||||
...SCThingMeta.getInstance().fieldTranslations.en,
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* Translations of values of fields
|
||||
*/
|
||||
fieldValueTranslations = {
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
... SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||
...SCThingMeta.getInstance().fieldValueTranslations.de,
|
||||
type: 'Person',
|
||||
},
|
||||
en: {
|
||||
... SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||
...SCThingMeta.getInstance().fieldValueTranslations.en,
|
||||
type: SCThingType.Person,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user