Commit 8a0f2a39 by Nattana Chaiyamat

ทะเบียนหลักสูตร

parent cec1bf1a
......@@ -62,7 +62,8 @@
<td>{{item.data.employee.lname}}</td>
<td class="text-center">{{item.data.status=='0'?'ไม่ใช้งาน':'ใช้งาน'}}</td>
<td class="flex justify-center">
<i class="ti ti-edit cursor-pointer i-gray fs-l px-1" (click)="selectUser(item.data)"
<i class="ti ti-edit cursor-pointer i-gray fs-l px-1"
(click)="changePassword=false;selectUser(item.data)"
data-hs-overlay="#manage-user-modal"></i>
</td>
</tr>
......
......@@ -10,15 +10,15 @@
<nav class="-mb-0.5 flex space-x-6 rtl:space-x-reverse">
<a class="text-base font-medium hs-tab-active:border-secondary hs-tab-active:text-secondary pb-3 inline-flex items-center gap-2 border-b-[3px] border-transparent whitespace-nowrap text-gray-500 dark:text-white/70 hover:text-secondary active"
href="javascript:void(0);" id="underline-item-1" data-hs-tab="#underline-1"
aria-controls="underline-1" (click)="pathTitle = ['การประเมินสมรรถนะ','ทะเบียนหลักสูตร','หลักสูตรการพัฒนา']">
aria-controls="underline-1"
(click)="pathTitle = ['การประเมินสมรรถนะ','ทะเบียนหลักสูตร','หลักสูตรการพัฒนา']">
หลักสูตรการพัฒนา
</a>
</nav>
</div>
<div class="mt-3 px-3rem !-mt-3 pt-50px">
<div class="mt-3 px-2rem !-mt-3 pt-50px">
<div id="underline-1" role="tabpanel" aria-labelledby="underline-item-1">
<app-development-course [pathTitle]="pathTitle"
(sendPathTitle)="pathTitle=$event"></app-development-course>
<app-development-course></app-development-course>
</div>
</div>
</div>
......
......@@ -5,6 +5,7 @@ export interface CompetencyCourseModel {
tdesc: string
courseDetail: string
courseTopic: string
courseLinkMylearn: string
}
export class MyCompetencyCourseModel implements CompetencyCourseModel {
competencyCourseId: string
......@@ -13,13 +14,15 @@ export class MyCompetencyCourseModel implements CompetencyCourseModel {
tdesc: string
courseDetail: string
courseTopic: string
constructor(data: Partial<CompetencyCourseModel>) {
this.competencyCourseId = data.competencyCourseId || ""
this.tdesc = data.tdesc || ""
this.edesc = data.edesc || ""
this.companyId = data.companyId || ""
this.courseDetail = data.courseDetail || ""
this.courseTopic = data.courseTopic || ""
courseLinkMylearn: string
constructor(data?: Partial<CompetencyCourseModel>) {
this.competencyCourseId = data?.competencyCourseId || ""
this.tdesc = data?.tdesc || ""
this.edesc = data?.edesc || ""
this.companyId = data?.companyId || ""
this.courseDetail = data?.courseDetail || ""
this.courseTopic = data?.courseTopic || ""
this.courseLinkMylearn = data?.courseLinkMylearn || ""
}
}
......@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';
import { CompetencycourseModel } from '../model/competencycourse.model';
import { AlertModel } from '../model/alert.model';
@Injectable({
providedIn: 'root'
})
......@@ -17,16 +18,16 @@ export class CompetencycourseService {
getList(): Observable<CompetencycourseModel[]> {
return this.http.get<CompetencycourseModel[]>(this.urlApi + "/lists")
}
post(body: CompetencycourseModel) {
return this.http.post(this.urlApi, body)
post(body: CompetencycourseModel): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body)
}
delete(body: CompetencycourseModel) {
delete(body: CompetencycourseModel): Observable<AlertModel> {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: body
};
return this.http.delete(this.urlApi, options)
return this.http.delete<AlertModel>(this.urlApi, options)
}
}
\ No newline at end of file
Markdown is supported
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