-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into crowd-linux
- Loading branch information
Showing
17 changed files
with
592 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
frontend/src/modules/organization/config/filters/annualEmployeeChurnRate/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { | ||
NumberFilterConfig, | ||
NumberFilterOptions, | ||
NumberFilterValue, | ||
} from '@/shared/modules/filters/types/filterTypes/NumberFilterConfig'; | ||
import { FilterConfigType } from '@/shared/modules/filters/types/FilterConfig'; | ||
import { itemLabelRendererByType } from '@/shared/modules/filters/config/itemLabelRendererByType'; | ||
import { apiFilterRendererByType } from '@/shared/modules/filters/config/apiFilterRendererByType'; | ||
import { | ||
decimal, required, | ||
} from '@vuelidate/validators'; | ||
|
||
const valueParser = (value) => value / 100; | ||
|
||
const annualEmployeeChurnRate: NumberFilterConfig = { | ||
id: 'annualEmployeeChurnRate', | ||
label: 'Annual Employee Churn Rate', | ||
iconClass: 'ri-arrow-down-circle-line', | ||
type: FilterConfigType.NUMBER, | ||
options: { | ||
suffix: '%', | ||
validators: { | ||
required, | ||
decimal, | ||
}, | ||
}, | ||
itemLabelRenderer(value: NumberFilterValue, options: NumberFilterOptions): string { | ||
return itemLabelRendererByType[FilterConfigType.NUMBER]('Annual Employee Churn Rate', value, options); | ||
}, | ||
apiFilterRenderer(value: NumberFilterValue): any[] { | ||
return apiFilterRendererByType[FilterConfigType.NUMBER]('employeeChurnRate12Month', value, valueParser); | ||
}, | ||
}; | ||
|
||
export default annualEmployeeChurnRate; |
35 changes: 35 additions & 0 deletions
35
frontend/src/modules/organization/config/filters/annualEmployeeGrowthRate/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { | ||
NumberFilterConfig, | ||
NumberFilterOptions, | ||
NumberFilterValue, | ||
} from '@/shared/modules/filters/types/filterTypes/NumberFilterConfig'; | ||
import { FilterConfigType } from '@/shared/modules/filters/types/FilterConfig'; | ||
import { itemLabelRendererByType } from '@/shared/modules/filters/config/itemLabelRendererByType'; | ||
import { apiFilterRendererByType } from '@/shared/modules/filters/config/apiFilterRendererByType'; | ||
import { | ||
decimal, required, | ||
} from '@vuelidate/validators'; | ||
|
||
const valueParser = (value) => value / 100; | ||
|
||
const annualEmployeeGrowthRate: NumberFilterConfig = { | ||
id: 'annualEmployeeGrowthRate', | ||
label: 'Annual Employee Growth Rate', | ||
iconClass: 'ri-arrow-up-circle-line', | ||
type: FilterConfigType.NUMBER, | ||
options: { | ||
suffix: '%', | ||
validators: { | ||
required, | ||
decimal, | ||
}, | ||
}, | ||
itemLabelRenderer(value: NumberFilterValue, options: NumberFilterOptions): string { | ||
return itemLabelRendererByType[FilterConfigType.NUMBER]('Annual Employee Growth Rate', value, options); | ||
}, | ||
apiFilterRenderer(value: NumberFilterValue): any[] { | ||
return apiFilterRendererByType[FilterConfigType.NUMBER]('employeeGrowthRate12Month', value, valueParser); | ||
}, | ||
}; | ||
|
||
export default annualEmployeeGrowthRate; |
Oops, something went wrong.