Skip to content

Commit fe5b3f0

Browse files
authored
Force typescript for org enrich config (#1467)
1 parent 1ce4db6 commit fe5b3f0

27 files changed

+187
-95
lines changed
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesArrayRenderer from '@/modules/organization/components/organization-attributes-array-renderer.vue';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const affiliatedProfiles: OrganizationEnrichmentConfig = {
56
name: 'affiliatedProfiles',
67
label: 'Affilliated Profiles',
7-
type: attributesTypes.array,
8+
type: AttributeType.ARRAY,
89
showInForm: true,
910
showInAttributes: true,
1011
component: OrganizationAttributesArrayRenderer,
1112
};
13+
14+
export default affiliatedProfiles;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesArrayRenderer from '@/modules/organization/components/organization-attributes-array-renderer.vue';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const allSubsidiaries: OrganizationEnrichmentConfig = {
56
name: 'allSubsidiaries',
67
label: 'All subsidiaries',
7-
type: attributesTypes.array,
8+
type: AttributeType.ARRAY,
89
showInForm: true,
910
showInAttributes: true,
1011
component: OrganizationAttributesArrayRenderer,
1112
};
13+
14+
export default allSubsidiaries;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesArrayRenderer from '@/modules/organization/components/organization-attributes-array-renderer.vue';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const alternativeDomains: OrganizationEnrichmentConfig = {
56
name: 'alternativeDomains',
67
label: 'Alternative Domains',
7-
type: attributesTypes.array,
8+
type: AttributeType.ARRAY,
89
showInForm: true,
910
showInAttributes: true,
1011
component: OrganizationAttributesArrayRenderer,
1112
isLink: true,
1213
};
14+
15+
export default alternativeDomains;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesArrayRenderer from '@/modules/organization/components/organization-attributes-array-renderer.vue';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const alternativeNames: OrganizationEnrichmentConfig = {
56
name: 'alternativeNames',
67
label: 'Alternative Names',
7-
type: attributesTypes.array,
8+
type: AttributeType.ARRAY,
89
showInForm: true,
910
showInAttributes: true,
1011
component: OrganizationAttributesArrayRenderer,
1112
};
13+
14+
export default alternativeNames;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import { formatFloatToYears } from '@/utils/number';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const averageEmployeeTenure: OrganizationEnrichmentConfig = {
56
name: 'averageEmployeeTenure',
67
label: 'Average Employee Tenure',
7-
type: attributesTypes.number,
8+
type: AttributeType.NUMBER,
89
showInForm: true,
910
showInAttributes: true,
1011
displayValue: (value) => formatFloatToYears(value),
1112
};
13+
14+
export default averageEmployeeTenure;
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesJSONRenderer from '@/modules/organization/components/organization-attributes-json-renderer.vue';
33
import { formatFloatToYears } from '@/utils/number';
44
import { snakeToSentenceCase } from '@/utils/string';
5+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
56

6-
const AverageTenureByLevel = {
7+
const AverageTenureByLevel: Record<string, string> = {
78
vp: 'VP',
89
cxo: 'CXO',
910
};
1011

11-
export default {
12+
const averageTenureByLevel: OrganizationEnrichmentConfig = {
1213
name: 'averageTenureByLevel',
1314
label: 'Average Tenure by Level',
14-
type: attributesTypes.json,
15+
type: AttributeType.JSON,
1516
showInForm: true,
1617
showInAttributes: true,
1718
component: OrganizationAttributesJSONRenderer,
1819
keyParser: (key) => AverageTenureByLevel[key] || snakeToSentenceCase(key),
1920
valueParser: (value) => formatFloatToYears(value),
2021
};
22+
23+
export default averageTenureByLevel;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesJSONRenderer from '@/modules/organization/components/organization-attributes-json-renderer.vue';
33
import { formatFloatToYears } from '@/utils/number';
44
import { snakeToSentenceCase } from '@/utils/string';
5+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
56

6-
export default {
7+
const averageTenureByRole: OrganizationEnrichmentConfig = {
78
name: 'averageTenureByRole',
89
label: 'Average Tenure by Role',
9-
type: attributesTypes.json,
10+
type: AttributeType.JSON,
1011
showInForm: true,
1112
showInAttributes: true,
1213
component: OrganizationAttributesJSONRenderer,
1314
keyParser: (key) => snakeToSentenceCase(key),
1415
valueParser: (value) => formatFloatToYears(value),
1516
};
17+
18+
export default averageTenureByRole;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesArrayRenderer from '@/modules/organization/components/organization-attributes-array-renderer.vue';
3+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
34

4-
export default {
5+
const directSubsidiaries: OrganizationEnrichmentConfig = {
56
name: 'directSubsidiaries',
67
label: 'Direct Subsidiaries',
7-
type: attributesTypes.array,
8+
type: AttributeType.ARRAY,
89
showInForm: true,
910
showInAttributes: true,
1011
component: OrganizationAttributesArrayRenderer,
1112
};
13+
14+
export default directSubsidiaries;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
22
import OrganizationAttributesJSONRenderer from '@/modules/organization/components/organization-attributes-json-renderer.vue';
33
import { formatFloatToPercentage } from '@/utils/number';
44
import { snakeToSentenceCase } from '@/utils/string';
5+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
56

6-
export default {
7+
const employeeChurnRate: OrganizationEnrichmentConfig = {
78
name: 'employeeChurnRate',
89
label: 'Employee Churn Rate',
9-
type: attributesTypes.json,
10+
type: AttributeType.JSON,
1011
showInForm: true,
1112
showInAttributes: true,
1213
component: OrganizationAttributesJSONRenderer,
1314
valueParser: formatFloatToPercentage,
1415
keyParser: (key) => `${snakeToSentenceCase(key)}s`,
1516
filterValue: (value) => ({ '12_month': value['12_month'] }),
1617
};
18+
19+
export default employeeChurnRate;
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
import { attributesTypes } from '@/modules/organization/types/Attributes';
1+
import { AttributeType } from '@/modules/organization/types/Attributes';
2+
import { OrganizationEnrichmentConfig } from '@/modules/organization/config/enrichment/index';
23

3-
export default {
4+
const employeeCount: OrganizationEnrichmentConfig = {
45
name: 'employeeCount',
56
label: 'Employee Count',
6-
type: attributesTypes.number,
7+
type: AttributeType.NUMBER,
78
showInForm: true,
89
showInAttributes: true,
910
displayValue: (value) => value,
1011
};
12+
13+
export default employeeCount;

0 commit comments

Comments
 (0)