Display RecordBoardCards on new board (#3657)

* Before remove saveEditModeValue logic

* Fixes

* Fix tests

* Fix tests
This commit is contained in:
Charles Bochet
2024-01-27 15:55:45 +01:00
committed by GitHub
parent 9053769616
commit d6f117c688
64 changed files with 479 additions and 192 deletions

View File

@ -12,6 +12,12 @@ const getRandomProbability = () => {
const getRandomPipelineStepId = (pipelineStepIds: { id: string }[]) =>
pipelineStepIds[Math.floor(Math.random() * pipelineStepIds.length)].id;
const getRandomStage = () => {
const stages = ['new', 'screening', 'meeting', 'proposal', 'customer'];
return stages[Math.floor(Math.random() * stages.length)];
};
const generateRandomAmountMicros = () => {
const firstDigit = Math.floor(Math.random() * 9) + 1;
@ -31,6 +37,7 @@ const generateOpportunities = (
amountAmountMicros: generateRandomAmountMicros(),
amountCurrencyCode: 'USD',
closeDate: new Date(),
stage: getRandomStage(),
probability: getRandomProbability(),
pipelineStepId: getRandomPipelineStepId(pipelineStepIds),
pointOfContactId: company.personId,
@ -65,6 +72,7 @@ export const seedDemoOpportunity = async (
'amountAmountMicros',
'amountCurrencyCode',
'closeDate',
'stage',
'probability',
'pipelineStepId',
'pointOfContactId',