mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-02-09 02:12:42 +00:00
fix: disable function scoping lint rule fix: outdated contributing docs for adding SCThings
39 lines
1.4 KiB
TypeScript
39 lines
1.4 KiB
TypeScript
/*
|
|
* Copyright (C) 2023 StApps
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* 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 {ChangeDetectionStrategy, Component, inject} from '@angular/core';
|
|
import {SCSearchResult, SCThingType} from '@openstapps/core';
|
|
import {DataProvider} from 'src/app/modules/data/data.provider';
|
|
import {fadeAnimation} from '../../fade.animation';
|
|
|
|
/**
|
|
* Shows a section with meals of the chosen mensa
|
|
*/
|
|
@Component({
|
|
selector: 'stapps-job-section',
|
|
templateUrl: 'job-section.component.html',
|
|
styleUrls: ['job-section.component.scss'],
|
|
animations: [fadeAnimation],
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
})
|
|
export class JobSectionComponent {
|
|
jobs = inject(DataProvider)
|
|
.search({
|
|
filter: {type: 'value', arguments: {field: 'type', value: SCThingType.JobPosting}},
|
|
size: 5,
|
|
from: 0,
|
|
})
|
|
.then((result: SCSearchResult) => result.data);
|
|
}
|