Feature/filter and sort board (#725)

* Get pipeline progress from stage IDs

* Rename hooks file

* Addd first amount filter

* Add remaining filters

* Design fixes

* Add filtering on creation date or amount

* Fix card updates and creations with the new state management

* Keep ordering when dropping a card

* Add remainint sorts

* Make board header more generic

* Move available filters and sorts to board options

* Fix decorators for test

* Add pipeline stage ids to mock data

* Adapt mock data

* Linter
This commit is contained in:
Emilien Chauvet
2023-07-17 19:32:47 -07:00
committed by GitHub
parent 9895c1d5d6
commit 6301bc2fbf
19 changed files with 784 additions and 413 deletions

View File

@ -1,8 +1,17 @@
import { PipelineProgress, User } from '../../generated/graphql';
import {
PipelineProgress,
PipelineProgressableType,
User,
} from '../../generated/graphql';
type MockedPipelineProgress = Pick<
PipelineProgress,
'id' | 'amount' | 'closeDate' | 'progressableId'
| 'id'
| 'amount'
| 'closeDate'
| 'progressableId'
| 'pipelineStageId'
| 'progressableType'
> & {
accountOwner: Pick<
User,
@ -31,13 +40,17 @@ export const mockedPipelineProgressData: Array<MockedPipelineProgress> = [
closeDate: '2021-10-01T00:00:00.000Z',
progressableId: '0',
accountOwner: accountOwner,
pipelineStageId: 'another-pipeline-stage-1',
progressableType: PipelineProgressableType.Company,
},
{
id: 'fe256b39-3ec3-4fe7-8998-b76aa0bfb600',
progressableId: '89bb825c-171e-4bcc-9cf7-43448d6fb278',
pipelineStageId: 'fe256b39-3ec3-4fe3-8998-b76aa0bfb600',
amount: 7,
closeDate: '2021-10-01T00:00:00.000Z',
accountOwner,
progressableType: PipelineProgressableType.Company,
},
{
id: '4a886c90-f4f2-4984-8222-882ebbb905d6',
@ -45,5 +58,7 @@ export const mockedPipelineProgressData: Array<MockedPipelineProgress> = [
amount: 100,
closeDate: '2021-10-01T00:00:00.000Z',
accountOwner,
pipelineStageId: 'fe256b39-3ec3-4fe3-8998-b76aa0bfb600',
progressableType: PipelineProgressableType.Company,
},
];