Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/adapters/postgres/cohortMembers-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export class PostgresCohortMembersService {
whereCase += where.map(processCondition).join(" AND ");
}

let query = `SELECT U."userId", U."username", "firstName", "middleName", "lastName", R."name" AS role, U."mobile",U."deviceId",
let query = `SELECT U."userId", U."enrollmentId", U."username", "firstName", "middleName", "lastName", R."name" AS role, U."mobile",U."deviceId",
CM."status", CM."statusReason",CM."cohortMembershipId",CM."status",CM."createdAt", CM."updatedAt",U."createdBy",U."updatedBy", COUNT(*) OVER() AS total_count FROM public."CohortMembers" CM
INNER JOIN public."Users" U
ON CM."userId" = U."userId"
Expand Down
3 changes: 2 additions & 1 deletion src/adapters/postgres/user-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export class PostgresUserService implements IServicelocator {
}

//Get user core fields data
const query = `SELECT U."userId", U."username",U."email", U."firstName",UTM."tenantId", U."middleName", U."lastName", U."gender", U."dob", R."name" AS role, U."mobile", U."createdBy",U."updatedBy", U."createdAt", U."updatedAt", U."status", COUNT(*) OVER() AS total_count
const query = `SELECT U."userId",U."enrollmentId", U."username",U."email", U."firstName",UTM."tenantId", U."middleName", U."lastName", U."gender", U."dob", R."name" AS role, U."mobile", U."createdBy",U."updatedBy", U."createdAt", U."updatedAt", U."status", COUNT(*) OVER() AS total_count
FROM public."Users" U
LEFT JOIN public."CohortMembers" CM
ON CM."userId" = U."userId"
Expand Down Expand Up @@ -746,6 +746,7 @@ export class PostgresUserService implements IServicelocator {
where: whereClause,
select: [
"userId",
"enrollmentId",
"username",
"firstName",
"middleName",
Expand Down
2 changes: 2 additions & 0 deletions src/forms/forms.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import { APIID } from '@utils/api-id.config';
import { isUUID } from 'class-validator';
import { API_RESPONSES } from '@utils/response.messages';
import { GetUserId } from "src/common/decorators/getUserId.decorator";
import { Request, Response } from "express";


@Controller("form")
@ApiTags("Forms")
Expand Down
3 changes: 3 additions & 0 deletions src/user/entities/user-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ export class User {
@Column({ type: 'enum', enum: ['male', 'female', 'transgender'], nullable: false })
gender: string;

@Column({ type: 'varchar', length: 50, nullable: false })
enrollmentId: string;

@Column({ type: "date", nullable: true })
dob: Date;

Expand Down