File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
20
20
WhereCondition ,
21
21
OrderBy ,
22
22
CreatedCompanies ,
23
+ InputCompanyParams ,
23
24
} from '../../types' ;
24
25
25
26
export class Companies {
@@ -72,10 +73,10 @@ export class Companies {
72
73
return response . data . createCompany as CompanyInterface ;
73
74
}
74
75
75
- public async updateCompany (
76
- id : string ,
77
- input : CompanyInput
78
- ) : Promise < CompanyInterface > {
76
+ public async updateCompany ( {
77
+ id,
78
+ input,
79
+ } : InputCompanyParams ) : Promise < CompanyInterface > {
79
80
const response = await this . client . mutate ( {
80
81
mutation : UPDATE_COMPANY_MUTATION ,
81
82
variables : { id : id , input : input } ,
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ export const CREATE_COMPANY_MUTATION = gql`
46
46
` ;
47
47
48
48
export const UPDATE_COMPANY_MUTATION = gql `
49
- mutation updateCompany($id: ID, $input: CompanyInput) {
49
+ mutation updateCompany($id: ID! , $input: CompanyInput) {
50
50
updateCompany(id: $id, input: $input) {
51
51
id
52
52
name
@@ -61,6 +61,17 @@ export const UPDATE_COMPANY_MUTATION = gql`
61
61
country_code
62
62
created_at
63
63
updated_at
64
+ is_active
65
+ total_users
66
+ photo {
67
+ id
68
+ uuid
69
+ name
70
+ url
71
+ type
72
+ size
73
+ field_name
74
+ }
64
75
user {
65
76
id
66
77
firstname
@@ -69,7 +80,6 @@ export const UPDATE_COMPANY_MUTATION = gql`
69
80
}
70
81
groups {
71
82
id
72
- uuid
73
83
name
74
84
}
75
85
branches {
Original file line number Diff line number Diff line change @@ -76,6 +76,11 @@ export interface CompanySettings {
76
76
settings : any ;
77
77
}
78
78
79
+ export interface InputCompanyParams {
80
+ id : number ;
81
+ input : CompanyInput ;
82
+ }
83
+
79
84
export interface CreatedCompanies {
80
85
companies : {
81
86
data : CompanyInterface [ ] ;
You can’t perform that action at this time.
0 commit comments