Skip to content

Commit

Permalink
Bug #225913 [BE] : Camp | Camp ID API | Prerak Status is missing and …
Browse files Browse the repository at this point in the history
…Bug #225914 [BE] : Learner Details | Unable to save disability details (#1466)

* ENUM CHANGES

* board api

* subject API for pc

* validation added

* added status and disability

* added status and disability
  • Loading branch information
Tusharmahajan12 authored Aug 28, 2024
1 parent 84070a0 commit 942c984
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 27 deletions.
70 changes: 43 additions & 27 deletions src/src/beneficiaries/beneficiaries.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4403,34 +4403,50 @@ export class BeneficiariesService {
user_id = result?.[0]?.id;

if (!user_id) {
let res = await this.hasuraService.q(
'extended_users',
{
...body,
user_id: id,
},
[
'user_id',
'social_category',
'marital_status',
'qualification_id',
'designation',
'created_by',
'updated_by',
'has_disability',
'type_of_disability',
'has_disability_certificate',
'disability_percentage',
'disability_occurence',
'has_govt_advantage',
'govt_advantages',
'support_for_exam',
],
false,
['id', 'user_id'],
);
let variable = [];
if (body?.type_of_disability) {
variable.push({
key: 'type_of_disability',
type: 'jsonb',
});
}
if (body?.support_for_exam) {
variable.push({
key: 'support_for_exam',
type: 'jsonb',
});
}

let result =
await this.hasuraServiceFromServices.createWithVariable(
'extended_users',
{
...body,
user_id: id,
},
[
'id',
'user_id',
'social_category',
'marital_status',
'qualification_id',
'designation',
'created_by',
'updated_by',
'has_disability',
'type_of_disability',
'has_disability_certificate',
'disability_percentage',
'disability_occurence',
'has_govt_advantage',
'govt_advantages',
'support_for_exam',
],
[],
variable,
);

user_id = res?.extended_users?.id;
user_id = result?.extended_users?.id;
}

// get state name via program_id
Expand Down
3 changes: 3 additions & 0 deletions src/src/program-coordinator/program-coordinator.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,9 @@ export class ProgramCoordinatorService {
document_sub_type
path
}
program_faciltators(where:{academic_year_id:{_eq:${academic_year_id}}, program_id: {_eq: ${program_id}}}){
status
}
}
}
properties{
Expand Down

0 comments on commit 942c984

Please sign in to comment.