feat: job portal

fix: disable function scoping lint rule
fix: outdated contributing docs for adding SCThings
This commit is contained in:
theld
2023-10-02 20:34:49 +00:00
committed by Thea Schöbl
parent f3ba8af051
commit 06b8ca109e
42 changed files with 626 additions and 65 deletions

View File

@@ -31,6 +31,7 @@ export * from './things/course-of-study.js';
export * from './things/date-series.js';
export * from './things/diff.js';
export * from './things/dish.js';
export * from './things/job-posting.js';
export * from './things/favorite.js';
export * from './things/floor.js';
export * from './things/id-card.js';

View File

@@ -39,6 +39,8 @@ import {SCDiff, SCDiffMeta, SCDiffWithoutReferences} from './things/diff.js';
import {SCDish, SCDishMeta, SCDishWithoutReferences} from './things/dish.js';
import {SCFavorite, SCFavoriteMeta, SCFavoriteWithoutReferences} from './things/favorite.js';
import {SCFloor, SCFloorMeta, SCFloorWithoutReferences} from './things/floor.js';
import {SCIdCard, SCIdCardMeta, SCIdCardWithoutReferences} from './things/id-card.js';
import {SCJobPosting, SCJobPostingMeta, SCJobPostingWithoutReferences} from './things/job-posting.js';
import {SCMessage, SCMessageMeta, SCMessageWithoutReferences} from './things/message.js';
import {SCOrganization, SCOrganizationMeta, SCOrganizationWithoutReferences} from './things/organization.js';
import {SCPeriodical, SCPeriodicalMeta, SCPeriodicalWithoutReferences} from './things/periodical.js';
@@ -62,7 +64,6 @@ import {SCTicket, SCTicketMeta, SCTicketWithoutReferences} from './things/ticket
import {SCToDo, SCToDoMeta, SCToDoWithoutReferences} from './things/todo.js';
import {SCTour, SCTourMeta, SCTourWithoutReferences} from './things/tour.js';
import {SCVideo, SCVideoMeta, SCVideoWithoutReferences} from './things/video.js';
import {SCIdCard, SCIdCardMeta, SCIdCardWithoutReferences} from './things/id-card.js';
/**
* A map of things, from type to meta data
@@ -98,6 +99,7 @@ export const SCClasses: {[K in SCThingType]: object} = {
'tour': SCTourMeta,
'video': SCVideoMeta,
'certification': SCCertificationMeta,
'job posting': SCJobPostingMeta,
};
export type SCIndexableThings =
@@ -127,7 +129,8 @@ export type SCIndexableThings =
| SCTicket
| SCToDo
| SCTour
| SCVideo;
| SCVideo
| SCJobPosting;
/**
* An object that exists in the StAppsCore
@@ -172,6 +175,8 @@ export type SCAssociatedThingWithoutReferences<THING extends SCThings> = THING e
? SCFloorWithoutReferences
: THING extends SCIdCard
? SCIdCardWithoutReferences
: THING extends SCJobPosting
? SCJobPostingWithoutReferences
: THING extends SCMessage
? SCMessageWithoutReferences
: THING extends SCOrganization
@@ -231,6 +236,8 @@ export type SCAssociatedThing<THING extends SCThings> = THING extends SCAssessme
? SCDiff
: THING extends SCDishWithoutReferences
? SCDish
: THING extends SCJobPostingWithoutReferences
? SCJobPosting
: THING extends SCFavoriteWithoutReferences
? SCFavorite
: THING extends SCFloorWithoutReferences

View File

@@ -53,6 +53,7 @@ export enum SCThingType {
ToDo = 'todo',
Tour = 'tour',
Video = 'video',
JobPosting = 'job posting',
}
/**

View File

@@ -0,0 +1,108 @@
import {SCInPlace} from './abstract/place.js';
import {
SCThingWithCategories,
SCThingWithCategoriesSpecificValues,
SCThingWithCategoriesWithoutReferences,
SCThingWithCategoriesWithoutReferencesMeta,
} from './abstract/thing-with-categories.js';
import {SCThingMeta, SCThingType} from './abstract/thing.js';
import {SCOrganizationWithoutReferences} from './organization.js';
/**
* categories of a job posting
*/
export type SCJobCategories =
| 'law'
| 'business'
| 'natural'
| 'it'
| 'education'
| 'other'
| 'arts'
| 'social'
| 'engineering'
| 'communication'
| 'medical';
export interface SCJobPostingWithoutReferences
extends SCThingWithCategoriesWithoutReferences<SCJobCategories, SCThingWithCategoriesSpecificValues>,
SCInPlace {
/**
* Type of a job posting
*/
type: SCThingType.JobPosting;
}
/**
* A JobPosting
* @validatable
* @indexable
*/
export interface SCJobPosting
extends SCThingWithCategories<SCJobCategories, SCThingWithCategoriesSpecificValues>,
SCJobPostingWithoutReferences {
/**
* A description of the employer
* @text
*/
employerOverview?: SCOrganizationWithoutReferences;
/**
* A JobPosting
*/
type: SCThingType.JobPosting;
}
export class SCJobPostingMeta extends SCThingMeta {
fieldTranslations = {
de: {
...new SCThingMeta().fieldTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldTranslations.de,
employerOverview: 'Arbeitgeberübersicht',
},
en: {
...new SCThingMeta().fieldTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldTranslations.en,
employerOverview: 'employer overview',
},
};
fieldValueTranslations = {
de: {
...new SCThingMeta().fieldValueTranslations.de,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldValueTranslations.de,
type: 'Job Angebot',
categories: {
law: 'Recht',
business: 'Business',
natural: 'Ökologisch',
it: 'IT',
education: 'Bildung',
other: 'Andere',
arts: 'Künste',
social: 'Sozial',
engineering: 'Ingenieurswesen',
communication: 'Kommunikation',
medical: 'Medizin',
},
},
en: {
...new SCThingMeta().fieldValueTranslations.en,
...new SCThingWithCategoriesWithoutReferencesMeta().fieldValueTranslations.en,
type: SCThingType.JobPosting,
categories: {
law: 'law',
business: 'business',
natural: 'natural',
it: 'it',
education: 'education',
other: 'other',
arts: 'arts',
social: 'social',
engineering: 'engineering',
communication: 'communication',
medical: 'medical',
},
},
};
}

File diff suppressed because one or more lines are too long