Skip to content
Snippets Groups Projects
Commit 0ad6f328 authored by Chiquita Ahsanunnisa's avatar Chiquita Ahsanunnisa
Browse files

Merge branch 'story/dosbim-profile' into 'development'

story/dosbim profile

See merge request !54
parents 428445ef 01f176f0
Branches
Tags
2 merge requests!58final release,!54story/dosbim profile
......@@ -14,4 +14,5 @@ export class GetDosbimResDto extends PickType(Pengguna, [
"id",
"email",
"nama",
"keahlian",
] as const) {}
......@@ -16,6 +16,7 @@ export class DosenBimbinganService {
id: true,
nama: true,
email: true,
keahlian: true,
},
where: {
roles: ArrayContains([RoleEnum.S2_PEMBIMBING]),
......
import { IsString } from "@nestjs/class-validator";
import {
ApiHideProperty,
ApiProperty,
......@@ -6,6 +5,7 @@ import {
} from "@nestjs/swagger";
import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { PendaftaranTesis } from "./pendaftaranTesis.entity";
import { DosenBimbingan } from "./dosenBimbingan.entity";
export enum RoleEnum {
ADMIN = "ADMIN",
......@@ -51,9 +51,28 @@ export class Pengguna {
roles: RoleEnum[];
@ApiPropertyOptional()
@IsString()
@Column({ type: "text", nullable: true })
kontak: string;
kontakWhatsApp: string;
@ApiPropertyOptional()
@Column({ type: "text", nullable: true })
kontakMsTeams: string;
@ApiPropertyOptional()
@Column({ type: "text", nullable: true })
kontakEmail: string;
@ApiPropertyOptional()
@Column({ type: "text", nullable: true })
kontakTelp: string;
@ApiPropertyOptional()
@Column({ type: "text", nullable: true })
kontakLainnya: string;
@ApiPropertyOptional()
@Column({ type: "text", nullable: true })
keahlian: string;
@ApiHideProperty()
@Column({ type: "boolean", default: true })
......@@ -61,4 +80,7 @@ export class Pengguna {
@OneToMany(() => PendaftaranTesis, (pendaftaran) => pendaftaran.mahasiswa)
pendaftaranTesis: PendaftaranTesis[];
@OneToMany(() => DosenBimbingan, (dosen) => dosen.dosen)
dosenBimbingan: DosenBimbingan[];
}
......@@ -171,7 +171,11 @@ export class UpdatePembimbingBodyDto {
class DosenPembimbingDto extends PickType(Pengguna, [
"id",
"nama",
"kontak",
"kontakWhatsApp",
"kontakMsTeams",
"kontakEmail",
"kontakTelp",
"kontakLainnya",
] as const) {}
export class GetByIdRespDto extends PickType(PendaftaranTesis, [
......
......@@ -136,20 +136,30 @@ export class RegistrasiTesisService {
const baseQuery = this.pendaftaranTesisRepository
.createQueryBuilder("pt")
.select("pt.id")
.addSelect("pt.jadwalInterview")
.addSelect("pt.status")
.addSelect("pt.jalurPilihan")
.addSelect("pt.waktuPengiriman")
.addSelect("topik.judul")
.addSelect("topik.deskripsi")
.addSelect("penerima.id")
.addSelect("penerima.nama")
.addSelect("penerima.kontak")
.addSelect("dosenBimbingan")
.addSelect("dosen.id")
.addSelect("dosen.nama")
.addSelect("dosen.kontak")
.select([
"pt.id",
"pt.jadwalInterview",
"pt.status",
"pt.jalurPilihan",
"pt.waktuPengiriman",
"topik.judul",
"topik.deskripsi",
"penerima.id",
"penerima.nama",
"penerima.kontakWhatsApp",
"penerima.kontakMsTeams",
"penerima.kontakEmail",
"penerima.kontakTelp",
"penerima.kontakLainnya",
"dosenBimbingan",
"dosen.id",
"dosen.nama",
"dosen.kontakWhatsApp",
"dosen.kontakMsTeams",
"dosen.kontakEmail",
"dosen.kontakTelp",
"dosen.kontakLainnya",
])
.leftJoin("pt.topik", "topik")
.leftJoin("pt.penerima", "penerima")
.leftJoin("pt.dosenBimbingan", "dosenBimbingan")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment