diff --git a/models/recruit/src/index.ts b/models/recruit/src/index.ts index 4b69794a39b..74eaab2290d 100644 --- a/models/recruit/src/index.ts +++ b/models/recruit/src/index.ts @@ -676,6 +676,7 @@ export function createModel (builder: Builder): void { } return model } + builder.createDoc( view.class.Viewlet, core.space.Model, @@ -754,6 +755,60 @@ export function createModel (builder: Builder): void { recruit.viewlet.ListApplicant ) + builder.createDoc( + view.class.Viewlet, + core.space.Model, + { + attachTo: recruit.class.Vacancy, + descriptor: view.viewlet.List, + config: [ + { key: '', displayProps: { fixed: 'left', key: 'app' } }, + 'description', + { + key: '@applications', + label: recruit.string.Applications + }, + { key: '', displayProps: { grow: true } }, + { + key: '$lookup.company', + displayProps: { key: '$lookup.company', fixed: 'right' } + }, + { + key: 'location', + displayProps: { key: 'location', fixed: 'right' } + } + ], + configOptions: { + hiddenKeys: ['name', 'space', 'modifiedOn'], + sortable: true + }, + baseQuery: { + doneState: null, + '$lookup.space.archived': false + }, + viewOptions: { + groupBy: ['company', 'location', 'dueTo', 'createdBy'], + orderBy: [ + ['company', SortingOrder.Ascending], + ['dueTo', SortingOrder.Ascending], + ['modifiedOn', SortingOrder.Descending], + ['createdOn', SortingOrder.Descending] + ], + other: [ + { + key: 'shouldShowAll', + type: 'toggle', + defaultValue: false, + actionTarget: 'category', + action: view.function.ShowEmptyGroups, + label: view.string.ShowEmptyGroups + } + ] + } + }, + recruit.viewlet.ListVacancy + ) + builder.createDoc( view.class.Viewlet, core.space.Model, diff --git a/models/recruit/src/plugin.ts b/models/recruit/src/plugin.ts index d7cc616f455..621b36fa47b 100644 --- a/models/recruit/src/plugin.ts +++ b/models/recruit/src/plugin.ts @@ -115,6 +115,7 @@ export default mergeIds(recruitId, recruit, { viewlet: { TableCandidate: '' as Ref, TableVacancy: '' as Ref, + ListVacancy: '' as Ref, ApplicantTable: '' as Ref, ApplicantKanban: '' as Ref, ListApplicant: '' as Ref, diff --git a/plugins/recruit-resources/src/components/Vacancies.svelte b/plugins/recruit-resources/src/components/Vacancies.svelte index 0f34c09e709..98d455b2344 100644 --- a/plugins/recruit-resources/src/components/Vacancies.svelte +++ b/plugins/recruit-resources/src/components/Vacancies.svelte @@ -13,18 +13,12 @@ // limitations under the License. -->