mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
EQMS-1437: use different label to display trainees' results "owner". (#8046)
* EQMS-1437: use different column to display trainees' results "owner". Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com> * ff Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com> --------- Signed-off-by: Victor Ilyushchenko <alt13ri@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import activity from '@hcengineering/activity'
|
||||
import notification, { type NotificationType } from '@hcengineering/notification'
|
||||
import { type Asset, type IntlString } from '@hcengineering/platform'
|
||||
import type { BuildModelKey, Viewlet, ViewletDescriptor } from '@hcengineering/view'
|
||||
import type { BuildModelKey, KeyFilterPreset, Viewlet, ViewletDescriptor } from '@hcengineering/view'
|
||||
import questions from '@hcengineering/model-questions'
|
||||
import contact from '@hcengineering/contact'
|
||||
import tracker from '@hcengineering/model-tracker'
|
||||
@@ -659,9 +659,19 @@ function defineTrainingAttempt (builder: Builder): void {
|
||||
sortingKey: 'state',
|
||||
displayProps: { align: 'center' }
|
||||
}
|
||||
const columnOwner: BuildModelKey = {
|
||||
...columns.owner,
|
||||
key: 'owner'
|
||||
const columnTrainee: BuildModelKey = {
|
||||
key: 'owner',
|
||||
label: training.string.TrainingRequestTrainee,
|
||||
presenter: contacts.component.EmployeePresenter,
|
||||
props: { shouldShowName: true },
|
||||
displayProps: { align: 'center' }
|
||||
}
|
||||
|
||||
const columnTraineeFilter: KeyFilterPreset = {
|
||||
_class: training.class.TrainingAttempt,
|
||||
component: contacts.component.EmployeeFilter,
|
||||
key: 'owner',
|
||||
label: training.string.TrainingRequestTrainee
|
||||
}
|
||||
|
||||
defineTableBrowserViewletDescriptor(
|
||||
@@ -693,7 +703,7 @@ function defineTrainingAttempt (builder: Builder): void {
|
||||
columnScore,
|
||||
'createdOn',
|
||||
'submittedOn',
|
||||
columnOwner
|
||||
columnTrainee
|
||||
],
|
||||
configOptions: {
|
||||
strict: true,
|
||||
@@ -720,7 +730,7 @@ function defineTrainingAttempt (builder: Builder): void {
|
||||
})
|
||||
|
||||
builder.mixin(training.class.TrainingAttempt, core.class.Class, view.mixin.ClassFilters, {
|
||||
filters: ['state', 'owner', 'submittedOn'] as Array<keyof TrainingAttempt>,
|
||||
filters: ['state', 'submittedOn', columnTraineeFilter] as Array<keyof TrainingAttempt>,
|
||||
strict: true
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user