Skip to content

Commit

Permalink
feat(solidarity): makes hasDisability and requiresLibras default null…
Browse files Browse the repository at this point in the history
… values on getSupportRequest
  • Loading branch information
Viviane Dias committed Dec 7, 2023
1 parent bd58120 commit bf9209e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ describe("createSupportRequests", () => {
{
acceptsOnlineSupport: true,
city: "São Paulo",
hasDisability: false,
hasDisability: null,
lat: 12,
lng: 13,
msrId: 1,
priority: null,
requiresLibras: false,
requiresLibras: null,
state: "SP",
supportExpertise: null,
supportType: "psychological",
Expand Down
10 changes: 6 additions & 4 deletions packages/listener-solidarity/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,12 @@ export type SupportRequestPayload = {
msrId: number;
zendeskTicketId: number;
supportType: string;
supportExpertise: string | null;
priority: number | null;
hasDisability: boolean;
requiresLibras: boolean;
// these null values are always `null` here, bc of the MSR bonde form that doesnt include these questions
supportExpertise: null;
priority: null;
hasDisability: null;
requiresLibras: null;
//
acceptsOnlineSupport: boolean;
lat: number | null;
lng: number | null;
Expand Down
4 changes: 2 additions & 2 deletions packages/listener-solidarity/src/utils/getSupportRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default function getSupportRequests(
supportType: getSupportType(ticket.subject),
priority: null,
supportExpertise: null,
hasDisability: false,
requiresLibras: false,
hasDisability: null,
requiresLibras: null,
acceptsOnlineSupport: true,
lat: isValidNumber(user.user_fields.latitude)
? Number(user.user_fields.latitude)
Expand Down

0 comments on commit bf9209e

Please sign in to comment.