Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { type Rule } from '@amalia/core/models';
import { RuleType } from '@amalia/payout-definition/plans/types';
import { filters } from './filters';
import { variables } from './variables';
export const rules = {
recordRule: {
id: '27ca387a-d1ba-49e7-b12b-377275bf48a5',
machineName: 'recordRule',
name: 'Record rule',
filterId: filters.allOpportunities.id,
formula: 'opportunity.fixedCommission',
description: null,
type: RuleType.PAYOUT,
commissionVariableId: null,
planId: null,
splitVariables: null,
releaseConditionVariableId: null,
createdAt: new Date(),
updatedAt: new Date(),
configuration: null,
},
amaliaRule: {
id: '4ea3c42b-35eb-4e2b-911b-2dae9c28628f',
machineName: 'amaliaRule',
name: 'Amalia Rule',
filterId: filters.userOpportunities.id,
formula: 'opportunity.amount * 0.05 + opportunity.opportunityRule',
description: null,
type: RuleType.PAYOUT,
commissionVariableId: null,
planId: null,
splitVariables: null,
releaseConditionVariableId: null,
createdAt: new Date(),
updatedAt: new Date(),
configuration: null,
},
amaliaRule2: {
id: '4ea3c42b-35eb-4e2b-911b-2dae9c28628d',
machineName: 'amaliaRule2',
name: 'Amalia Rule 2',
formula: 'opportunity.amount * 0.05',
filterId: null,
description: null,
type: RuleType.PAYOUT,
commissionVariableId: null,
planId: null,
splitVariables: null,
releaseConditionVariableId: null,
createdAt: new Date(),
updatedAt: new Date(),
configuration: null,
},
totalVariableCommission: {
id: 'f9628b69-1291-4a28-994f-4c5f933cfaf3',
machineName: 'totalVariableCommission',
name: 'Total Variable Commission',
formula: '',
commissionVariableId: variables.opportunitySum.id,
filterId: null,
description: null,
type: RuleType.PAYOUT,
planId: null,
splitVariables: null,
releaseConditionVariableId: null,
createdAt: new Date(),
updatedAt: new Date(),
configuration: null,
},
fakeChallenge: {
id: '8808ddba-5005-499d-824a-c55ac1eb6538',
machineName: 'fakeChallenge',
name: 'Fake Challenge',
formula: '',
commissionVariableId: variables.opportunitySum.id,
type: RuleType.CHALLENGE,
configuration: {},
filterId: null,
description: null,
planId: null,
splitVariables: null,
releaseConditionVariableId: null,
createdAt: new Date(),
updatedAt: new Date(),
},
} as const satisfies Record<string, Rule>;
|