Skip to content

Commit

Permalink
feat(inventory): add is_default parameter to createStatus method
Browse files Browse the repository at this point in the history
  • Loading branch information
jerlyrosa committed Nov 14, 2023
1 parent 7f7d87d commit ffdd8d0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/modules/inventory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ export class Inventory {
return response.data;
}

public async createStatus(name: string): Promise<CreatedStatus> {
public async createStatus(name: string, is_default?:boolean): Promise<CreatedStatus> {
const response = await this.client.mutate({
mutation: CREATE_STATUS,
variables: {
input: {
name: name,
is_default: is_default
},
},
});
Expand Down
1 change: 1 addition & 0 deletions src/mutations/inventory.mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ export const CREATE_STATUS = gql`
createStatus(input: $input) {
id
name
is_default
}
}
`;
Expand Down
1 change: 1 addition & 0 deletions src/queries/inventory.query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const GET_STATUS = gql`
data {
name
id
is_default
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/types/inventory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface ProductWarehouse {
export interface StatusInterface {
id: string;
name: string;
is_default: boolean;
}

export interface OrderBy {
Expand Down
2 changes: 1 addition & 1 deletion src/types/leads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface LeadInput {
export interface WhereCondition {
column: string;
operator: string;
value: number | string;
value: number | string | (number | string)[];
}

export interface LeadsDashboardInput {
Expand Down

0 comments on commit ffdd8d0

Please sign in to comment.