-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Fix APP history permit type badge (#273)
* Query permitType field for all application types * Fix TS build error
- Loading branch information
1 parent
9803159
commit 1c51696
Showing
2 changed files
with
5 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,19 @@ | ||
import { | ||
Application, | ||
ApplicationProcessing, | ||
Invoice, | ||
NewApplication, | ||
Permit, | ||
PermitType, | ||
} from '@lib/graphql/types'; | ||
import { Application, ApplicationProcessing, Invoice, Permit } from '@lib/graphql/types'; | ||
|
||
/** APP history entry record (API response) */ | ||
export type AppHistoryRecord = Pick<Permit, 'rcdPermitId' | 'expiryDate'> & { | ||
application: Pick<Application, 'id'> & { | ||
application: Pick<Application, 'id' | 'type' | 'permitType'> & { | ||
processing: Pick<ApplicationProcessing, 'documentsUrl' | 'documentsS3ObjectKey'> & { | ||
invoice: Pick<Invoice, 's3ObjectUrl' | 's3ObjectKey'>; | ||
}; | ||
} & ( | ||
| ({ type: 'NEW' } & Pick<NewApplication, 'permitType'>) | ||
| { type: 'RENEWAL' | 'REPLACEMENT'; permitType: undefined } | ||
); | ||
}; | ||
}; | ||
|
||
/** APP history entry row in APP history card (FE) */ | ||
export type PermitRecord = Pick<Permit, 'rcdPermitId' | 'expiryDate'> & { | ||
application: Pick<Application, 'id' | 'type'> & { | ||
application: Pick<Application, 'id' | 'type' | 'permitType'> & { | ||
processing: Pick<ApplicationProcessing, 'documentsUrl' | 'documentsS3ObjectKey'> & { | ||
invoice: Pick<Invoice, 's3ObjectUrl' | 's3ObjectKey'>; | ||
}; | ||
permitType: PermitType | undefined; | ||
}; | ||
}; |
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