Commit 38ede92a by Mon

เเก้ชน +…

เเก้ชน + การจัดการบริษัท,การจัดการคอร์ส,การจัดการผู้ใช้งาน,การจัดการสิทธิ์,การอนุญาติสิทธิ์ผู้ใช้งาน,โอนย้ายคอร์ส
parent 1b388751
......@@ -9,7 +9,7 @@ import { JobSpecialModel } from "./job-special.model";
import { JobTypeModel } from "./job-type.model";
import { SubDistrictModel } from "./subdistrict.model";
import { PositionModel } from "./position.model";
import { environment } from "src/environments/environment";
import { environment } from "../../../environments/environment";
export interface ExamsList {
examId: string
......
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface AnswerModel {
answerId: string;
correct: number;
engName: string;
thName: string;
getName(): string;
}
export class MyAnswerModel extends BaseModel implements AnswerModel {
answerId: string;
correct: number;
engName: string;
thName: string;
constructor(
data?: Partial<AnswerModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.answerId = data?.answerId ?? "";
this.correct = data?.correct ?? 0;
this.engName = data?.engName ?? "";
this.thName = data?.thName ?? "";
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface AnswerMatchModel {
answerId?: string;
engName?: string;
thName?: string;
thAnswerName?: string;
engAnswerName?: string;
getName(): string;
getAnwser(): string;
}
export class MyAnswerMatchModel extends BaseModel implements AnswerMatchModel {
answerId?: string;
engName: string;
thName: string;
thAnswerName: string;
engAnswerName: string;
constructor(
data?: Partial<AnswerMatchModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.answerId = data?.answerId!;
this.thAnswerName = data?.thAnswerName!;
this.engAnswerName = data?.engAnswerName!;
this.engName = data?.engName!;
this.thName = data?.thName!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getAnwser(): string {
return this.translateService.currentLang == "th"
? this.thAnswerName
: this.engAnswerName;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface AnswerpointsModel {
answerId?: string;
correct?: number;
points?: number;
engName: string;
thName: string;
getName(): string;
}
export class MyAnswerpointsModel extends BaseModel implements AnswerpointsModel {
answerId?: string;
correct?: number;
points?: number;
engName: string;
thName: string;
constructor(
data?: Partial<AnswerpointsModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.answerId = data?.answerId!;
this.correct = data?.correct!;
this.points = data?.points!;
this.engName = data?.engName!;
this.thName = data?.thName!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface AnswerSequenceModel {
answerId?: string;
sequence?: number;
engName?: string;
thName?: string;
getName(): string
}
export class MyAnswerSequenceModel extends BaseModel implements AnswerSequenceModel {
answerId?: string;
sequence?: number;
engName: string;
thName: string;
constructor(
data?: Partial<AnswerSequenceModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.answerId = data?.answerId!;
this.sequence = data?.sequence!;
this.engName = data?.engName!;
this.thName = data?.thName!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
import { TranslateService } from '@ngx-translate/core';
export class BaseModel{
translateService: TranslateService;
constructor(data?: Partial<any> ,translateService?: TranslateService){
Object.assign(this , data);
this.translateService = translateService!;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { MyProfileModel, ProfileModel } from "./user.model";
export interface Bu1Model {
bu1Id: Number;
bu1Code: string;
tdesc: string;
edesc: string;
status: number;
companyId: string;
getName(): string
}
export class MyBu1Model extends BaseModel implements Bu1Model {
bu1Id: Number;
bu1Code: string;
tdesc: string;
edesc: string;
status: number;
companyId: string;
constructor(data?: Partial<Bu1Model>, translateService?: TranslateService) {
super(data, translateService);
this.bu1Id = data?.bu1Id!;
this.bu1Code = data?.bu1Code!;
this.tdesc = data?.tdesc!;
this.edesc = data?.edesc!;
this.status = data?.status!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.tdesc
: this.edesc;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface Bu2Model {
bu2Id: Number;
bu2Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
getName(): string
}
export class MyBu2Model extends BaseModel implements Bu2Model {
bu2Id: Number;
bu2Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
constructor(data?: Partial<Bu2Model>, translateService?: TranslateService) {
super(data, translateService);
this.bu2Id = data?.bu2Id!;
this.bu2Code = data?.bu2Code!;
this.tdesc = data?.tdesc!;
this.edesc = data?.edesc!;
this.status = data?.status!;
this.parent = data?.parent!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.tdesc
: this.edesc;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface Bu3Model {
bu3Id: Number;
bu3Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
getName(): string
}
export class MyBu3Model extends BaseModel implements Bu3Model {
bu3Id: Number;
bu3Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
constructor(data?: Partial<Bu3Model>, translateService?: TranslateService) {
super(data, translateService);
this.bu3Id = data?.bu3Id!;
this.bu3Code = data?.bu3Code!;
this.tdesc = data?.tdesc!;
this.edesc = data?.edesc!;
this.status = data?.status!;
this.parent = data?.parent!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.tdesc
: this.edesc;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface Bu4Model {
bu4Id: Number;
bu4Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
getName(): string
}
export class MyBu4Model extends BaseModel implements Bu4Model {
bu4Id: Number;
bu4Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
constructor(data?: Partial<Bu4Model>, translateService?: TranslateService) {
super(data, translateService);
this.bu4Id = data?.bu4Id!;
this.bu4Code = data?.bu4Code!;
this.tdesc = data?.tdesc!;
this.edesc = data?.edesc!;
this.status = data?.status!;
this.parent = data?.parent!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.tdesc
: this.edesc;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface Bu5Model {
bu5Id: Number;
bu5Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
getName(): string
}
export class MyBu5Model extends BaseModel implements Bu5Model {
bu5Id: Number;
bu5Code: string;
tdesc: string;
edesc: string;
status: number;
parent: Number;
companyId: string;
constructor(data?: Partial<Bu5Model>, translateService?: TranslateService) {
super(data, translateService);
this.bu5Id = data?.bu5Id!;
this.bu5Code = data?.bu5Code!;
this.tdesc = data?.tdesc!;
this.edesc = data?.edesc!;
this.status = data?.status!;
this.parent = data?.parent!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.tdesc
: this.edesc;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { environment } from "../../../../environments/environment";
export interface CertificatedDemoModel {
cerId: string;
companyId: string;
thName: string;
engName: string;
format:string;
picture: string;
status: number;
styleFullname: string;
styleCourse: string;
styleEndstudy: string;
styleCername1: string;
styleCerpos1: string;
styleCername2: string;
styleCerpos2: string;
styleHeader1: string;
styleHeader2: string;
styleHeader3: string;
getPictureUrl(): string;
getName(): string;
}
export class MyCertificatedDemoModel extends BaseModel implements CertificatedDemoModel {
cerId: string = "";
companyId: string="";
thName: string = "";
engName: string = "";
format: string = "";
picture: string = "";
status: number;
styleFullname: string="";
styleCourse: string="";
styleEndstudy: string="";
styleCername1: string="";
styleCerpos1: string="";
styleCername2: string="";
styleCerpos2: string="";
styleHeader1: string="";
styleHeader2: string="";
styleHeader3: string="";
constructor(
data?: Partial<CertificatedDemoModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.cerId = data?.cerId!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.format = data?.format!;
this.picture = data?.picture!;
this.status = data?.status!
this.styleFullname = data?.styleFullname!;
this.styleCourse = data?.styleCourse!;
this.styleEndstudy = data?.styleEndstudy!;
this.styleCername1 = data?.styleCername1!;
this.styleCerpos1 = data?.styleCerpos1!;
this.styleCername2 = data?.styleCername2!;
this.styleCerpos2 = data?.styleCerpos2!;
this.styleHeader1 = data?.styleHeader1!;
this.styleHeader2 = data?.styleHeader2!;
this.styleHeader3 = data?.styleHeader3!;
}
getPictureUrl(): string {
if (this.picture) {
return environment.baseUrl + "/files/image/" + this.picture;
} else {
return "";
}
}
getStatus(): string {
return this.translateService.currentLang == "th"
? this.status == 1 ? "เปิดใช้งาน" : "ปิดใช้งาน"
: this.status == 1 ? "Enable" : "Disable"
}
getName(): string {
return this.translateService.currentLang == "th" ? (this.thName ? this.thName : "") : (this.engName ? this.engName : "")
}
}
export interface CourseinsiteModel {
courseId: Number;
courseCode: string;
categoryCode: string;
thName: string;
engName: string;
poster: string;
companyId: string;
companyName: string;
companyType: string;
companyStatus: string;
pictureCompany: string;
}
export interface CompanyListModel {
companyId: string;
companyName: string;
companyType: string;
companyStatus: string;
ownerId: string;
ownerName: string;
pictureCompany: string;
}
export interface CompanyZeemeModel {
companyName: string;
companyType: string;
website: string;
metaData: string;
companyStatus: string;
suggestion: string;
radiusStampAllow: string;
latitude: string;
longitude: string;
pictureCompany: string;
ownerId: string;
ownerName: string;
mainbranchId: string;
mainbranchName: string;
partitionId: string;
companyId: string;
companyCode: string;
qrCode: string;
locationList: [];
}
\ No newline at end of file
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { CourseModel, MyCourseModel } from "./course.model";
export interface DepartmentModel {
departmentId: Number;
departmentCode: string;
thName: string;
engName: string;
training: DepartmentCourseModel[];
companyId: string;
getName(): string
}
export class MyDepartmentModel extends BaseModel implements DepartmentModel {
departmentId: Number;
departmentCode: string;
thName: string;
engName: string;
training: DepartmentCourseModel[];
companyId: string;
constructor(
data?: Partial<DepartmentModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.departmentId = data?.departmentId!;
this.departmentCode = data?.departmentCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.training = data?.training?.map(
(e) => new MyDepartmentCourseModel(e, this.translateService)
)!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface DepartmentCourseModel {
departmentId: Number;
course: CourseModel;
}
export class MyDepartmentCourseModel
extends BaseModel
implements DepartmentCourseModel
{
departmentId: Number;
course: CourseModel;
constructor(
data?: Partial<DepartmentCourseModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.departmentId = data?.departmentId!;
this.course = new MyCourseModel(data?.course, this.translateService);
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { MyProfileModel, ProfileModel } from "./user.model";
import { environment } from "../../../../environments/environment";
export interface DocumentModel {
documentId: Number;
documentCode: string;
companyId:string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
document: string;
owner: ProfileModel;
getPictureUrl(): string;
getDocumentUrl(): string;
getName(): string
getObjective(): string
}
export class MyDocumentModel extends BaseModel implements DocumentModel {
documentId: Number;
documentCode: string;
companyId: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
document: string;
owner: ProfileModel;
constructor(
data?: Partial<DocumentModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.documentId = data?.documentId!;
this.documentCode = data?.documentCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.thObjective = data?.thObjective!;
this.engObjective = data?.engObjective!;
this.image = data?.image!;
this.document = data?.document!;
this.owner = new MyProfileModel(data?.owner , this.translateService);
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getDocumentUrl(): string {
if (this.document) {
return environment.baseUrl + "/files/doc/" + this.document;
} else {
return "";
}
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getObjective(): string {
return this.translateService.currentLang == "th"
? this.thObjective
: this.engObjective;
}
}
import { TranslateService } from "@ngx-translate/core";
import { MyProfileModel, ProfileModel } from "./user.model";
import { BaseModel } from "./base.model";
import { environment } from "../../../../environments/environment";
import { QuestionModel } from "../question.model";
import { MyQuestionModel } from "./question.model";
export interface ExamModel {
examId: Number;
examCode: string;
companyId: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
sampleVideo: string;
examType: number;
examPass: number;
examPercent: number;
examTimes: number;
examDuration: number;
examAnswerType: number;
questionShuffle: number;
answerShuffle: number;
examStep: number;
owner: ProfileModel;
question?: MyQuestionModel[];
durationExam: number;
getPictureUrl(): string;
getName(): string
getObjective(): string
}
export class MyExamModel extends BaseModel implements ExamModel {
examId: Number;
examCode: string;
companyId: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
sampleVideo: string;
examType: number;
examPass: number;
examPercent: number;
examTimes: number;
examDuration: number;
examAnswerType: number;
questionShuffle: number;
answerShuffle: number;
examStep: number;
owner: ProfileModel;
question?: MyQuestionModel[];
durationExam: number;
constructor(data?: Partial<ExamModel>, translateService?: TranslateService) {
super(data, translateService);
this.examId = data?.examId!;
this.examCode = data?.examCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.thObjective = data?.thObjective!;
this.engObjective = data?.engObjective!;
this.image = data?.image!;
this.video = data?.video!;
this.sampleVideo = data?.sampleVideo!;
this.examType = data?.examType!;
this.examPass = data?.examPass!;
this.examPercent = data?.examPercent!;
this.examTimes = data?.examTimes!;
this.examDuration = data?.examDuration!;
this.questionShuffle = data?.questionShuffle!;
this.examAnswerType = data?.examAnswerType!;
this.answerShuffle = data?.answerShuffle!;
this.examStep = data?.examStep!;
this.durationExam = data?.durationExam!;
this.owner = new MyProfileModel(data?.owner,this.translateService);
this.question = data?.question?.map(
(x) => new MyQuestionModel(x, this.translateService)
);
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getObjective (): string {
return this.translateService.currentLang == "th"
? this.thObjective
: this.engObjective;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { CourseModel, MyCourseModel } from "./course.model";
export interface JobModel {
jobId: Number;
jobCode: string;
thName: string;
engName: string;
training: JobCourseModel[];
companyId: string;
getName(): string
}
export class MyJobModel extends BaseModel implements JobModel {
jobId: Number;
jobCode: string;
thName: string;
engName: string;
training: JobCourseModel[];
companyId: string;
constructor(data?: Partial<JobModel>, translateService?: TranslateService) {
super(data, translateService);
this.jobId = data?.jobId!;
this.jobCode = data?.jobCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.training = data?.training?.map((e) => new MyJobCourseModel(e , this.translateService))!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface JobCourseModel {
jobId: Number;
course: CourseModel;
}
export class MyJobCourseModel extends BaseModel implements JobCourseModel {
jobId: Number;
course: CourseModel;
constructor(
data?: Partial<JobCourseModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.jobId = data?.jobId!;
this.course = new MyCourseModel(data?.course, this.translateService);
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { MyProfileModel, ProfileModel } from "./user.model";
import { environment } from "../../../../environments/environment";
export interface LessonModel {
lessonId: Number;
lessonCode: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
requestLearn: number;
owner: ProfileModel;
companyId: string;
requestYoutube: number;
youtubeUrl: string;
durationLearn: number;
fileName: string;
durationOfMs: string;
videoDurationHHmmss: string;
videoDurationTdesc: string;
videoDurationEdesc: string;
isSuccess: boolean;
getPictureUrl(): string;
getName(): string
getObjective(): string
}
export class MyLessonModel extends BaseModel implements LessonModel {
lessonId: Number;
lessonCode: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
requestLearn: number;
owner: ProfileModel;
companyId: string;
requestYoutube: number;
youtubeUrl: string;
durationLearn: number;
isSuccess: boolean;
fileName: string;
durationOfMs: string;
videoDurationHHmmss: string;
videoDurationTdesc: string;
videoDurationEdesc: string;
constructor(
data?: Partial<LessonModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.lessonId = data?.lessonId!;
this.lessonCode = data?.lessonCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.thObjective = data?.thObjective!;
this.engObjective = data?.engObjective!;
this.image = data?.image!;
this.video = data?.video!;
this.requestLearn = data?.requestLearn!;
this.requestYoutube = data?.requestYoutube!;
this.youtubeUrl = data?.youtubeUrl!;
this.owner = new MyProfileModel(data?.owner, this.translateService);
this.companyId = data?.companyId!;
this.durationLearn = data?.durationLearn!;
this.fileName = data?.fileName!;
this.durationOfMs = data?.durationOfMs!;
this.videoDurationHHmmss = data?.videoDurationHHmmss!;
this.videoDurationTdesc = data?.videoDurationTdesc!;
this.videoDurationEdesc = data?.videoDurationEdesc!;
this.isSuccess = data?.isSuccess!;
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getObjective(): string {
return this.translateService.currentLang == "th"
? this.thObjective
: this.engObjective;
}
}
export interface thumnailModel {
thumnailId: Number;
thumnailName: string;
thumnailUrl: string;
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface UserLevelModel {
levelId: Number;
levelCode: string;
thName: string;
engName: string;
companyId: string;
getName(): string
}
export class MyUserLevelModel extends BaseModel implements UserLevelModel {
levelId: Number;
levelCode: string;
thName: string;
engName: string;
companyId: string;
constructor(data?: Partial<UserLevelModel>, translateService?: TranslateService) {
super(data, translateService);
this.levelId = data?.levelId!;
this.levelCode = data?.levelCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface GroupModel {
groupId: Number;
groupCode: string;
companyId: string;
thName: string;
engName: string;
getName(): string
}
export class MyGroupModel extends BaseModel implements GroupModel {
public groupId: Number;
public groupCode: string;
public companyId: string;
public thName: string;
public engName: string;
constructor(data?: Partial<GroupModel>, translateService?: TranslateService) {
super(data, translateService);
this.groupId = data?.groupId!;
this.groupCode = data?.groupCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface CategoryModel {
categoryId: Number;
categoryCode:string;
companyId: string;
thName: string;
engName: string;
priority: number;
getName(): string
}
export class MyCategoryModel extends BaseModel implements CategoryModel {
public categoryId: Number;
public categoryCode: string;
public companyId: string;
public thName: string;
public engName: string;
public priority: number;
constructor(
data?: Partial<CategoryModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.categoryId = data?.categoryId!;
this.categoryCode = data?.categoryCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.priority = data?.priority!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface LevelModel {
levelId: Number;
levelCode: string;
companyId: string;
thName: string;
engName: string;
getName(): string
}
export class MyLevelModel extends BaseModel implements LevelModel {
public levelId: Number;
public levelCode: string;
public companyId: string;
public thName: string;
public engName: string;
constructor(data?: Partial<LevelModel>, translateService?: TranslateService) {
super(data, translateService);
this.levelId = data?.levelId!;
this.levelCode = data?.levelCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "../base.model";
import { environment } from "../../../../environments/environment";
export interface HrcompanyModel {
companyId: string;
companyCode: string;
companyName: string;
branchId: string;
branchName: string;
pictureUrl: string;
role: string;
database: string;
myhrCode: string;
myhrUrl: string;
companyAddr: string;
companyTel: string;
companyTax: string;
prefix: string;
lastNumber: string;
number: string;
receiptSignature1: string;
receiptSignature2: string;
logo: string;
displayType: number;
bestsellerType: number;
recommendType: number;
}
export class MyHrcompanyModel extends BaseModel implements HrcompanyModel {
companyId: string;
companyCode: string;
companyName: string;
branchId: string;
branchName: string;
pictureUrl: string;
role: string;
database: string;
myhrCode: string;
myhrUrl: string;
companyAddr: string;
companyTel: string;
companyTax: string;
prefix: string;
lastNumber: string;
number: string;
receiptSignature1: string;
receiptSignature2: string;
logo: string;
displayType: number;
bestsellerType: number;
recommendType: number;
constructor(data?: Partial<HrcompanyModel>, translateService?: TranslateService) {
super(data, translateService)
this.companyId = data?.companyId!
this.companyCode = data?.companyCode!
this.companyName = data?.companyName!
this.branchId = data?.branchId!
this.branchName = data?.branchName!
this.pictureUrl = data?.pictureUrl!
this.role = data?.role!
this.database = data?.database!
this.myhrCode = data?.myhrCode!
this.myhrUrl = data?.myhrUrl!
this.companyAddr = data?.companyAddr!
this.companyTel = data?.companyTel!
this.companyTax = data?.companyTax!
this.prefix = data?.prefix!
this.lastNumber = data?.lastNumber!
this.number = data?.number!
this.receiptSignature1 = data?.receiptSignature1!
this.receiptSignature2 = data?.receiptSignature2!
this.logo = data?.logo!
this.displayType = data?.displayType!
this.bestsellerType = data?.bestsellerType!
this.recommendType = data?.recommendType!
}
// getPictureURL(): string {
// if (this.pictureUrl) {
// return environment.baseUrls + "/files/image/" + this.pictureUrl
// } else {
// return ""
// }
// }
getLogo(): string {
if (this.logo) {
return environment.baseUrls + "/files/image/" + this.logo
} else {
return ""
}
}
}
\ No newline at end of file
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { CourseModel, MyCourseModel } from "./course.model";
export interface OrganizationModel {
organizationId: Number;
organizationCode: string;
thName: string;
engName: string;
training: OrganizationCourseModel[];
companyId: string;
getName(): string
}
export class MyOrganizationModel
extends BaseModel
implements OrganizationModel
{
organizationId: Number;
organizationCode:string;
thName: string;
engName: string;
training: OrganizationCourseModel[];
companyId: string;
constructor(
data?: Partial<OrganizationModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.organizationId = data?.organizationId!;
this.organizationCode = data?.organizationCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.training = data?.training?.map(
(e) => new MyOrganizationCourseModel(e, this.translateService)
)!;
this.companyId = data?.companyId!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface OrganizationCourseModel {
organizationId: Number;
course: CourseModel;
}
export class MyOrganizationCourseModel
extends BaseModel
implements OrganizationCourseModel
{
organizationId: Number;
course: CourseModel;
constructor(
data?: Partial<OrganizationCourseModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.organizationId = data?.organizationId!;
this.course = new MyCourseModel(data?.course, this.translateService);
}
}
export interface Sort {
empty: boolean;
unsorted: boolean;
sorted: boolean;
}
export interface Pageable {
offset: number;
sort: Sort;
unpaged: boolean;
paged: boolean;
pageNumber: number;
pageSize: number;
}
export interface PageResponseModel<T> {
totalPages: number;
totalElements: number;
size: number;
content: T[];
number: number;
sort: Sort;
pageable: Pageable;
numberOfElements: number;
first: boolean;
last: boolean;
empty: boolean;
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { CourseModel, MyCourseModel } from "./course.model";
export interface PositionModel {
positionId : number;
positionCode: string;
thName: string;
engName: string;
training: PositionCourseModel[];
companyId: string;
getName(): string
}
export class MyPositionModel extends BaseModel implements PositionModel {
positionId : number;
positionCode: string;
thName: string;
engName: string;
training: PositionCourseModel[];
companyId: string;
constructor(
data?: Partial<PositionModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.positionId = data?.positionId!;
this.positionCode = data?.positionCode!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.companyId = data?.companyId!;
this.training = data?.training?.map(
(e) => new MyPositionCourseModel(e, this.translateService)
)!;
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
}
export interface PositionCourseModel {
positionId: number;
course: CourseModel;
}
export class MyPositionCourseModel
extends BaseModel
implements PositionCourseModel
{
positionId: number;
course: CourseModel;
constructor(
data?: Partial<PositionCourseModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.positionId = data?.positionId!;
this.course = new MyCourseModel(data?.course, this.translateService);
}
}
import { MyAnswerSequenceModel } from "./answersequence.model";
import { environment } from "../../../../environments/environment";
import { MyAnswerModel } from "./answer.model";
import { MyAnswerMatchModel } from "./answermatch.model";
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
export interface QuestionModel {
examId?: number;
questionId?: string;
thName: string;
engName: string;
image: string;
questionType?: number;
answerTrueFalse?: number;
answerChoice?: MyAnswerModel[];
answerMultiChoice?: MyAnswerModel[];
answerSequence?: MyAnswerSequenceModel[];
answerMatch?: MyAnswerMatchModel[];
getName(): string;
getPictureUrl(): string;
getTypeDesc(): string;
}
export class MyQuestionModel extends BaseModel implements QuestionModel {
examId?: number;
questionId?: string;
thName: string;
engName: string;
image: string;
questionType?: number;
answerTrueFalse?: number;
answerChoice?: MyAnswerModel[];
answerMultiChoice?: MyAnswerModel[];
answerSequence?: MyAnswerSequenceModel[];
answerMatch?: MyAnswerMatchModel[];
constructor(
data?: Partial<QuestionModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.examId = data?.examId ?? 0;
this.questionId = data?.questionId ?? "";
this.thName = data?.thName ?? "";
this.engName = data?.engName ?? "";
this.image = data?.image ?? "";
this.questionType = data?.questionType ?? 0;
this.answerTrueFalse = data?.answerTrueFalse ?? 0;
this.answerChoice = data?.answerChoice?.map(
(x) => new MyAnswerModel(x, this.translateService)
);
this.answerMultiChoice = data?.answerMultiChoice?.map(
(x) => new MyAnswerModel(x, this.translateService)
);
this.answerSequence = data?.answerSequence?.map(
(x) => new MyAnswerSequenceModel(x, this.translateService)
);
this.answerMatch = data?.answerMatch?.map(
(x) => new MyAnswerMatchModel(x, this.translateService)
);
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getTypeDesc(): string {
switch (this.questionType) {
case 0:
return "Sorting";
case 1:
return "True/False";
case 2:
return "Single answer";
case 3:
return "Multiple answers";
case 4:
return "Matching";
default:
return "";
}
}
}
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "./base.model";
import { MyQuestionModel, QuestionModel } from "./question.model";
import { MyProfileModel, ProfileModel } from "./user.model";
import { environment } from "../../../../environments/environment";
import { MyQuestionnaireQuestionModel, QuestionnairequestionModel } from "./questionnairequestion.model";
export interface QuestionnaireModel {
questionnaireId: Number;
questionnaireCode: string;
companyId: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
sampleVideo: string;
questionnaireType: number;
questionnairePass: number;
questionnairePercent: number;
questionnaireTimes: number;
questionnaireDuration: number;
questionnaireAnswerType: number;
questionShuffle: number;
answerShuffle: number;
owner: ProfileModel;
question?: QuestionnairequestionModel[];
getPictureUrl(): string;
getName(): string
getObjective(): string
}
export class MyQuestionnaireModel extends BaseModel implements QuestionnaireModel {
questionnaireId: Number;
questionnaireCode: string;
companyId: string;
thName: string;
engName: string;
thObjective: string;
engObjective: string;
image: string;
video: string;
sampleVideo: string;
questionnaireType: number;
questionnairePass: number;
questionnairePercent: number;
questionnaireTimes: number;
questionnaireDuration: number;
questionnaireAnswerType: number;
questionShuffle: number;
answerShuffle: number;
owner: ProfileModel;
question?: MyQuestionnaireQuestionModel[];
constructor(data?: Partial<QuestionnaireModel>, translateService?: TranslateService) {
super(data, translateService);
this.questionnaireId = data?.questionnaireId!;
this.questionnaireCode = data?.questionnaireCode!;
this.companyId = data?.companyId!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.thObjective = data?.thObjective!;
this.engObjective = data?.engObjective!;
this.image = data?.image!;
this.video = data?.video!;
this.sampleVideo = data?.sampleVideo!;
this.questionnaireType = data?.questionnaireType!;
this.questionnairePass = data?.questionnairePass!;
this.questionnairePercent = data?.questionnairePercent!;
this.questionnaireTimes = data?.questionnaireTimes!;
this.questionnaireDuration = data?.questionnaireDuration!;
this.questionShuffle = data?.questionShuffle!;
this.questionnaireAnswerType = data?.questionnaireAnswerType!;
this.answerShuffle = data?.answerShuffle!;
this.owner = new MyProfileModel(data?.owner,this.translateService);
this.question = data?.question?.map(
(x) => new MyQuestionnaireQuestionModel(x, this.translateService)
);
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getObjective (): string {
return this.translateService.currentLang == "th"
? this.thObjective
: this.engObjective;
}
}
import { TranslateService } from "@ngx-translate/core";
import { AnswerModel, MyAnswerModel } from "./answer.model";
import { AnswerMatchModel, MyAnswerMatchModel } from "./answermatch.model";
import {
AnswerSequenceModel,
MyAnswerSequenceModel,
} from "./answersequence.model";
import { BaseModel } from "./base.model";
import { environment } from "../../../../environments/environment";
import { AnswerpointsModel, MyAnswerpointsModel } from "./answerpoints.model";
export interface QuestionnairequestionModel {
questionnaireId?: Number;
questionId?: string;
questionGroup?: string;
thName: string;
engName: string;
image: string;
questionType?: number;
answerTrueFalse?: number;
answerChoice?: AnswerpointsModel[];
answerMultiChoice?: AnswerModel[];
//answerSequence?: AnswerSequenceModel[];
//answerMatch?: AnswerMatchModel[];
getName(): string;
getPictureUrl(): string;
getTypeDesc(): string
}
export class MyQuestionnaireQuestionModel extends BaseModel implements QuestionnairequestionModel {
questionnaireId?: Number;
questionId?: string;
questionGroup?: string;
thName: string;
engName: string;
image: string;
questionType?: number;
answerTrueFalse?: number;
answerChoice?: AnswerpointsModel[];
answerMultiChoice?: AnswerModel[];
//answerSequence?: AnswerSequenceModel[];
//answerMatch?: AnswerMatchModel[];
constructor(
data?: Partial<QuestionnairequestionModel>,
translateService?: TranslateService
) {
super(data, translateService);
this.questionnaireId = data?.questionnaireId!;
this.questionId = data?.questionId!;
this.questionGroup = data?.questionGroup!;
this.thName = data?.thName!;
this.engName = data?.engName!;
this.image = data?.image!;
this.questionType = data?.questionType!;
this.answerTrueFalse = data?.answerTrueFalse!;
this.answerChoice = data?.answerChoice?.map(
(x) => new MyAnswerpointsModel(x, this.translateService)
);
this.answerMultiChoice = data?.answerMultiChoice?.map(
(x) => new MyAnswerModel(x, this.translateService)
);
/*this.answerSequence = data?.answerSequence?.map(
(x) => new MyAnswerSequenceModel(x, this.translateService)
);
this.answerMatch = data?.answerMatch?.map(
(x) => new MyAnswerMatchModel(x, this.translateService)
);*/
}
getName(): string {
return this.translateService.currentLang == "th"
? this.thName
: this.engName;
}
getPictureUrl(): string {
if (this.image) {
return environment.baseUrl + "/files/image/" + this.image;
} else {
return "";
}
}
getTypeDesc(): string {
let desc = ""
if (this.questionType == 0) {
desc = "Sorting";
} else if (this.questionType == 1) {
desc = "Enter answer";
} else if (this.questionType == 2) {
desc = "Single answer";
} else if (this.questionType == 3) {
desc = "Multiple answers";
} else if (this.questionType == 4) {
desc = "Matching";
}
return desc
}
}
export interface ResponseModel {
message: string;
statusCode: number;
resultObject?: any;
fail: boolean;
actionStatus: string;
none: boolean;
success: boolean;
}
import { TranslateService } from "@ngx-translate/core"
import { BaseModel } from "../base.model"
export interface TransferModel {
refCourseId: number;
refCompanyId: string;
toCompanyId: string;
}
export class MytransferModel extends BaseModel implements TransferModel {
refCourseId: number;
refCompanyId: string;
toCompanyId: string;
constructor(data?: Partial<TransferModel>, translateService?: TranslateService) {
super(data, translateService)
this.refCourseId = data?.refCourseId!
this.refCompanyId = data?.refCompanyId!
this.toCompanyId = data?.toCompanyId!
}
}
\ No newline at end of file
import { TranslateService } from "@ngx-translate/core";
import { BaseModel } from "../base.model";
import { ProfileModel, MyProfileModel, RoleModel, MyRoleModel } from "./user.model";
export interface UserAccountModel {
userId: number;
username: string;
password: string;
member: ProfileModel;
role: RoleModel;
roleOth: string;
companyId: string;
status: number;
}
export class MyUserAccountModel extends BaseModel implements UserAccountModel {
userId: number;
username: string;
password: string;
member: ProfileModel;
role: RoleModel;
roleOth: string;
companyId: string;
status: number;
constructor(data?: Partial<UserAccountModel>, translateService?: TranslateService) {
super(data, translateService);
this.userId = data?.userId ?? 0;
this.username = data?.username ?? "";
this.password = data?.password ?? "";
this.member = new MyProfileModel(data?.member, this.translateService);
this.role = new MyRoleModel(data?.role, this.translateService);
this.roleOth = data?.roleOth ?? "";
this.companyId = data?.companyId ?? "";
this.status = data?.status ?? 0;
}
getFullname(): string {
return this.member?.getFullname() ?? "";
}
getRoleCode(): string {
return this.role?.roleCode ?? "";
}
getRoleName(): string {
return this.role?.getName() ?? "";
}
}
<app-page-header [title]="'การจัดการบริษัท'" [activeTitle]="'ผู้ดูแลระบบ'" [title1]="'Company Page'">
</app-page-header>
<div class="grid grid-cols-12 gap-6">
<div class="xl:col-span-12 col-span-12">
<div class="box">
<div class="box-header justify-between">
<div class="box-title">
{{ 'All List' | translate}} <span
class="badge bg-light text-default rounded-full ms-1 text-[0.75rem] align-middle">{{HrcompanyList.length}}</span>
</div>
<div class="flex flex-wrap gap-2">
<!-- <a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-primary-full me-2" (click)="new()"
(click)="openDialog()" data-hs-overlay="#modal-detail"><i
class="ri-add-line font-semibold align-middle"></i>{{ 'Create' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-success-full me-2" *ngIf="someSelected"
(click)="adjustSelect(1)"><i class="ri-user-follow-line font-semibold align-middle"></i>{{ 'Publish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-amber-full ti-btn-sec me-2"
*ngIf="someSelected" (click)="adjustSelect(0)"><i
class="ri-user-unfollow-line font-semibold align-middle"></i>{{ 'Unpublish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-danger-full me-2" *ngIf="someSelected"
(click)="deleteSelect()"><i class="ri-delete-bin-line font-semibold align-middle"></i>{{ 'Delete' |
translate}}
</a> -->
<div>
<input class="form-control form-control" type="text" placeholder="ค้นหาบริษัท"
aria-label=".form-control-sm example" [(ngModel)]='searchTerm'>
</div>
</div>
</div>
<div class="box-body">
<div class="table-responsive">
<table class="table whitespace-nowrap min-w-full ti-custom-table-hover">
<thead>
<tr class="border-b border-defaultborder">
<th scope="col" class="!text-start">
<input class="form-check-input check-all" type="checkbox" id="all-products"
(change)="toggleAll($event)" [checked]="allSelected" aria-label="...">
</th>
<th scope="col" class="text-start">{{"โลโก้"|translate}}</th>
<th scope="col" class="text-start">{{"รหัสบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"ชื่อบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"หน่วยงาน" | translate}}</th>
<th scope="col" class="text-start">{{"Management"|translate}}</th>
</tr>
</thead>
<tbody>
@if (filterList.length > 0) {
@for (item of filterList; track item.companyId) {
<tr class="border border-defaultborder dark:border-defaultborder/10">
<td class="product-checkbox">
<input class="form-check-input" type="checkbox" [checked]="selectedItems.get(item.companyId) || false"
(change)="onCheckboxChange(item.companyId)" aria-label="...">
</td>
<td>
<div class="flex items-center">
<span class="p-3 me-1" style="width: 200px;">
รูป
<!-- <img
[src]="item.getPictureURL() === '' ? 'assets/images/media/default-pic-gX.png' : item.getPictureURL()"
id="profile-img" class="border-radius-1"
style="width: 180px; height: 120px; object-fit: cover;"> -->
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyCode}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyName}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.branchName}}
</span>
</div>
</td>
<td>
<div class="flex flex-row items-center !gap-2 ">
<a aria-label="anchor"
class="ti-btn ti-btn-wave !gap-0 !m-0 bg-info/10 text-info hover:bg-info hover:text-white hover:border-info">
<i class="ri-pencil-line"></i>
</a>
<a aria-label="anchor" href="javascript:void(0);"
class="ti-btn ti-btn-wave product-btn !gap-0 !m-0 bg-danger/10 text-danger hover:bg-danger hover:text-white hover:border-danger">
<i class="ri-delete-bin-line"></i>
</a>
</div>
</td>
</tr>
}
} @else {
<tr>
<td [attr.colspan]="6" class="text-center py-4">
<ng-container *ngIf="HrcompanyList.length === 0 && !searchTerm">
<p>กำลังโหลดข้อมูล หรือไม่มีข้อมูลเลย...</p>
</ng-container>
<ng-container *ngIf="HrcompanyList.length > 0 && filterList.length === 0 && searchTerm">
<p>ไม่พบข้อมูลที่ค้นหา...</p>
</ng-container>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="box-footer">
<div class="flex items-center flex-wrap overflow-auto" *ngIf="filterList.length > 0">
<div class="mb-2 sm:mb-0">
<div>
{{'Showing' | translate}} {{filterList.length}} {{'entries'
| translate}} <i class="bi bi-arrow-right ms-2 font-semibold"></i>
</div>
</div>
<div class="ms-auto">
<nav aria-label="Page navigation">
<ul class="ti-pagination mb-0">
<li *ngIf="pageIndex>0" class="page-item {{pageIndex==0 ? 'disabled' : ''}}"><a
class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{'Previous' | translate}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex-1>0" (click)="pageIndex = pageIndex-2;updatePagedItems()">{{pageIndex-1}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex>0 && ((pageIndex-1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length))"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{pageIndex}}</a></li>
<li class="page-item"><a class="page-link active px-3 py-[0.375rem]"
href="javascript:void(0);">{{pageIndex +1}}</a>
</li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{pageIndex +2}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+2)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+2;updatePagedItems()">{{pageIndex +3}}</a></li>
<li *ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
class="page-item"><a class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{'Next' |
translate}}</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { CommonModule } from '@angular/common';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { HrcompanyModel, MyHrcompanyModel } from '../../models/mylearn/myhrcompany.model';
import { MyhrcompanyService } from '../../services/mylearn/myhrcompany.service';
import swal from 'sweetalert';
import { FormsModule } from '@angular/forms';
@Component({
selector: 'app-company-manage-course',
templateUrl: './company-manage-course.component.html',
styleUrls: ['./company-manage-course.component.scss'],
standalone: true,
imports: [
CommonModule,
SharedModule,
TranslateModule,
FormsModule,
],
})
export class CompanyManageCourseComponent implements OnInit {
HrcompanyList: HrcompanyModel[] = [];
filterList: HrcompanyModel[] = [];
MyhrcompanyList: MyHrcompanyModel[] = [];
_searchTerm = "";
pageIndex = 0;
allSelected = false;
someSelected = false;
selectedItems = new Map<string, boolean>();
get searchTerm(): string {
return this._searchTerm;
}
set searchTerm(val: string) {
this.pageIndex = 0;
this.allSelected = false;
this._searchTerm = val;
if (val != '') {
this.filterList = this.filter(val);
} else {
this.updatePagedItems();
}
}
constructor(
private myhrcompanyservice: MyhrcompanyService,
public translate: TranslateService,
) { }
ngOnInit() {
this.getMyHRCompany();
}
onCheckboxChange(companyId: string) {
const isSelected = this.selectedItems.get(companyId) || false;
this.selectedItems.set(companyId, !isSelected);
this.allSelected = this.HrcompanyList.every(item => this.selectedItems.get(item.companyId));
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
toggleAll(event: any) {
this.allSelected = event.target.checked;
this.selectedItems.clear();
this.HrcompanyList.forEach(item => {
this.selectedItems.set(item.companyId, this.allSelected);
});
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
filter(v: string) {
return this.HrcompanyList?.filter(
(x) =>
x.companyId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyCode?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.branchName?.toLowerCase().indexOf(v.toLowerCase()) !== -1
);
}
updatePagedItems() {
const startIndex = this.pageIndex * 10;
const endIndex = startIndex + 10;
this.filterList = this.HrcompanyList.slice(startIndex, endIndex);
}
getMyHRCompany() {
this.myhrcompanyservice.getList().subscribe({
next: (response: HrcompanyModel[]) => {
this.MyhrcompanyList = response.map(
(x: HrcompanyModel) => new MyHrcompanyModel(x,this.translate)
);
this.HrcompanyList = this.MyhrcompanyList;
this.updatePagedItems();
},
error: (error) => {
console.error('error cant get article', error);
swal("ข้อผิดพลาด", "ไม่สามารถดึงข้อมูลบริษัทได้", "error");
}
});
}
}
<app-page-header [title]="'การจัดการผู้ใช้งาน'" [activeTitle]="'ผู้ดูแลระบบ'" [title1]="'การจัดการผู้ใช้งาน'">
</app-page-header>
<div class="grid grid-cols-12 gap-6">
<div class="xl:col-span-12 col-span-12">
<div class="box">
<div class="box-header justify-between">
<div class="box-title">
{{ 'All List' | translate}} <span
class="badge bg-light text-default rounded-full ms-1 text-[0.75rem] align-middle">{{HrcompanyList.length}}</span>
</div>
<div class="flex flex-wrap gap-2">
<!-- <a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-primary-full me-2" (click)="new()"
(click)="openDialog()" data-hs-overlay="#modal-detail"><i
class="ri-add-line font-semibold align-middle"></i>{{ 'Create' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-success-full me-2" *ngIf="someSelected"
(click)="adjustSelect(1)"><i class="ri-user-follow-line font-semibold align-middle"></i>{{ 'Publish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-amber-full ti-btn-sec me-2"
*ngIf="someSelected" (click)="adjustSelect(0)"><i
class="ri-user-unfollow-line font-semibold align-middle"></i>{{ 'Unpublish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-danger-full me-2" *ngIf="someSelected"
(click)="deleteSelect()"><i class="ri-delete-bin-line font-semibold align-middle"></i>{{ 'Delete' |
translate}}
</a> -->
<div>
<input class="form-control form-control" type="text" placeholder="ค้นหาบริษัท"
aria-label=".form-control-sm example" [(ngModel)]='searchTerm'>
</div>
</div>
</div>
<div class="box-body">
<div class="table-responsive">
<table class="table whitespace-nowrap min-w-full ti-custom-table-hover">
<thead>
<tr class="border-b border-defaultborder">
<th scope="col" class="!text-start">
<input class="form-check-input check-all" type="checkbox" id="all-products"
(change)="toggleAll($event)" [checked]="allSelected" aria-label="...">
</th>
<th scope="col" class="text-start">{{"โลโก้"|translate}}</th>
<th scope="col" class="text-start">{{"รหัสบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"ชื่อบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"หน่วยงาน" | translate}}</th>
<th scope="col" class="text-start">{{"การจัดการสิทธิ์"|translate}}</th>
<th scope="col" class="text-start">{{"การอนุญาติสิทธิ์ผู้ใช้งาน"|translate}}</th>
</tr>
</thead>
<tbody>
@if (filterList.length > 0) {
@for (item of filterList; track item.companyId) {
<tr class="border border-defaultborder dark:border-defaultborder/10">
<td class="product-checkbox">
<input class="form-check-input" type="checkbox" [checked]="selectedItems.get(item.companyId) || false"
(change)="onCheckboxChange(item.companyId)" aria-label="...">
</td>
<td>
<div class="flex items-center">
<span class="p-3 me-1" style="width: 200px;">
<img
[src]="item.pictureUrl === '' ? 'assets/images/media/default-pic-gX.png' : item.pictureUrl"
id="profile-img" class="border-radius-1"
style="width: 100px; height: 100px; object-fit: cover;">
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyCode}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyName}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.branchName}}
</span>
</div>
</td>
<td style="justify-items: center;">
<div class="flex flex-row items-center !gap-2 ">
<a aria-label="anchor" (click)="goToDetail(item.companyId)"
class="ti-btn ti-btn-wave !gap-0 !m-0 bg-info/10 text-info hover:bg-info hover:text-white hover:border-info cursor-pointer">
<i class="ri-eye-line"></i>
</a>
</div>
</td>
<td style="justify-items: center;">
<div class="flex flex-row items-center !gap-2 ">
<a aria-label="anchor" (click)="goTouserauthorizathin(item.companyId)"
class="ti-btn ti-btn-wave !gap-0 !m-0 bg-info/10 text-info hover:bg-info hover:text-white hover:border-info cursor-pointer">
<i class="ri-eye-line"></i>
</a>
</div>
</td>
</tr>
}
} @else {
<tr>
<td [attr.colspan]="6" class="text-center py-4">
<ng-container *ngIf="HrcompanyList.length === 0 && !searchTerm">
<p>กำลังโหลดข้อมูล หรือไม่มีข้อมูลเลย...</p>
</ng-container>
<ng-container *ngIf="HrcompanyList.length > 0 && filterList.length === 0 && searchTerm">
<p>ไม่พบข้อมูลที่ค้นหา...</p>
</ng-container>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="box-footer">
<div class="flex items-center flex-wrap overflow-auto" *ngIf="filterList.length > 0">
<div class="mb-2 sm:mb-0">
<div>
{{'Showing' | translate}} {{filterList.length}} {{'entries'
| translate}} <i class="bi bi-arrow-right ms-2 font-semibold"></i>
</div>
</div>
<div class="ms-auto">
<nav aria-label="Page navigation">
<ul class="ti-pagination mb-0">
<li *ngIf="pageIndex>0" class="page-item {{pageIndex==0 ? 'disabled' : ''}}"><a
class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{'Previous' | translate}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex-1>0" (click)="pageIndex = pageIndex-2;updatePagedItems()">{{pageIndex-1}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex>0 && ((pageIndex-1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length))"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{pageIndex}}</a></li>
<li class="page-item"><a class="page-link active px-3 py-[0.375rem]"
href="javascript:void(0);">{{pageIndex +1}}</a>
</li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{pageIndex +2}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+2)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+2;updatePagedItems()">{{pageIndex +3}}</a></li>
<li *ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
class="page-item"><a class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{'Next' |
translate}}</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { CommonModule } from '@angular/common';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { HrcompanyModel, MyHrcompanyModel, } from '../../models/mylearn/myhrcompany.model';
import { MyhrcompanyService } from '../../services/mylearn/myhrcompany.service';
import swal from 'sweetalert';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@Component({
selector: 'app-management-user',
templateUrl: './management-user.component.html',
styleUrls: ['./management-user.component.scss'],
standalone: true,
imports: [
CommonModule,
SharedModule,
TranslateModule,
FormsModule,
],
})
export class ManagementUserComponent implements OnInit {
HrcompanyList: HrcompanyModel[] = [];
filterList: HrcompanyModel[] = [];
MyhrcompanyList: MyHrcompanyModel[] = [];
companyId: string;
_searchTerm = "";
pageIndex = 0;
allSelected = false;
someSelected = false;
selectedItems = new Map<string, boolean>();
get searchTerm(): string {
return this._searchTerm;
}
set searchTerm(val: string) {
this.pageIndex = 0;
this.allSelected = false;
this._searchTerm = val;
if (val != '') {
this.filterList = this.filter(val);
} else {
this.updatePagedItems();
}
}
constructor(
private myhrcompanyservice: MyhrcompanyService,
public translate: TranslateService,
private router: Router,
) { }
ngOnInit() {
this.getMyHRCompany();
}
onCheckboxChange(companyId: string) {
const isSelected = this.selectedItems.get(companyId) || false;
this.selectedItems.set(companyId, !isSelected);
this.allSelected = this.HrcompanyList.every(item => this.selectedItems.get(item.companyId));
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
toggleAll(event: any) {
this.allSelected = event.target.checked;
this.selectedItems.clear();
this.HrcompanyList.forEach(item => {
this.selectedItems.set(item.companyId, this.allSelected);
});
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
filter(v: string) {
return this.HrcompanyList?.filter(
(x) =>
x.companyId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyCode?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.branchName?.toLowerCase().indexOf(v.toLowerCase()) !== -1
);
}
updatePagedItems() {
const startIndex = this.pageIndex * 10;
const endIndex = startIndex + 10;
this.filterList = this.HrcompanyList.slice(startIndex, endIndex);
}
getMyHRCompany() {
this.myhrcompanyservice.getList().subscribe({
next: (response: HrcompanyModel[]) => {
this.MyhrcompanyList = response.map(
(x: HrcompanyModel) => new MyHrcompanyModel(x, this.translate)
);
this.HrcompanyList = this.MyhrcompanyList;
this.updatePagedItems();
this.getMyHRCompanyExternal();
},
error: (error) => {
console.error('error cant get article', error);
swal("ข้อผิดพลาด", "ไม่สามารถดึงข้อมูลบริษัทได้", "error");
}
});
}
getMyHRCompanyExternal() {
const externalCompanyId = "5f3c2b6e-8d7a-4b2f-a3e6-9f1d8c4e7b0a";
this.myhrcompanyservice.getByCompany(externalCompanyId).subscribe({
next: (response: HrcompanyModel) => {
const company = new MyHrcompanyModel(response, this.translate);
this.HrcompanyList.push(company);
this.updatePagedItems();
},
error: (error) => {
console.error("error can't get external company", error);
swal("เกิดข้อผิดพลาด", "ไม่สามารถดึงข้อมูล external company ได้", "error");
}
});
}
getMyHRCompanyById() {
this.myhrcompanyservice.getByCompany(this.companyId).subscribe({
next: (response: HrcompanyModel) => {
const company = new MyHrcompanyModel(response, this.translate)
},
error: (error) => {
console.error("error can't get myhrcompany by Id")
swal("เกิดข้อผิดพลาด", "ไม่สามารถดึงข้อมูลบริษัทได้", "error")
}
})
}
goToDetail(companyId: string) {
this.router.navigate(['/mylearn/management-user/user-role', companyId]);
}
goTouserauthorizathin(companyId: string) {
this.router.navigate(['/mylearn/management-user/user-authorization', companyId]);
}
}
::ng-deep .ng-select .ng-value-container .ng-value {
background-color: #1E3A8A !important; /* น้ำเงิน */
color: #fff !important; /* ตัวหนังสือขาว */
border-radius: 4px;
padding: 2px 8px;
}
::ng-deep .ng-select .ng-value-container .ng-value .ng-value-label {
color: #fff !important; /* ตัวหนังสือขาว */
}
::ng-deep .ng-select .ng-value-container .ng-value .ng-value-icon {
color: #fff !important; /* ไอคอนกากบาท (x) เป็นสีขาว */
}
\ No newline at end of file
::ng-deep .ng-select .ng-dropdown-panel .ng-optgroup {
background-color: #f1f1f1; /* เทาอ่อน */
font-weight: bold;
color: #333;
padding: 6px 10px;
}
::ng-deep .ng-select.form-control .ng-select-container {
height: calc(2.25rem + 2px); /* เท่ากับ input.form-control */
min-height: calc(2.25rem + 2px);
border-radius: 0.375rem; /* ปรับให้โค้งเหมือน input */
border: 1px solid #ced4da; /* สี border เท่ากับ input */
padding: 0.375rem 0.75rem;
}
::ng-deep .ng-select.ng-select-multiple .ng-select-container {
height: auto !important; /* ✅ ปล่อยให้สูงตาม content */
min-height: 38px; /* ✅ ความสูงขั้นต่ำ (เหมือน input) */
align-items: flex-start !important; /* ✅ ให้ item เรียงขึ้นบน */
flex-wrap: wrap !important; /* ✅ อนุญาตให้ wrap ลงบรรทัดใหม่ */
padding-top: 4px;
padding-bottom: 4px;
}
::ng-deep .ng-select .ng-value-container .ng-value {
background-color: #1E3A8A !important; /* น้ำเงิน */
color: #fff !important; /* ตัวหนังสือขาว */
border-radius: 4px;
padding: 2px 8px;
}
::ng-deep .ng-select .ng-value-container .ng-value .ng-value-label {
color: #fff !important; /* ตัวหนังสือขาว */
}
::ng-deep .ng-select .ng-value-container .ng-value .ng-value-icon {
color: #fff !important; /* ไอคอนกากบาท (x) เป็นสีขาว */
}
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { SharedModule } from '../../../../shared/shared.module';
import { CommonModule } from '@angular/common';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import swal from 'sweetalert';
import { FormsModule } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { MyhrcompanyService } from '../../../services/mylearn/myhrcompany.service';
import { HrcompanyModel } from '../../../models/mylearn/myhrcompany.model';
import { CourseModel, MyCourseModel } from '../../../models/mylearn/course.model';
import { CourseService } from '../../../services/mylearn/course.service';
import { MyProfileModel } from '../../../models/mylearn/user.model';
@Component({
selector: 'app-manage-course',
templateUrl: './manage-course.component.html',
styleUrls: ['./manage-course.component.scss'],
standalone: true,
imports: [
CommonModule,
SharedModule,
TranslateModule,
FormsModule,
],
})
export class ManageCourseComponent implements OnInit {
company?: HrcompanyModel;
courses: CourseModel[] = [];
filterList: CourseModel[] = [];
MycoursesList: MyCourseModel[] = [];
companyId: string;
_searchTerm = "";
pageIndex = 0;
allSelected = false;
someSelected = false;
selectedItems = new Map<string, boolean>();
get searchTerm(): string {
return this._searchTerm;
}
set searchTerm(val: string) {
this.pageIndex = 0;
this.allSelected = false;
this._searchTerm = val;
if (val != '') {
this.filterList = this.filter(val);
} else {
this.updatePagedItems();
}
}
constructor(
private myhrcompanyservice: MyhrcompanyService,
public translate: TranslateService,
private route: ActivatedRoute,
private courseService: CourseService,
) { }
ngOnInit() {
const id = this.route.snapshot.paramMap.get('id')!;
this.myhrcompanyservice.getByCompany(id).subscribe(company => {
this.company = company;
console.log("Company detail:", company);
});
this.getCourseByCompany();
}
onCheckboxChange(courseId: Number) {
const isSelected = this.selectedItems.get(courseId.toString()) || false;
this.selectedItems.set(courseId.toString(), !isSelected);
this.allSelected = this.courses.every(item => this.selectedItems.get(item.courseId.toString()));
this.someSelected = this.courses.some(item => this.selectedItems.get(item.courseId.toString()));
}
toggleAll(event: any) {
this.allSelected = event.target.checked;
this.selectedItems.clear();
this.courses.forEach(item => {
this.selectedItems.set(item.courseId.toString(), this.allSelected);
});
this.someSelected = this.courses.some(item => this.selectedItems.get(item.courseId.toString()));
}
filter(v: string) {
return this.courses?.filter(
(x) =>
x.courseId?.toString().indexOf(v.toLowerCase()) !== -1 ||
x.thName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.engName?.toLowerCase().indexOf(v.toLowerCase()) !== -1
);
}
updatePagedItems() {
const startIndex = this.pageIndex * 10;
const endIndex = startIndex + 10;
this.filterList = this.courses.slice(startIndex, endIndex);
}
getCourseByCompany() {
this.companyId = this.route.snapshot.paramMap.get('id')!;
this.courseService.getListByCompany(this.companyId).subscribe({
next: (res: CourseModel[]) => {
this.MycoursesList = res.map(
(x: CourseModel) => {
const course = new MyCourseModel(x, this.translate);
if (x.owner) {
course.owner = new MyProfileModel(x.owner, this.translate);
}
return course;
}
);
this.courses = this.MycoursesList;
this.updatePagedItems();
},
error: (err) => {
console.error("โหลด courses ไม่ได้", err);
}
});
}
}
<app-page-header [title]="'จัดการบริษัท'" [activeTitle]="'ผู้ดูแลระบบ'" [title1]="'จัดการบริษัท'">
</app-page-header>
<div class="grid grid-cols-12 gap-6">
<div class="xl:col-span-12 col-span-12">
<div class="box">
<div class="box-header justify-between">
<div class="box-title">
{{ 'All List' | translate}} <span
class="badge bg-light text-default rounded-full ms-1 text-[0.75rem] align-middle">{{HrcompanyList.length}}</span>
</div>
<div class="flex flex-wrap gap-2">
<!-- <a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-primary-full me-2" (click)="new()"
(click)="openDialog()" data-hs-overlay="#modal-detail"><i
class="ri-add-line font-semibold align-middle"></i>{{ 'Create' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-success-full me-2" *ngIf="someSelected"
(click)="adjustSelect(1)"><i class="ri-user-follow-line font-semibold align-middle"></i>{{ 'Publish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-amber-full ti-btn-sec me-2"
*ngIf="someSelected" (click)="adjustSelect(0)"><i
class="ri-user-unfollow-line font-semibold align-middle"></i>{{ 'Unpublish' |
translate}}
</a>
<a href="javascript:void(0);" class="hs-dropdown-toggle ti-btn ti-btn-danger-full me-2" *ngIf="someSelected"
(click)="deleteSelect()"><i class="ri-delete-bin-line font-semibold align-middle"></i>{{ 'Delete' |
translate}}
</a> -->
<div>
<input class="form-control form-control" type="text" placeholder="ค้นหาบริษัท"
aria-label=".form-control-sm example" [(ngModel)]='searchTerm'>
</div>
</div>
</div>
<div class="box-body">
<div class="table-responsive">
<table class="table whitespace-nowrap min-w-full ti-custom-table-hover">
<thead>
<tr class="border-b border-defaultborder">
<th scope="col" class="!text-start">
<input class="form-check-input check-all" type="checkbox" id="all-products"
(change)="toggleAll($event)" [checked]="allSelected" aria-label="...">
</th>
<th scope="col" class="text-start">{{"โลโก้"|translate}}</th>
<th scope="col" class="text-start">{{"รหัสบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"ชื่อบริษัท"|translate}}</th>
<th scope="col" class="text-start">{{"หน่วยงาน" | translate}}</th>
<th scope="col" class="text-start">{{"การจัดการคอร์ส"|translate}}</th>
</tr>
</thead>
<tbody>
@if (filterList.length > 0) {
@for (item of filterList; track item.companyId) {
<tr class="border border-defaultborder dark:border-defaultborder/10 cursor-pointer" (click)="goToDetail(item.companyId)">
<td class="product-checkbox">
<input class="form-check-input" type="checkbox" [checked]="selectedItems.get(item.companyId) || false"
(change)="onCheckboxChange(item.companyId)" aria-label="...">
</td>
<td>
<div class="flex items-center">
<span class="p-3 me-1" style="width: 200px;">
<img
[src]="item.pictureUrl === '' ? 'assets/images/media/default-pic-gX.png' : item.pictureUrl"
id="profile-img" class="border-radius-1"
style="width: 100px; height: 100px; object-fit: cover;">
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyCode}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.companyName}}
</span>
</div>
</td>
<td>
<div>
<span class="block mb-1">
{{item.branchName}}
</span>
</div>
</td>
<td>
<div class="flex flex-row items-center !gap-2 ">
<a aria-label="anchor" (click)="goToDetail(item.companyId)"
class="ti-btn ti-btn-wave !gap-0 !m-0 bg-info/10 text-info hover:bg-info hover:text-white hover:border-info cursor-pointer">
<i class="ri-eye-line"></i>
</a>
<!-- <a aria-label="anchor" href="javascript:void(0);"
class="ti-btn ti-btn-wave product-btn !gap-0 !m-0 bg-danger/10 text-danger hover:bg-danger hover:text-white hover:border-danger">
<i class="ri-delete-bin-line"></i>
</a> -->
</div>
</td>
</tr>
}
} @else {
<tr>
<td [attr.colspan]="6" class="text-center py-4">
<ng-container *ngIf="HrcompanyList.length === 0 && !searchTerm">
<p>กำลังโหลดข้อมูล หรือไม่มีข้อมูลเลย...</p>
</ng-container>
<ng-container *ngIf="HrcompanyList.length > 0 && filterList.length === 0 && searchTerm">
<p>ไม่พบข้อมูลที่ค้นหา...</p>
</ng-container>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="box-footer">
<div class="flex items-center flex-wrap overflow-auto" *ngIf="filterList.length > 0">
<div class="mb-2 sm:mb-0">
<div>
{{'Showing' | translate}} {{filterList.length}} {{'entries'
| translate}} <i class="bi bi-arrow-right ms-2 font-semibold"></i>
</div>
</div>
<div class="ms-auto">
<nav aria-label="Page navigation">
<ul class="ti-pagination mb-0">
<li *ngIf="pageIndex>0" class="page-item {{pageIndex==0 ? 'disabled' : ''}}"><a
class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{'Previous' | translate}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex-1>0" (click)="pageIndex = pageIndex-2;updatePagedItems()">{{pageIndex-1}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="pageIndex>0 && ((pageIndex-1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length))"
(click)="pageIndex = pageIndex-1;updatePagedItems()">{{pageIndex}}</a></li>
<li class="page-item"><a class="page-link active px-3 py-[0.375rem]"
href="javascript:void(0);">{{pageIndex +1}}</a>
</li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{pageIndex +2}}</a></li>
<li class="page-item"><a class="page-link px-3 py-[0.375rem]" href="javascript:void(0);"
*ngIf="(pageIndex+2)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
(click)="pageIndex = pageIndex+2;updatePagedItems()">{{pageIndex +3}}</a></li>
<li *ngIf="(pageIndex+1)*10 < (searchTerm == '' ? HrcompanyList.length : filterList.length)"
class="page-item"><a class="page-link px-3 py-[0.375rem] cursor-pointer"
(click)="pageIndex = pageIndex+1;updatePagedItems()">{{'Next' |
translate}}</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
import { Component, OnInit } from '@angular/core';
import { SharedModule } from '../../../shared/shared.module';
import { CommonModule } from '@angular/common';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { HrcompanyModel, MyHrcompanyModel, } from '../../models/mylearn/myhrcompany.model';
import { MyhrcompanyService } from '../../services/mylearn/myhrcompany.service';
import swal from 'sweetalert';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@Component({
selector: 'app-myhrcompany',
templateUrl: './myhrcompany.component.html',
styleUrls: ['./myhrcompany.component.scss'],
standalone: true,
imports: [
CommonModule,
SharedModule,
TranslateModule,
FormsModule,
],
})
export class MyhrcompanyComponent implements OnInit {
HrcompanyList: HrcompanyModel[] = [];
filterList: HrcompanyModel[] = [];
MyhrcompanyList: MyHrcompanyModel[] = [];
companyId: string;
_searchTerm = "";
pageIndex = 0;
allSelected = false;
someSelected = false;
selectedItems = new Map<string, boolean>();
get searchTerm(): string {
return this._searchTerm;
}
set searchTerm(val: string) {
this.pageIndex = 0;
this.allSelected = false;
this._searchTerm = val;
if (val != '') {
this.filterList = this.filter(val);
} else {
this.updatePagedItems();
}
}
constructor(
private myhrcompanyservice: MyhrcompanyService,
public translate: TranslateService,
private router: Router,
) { }
ngOnInit() {
this.getMyHRCompany();
}
onCheckboxChange(companyId: string) {
const isSelected = this.selectedItems.get(companyId) || false;
this.selectedItems.set(companyId, !isSelected);
this.allSelected = this.HrcompanyList.every(item => this.selectedItems.get(item.companyId));
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
toggleAll(event: any) {
this.allSelected = event.target.checked;
this.selectedItems.clear();
this.HrcompanyList.forEach(item => {
this.selectedItems.set(item.companyId, this.allSelected);
});
this.someSelected = this.HrcompanyList.some(item => this.selectedItems.get(item.companyId));
}
filter(v: string) {
return this.HrcompanyList?.filter(
(x) =>
x.companyId?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyCode?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.companyName?.toLowerCase().indexOf(v.toLowerCase()) !== -1 ||
x.branchName?.toLowerCase().indexOf(v.toLowerCase()) !== -1
);
}
updatePagedItems() {
const startIndex = this.pageIndex * 10;
const endIndex = startIndex + 10;
this.filterList = this.HrcompanyList.slice(startIndex, endIndex);
}
getMyHRCompany() {
this.myhrcompanyservice.getList().subscribe({
next: (response: HrcompanyModel[]) => {
this.MyhrcompanyList = response.map(
(x: HrcompanyModel) => new MyHrcompanyModel(x, this.translate)
);
this.HrcompanyList = this.MyhrcompanyList;
this.updatePagedItems();
this.getMyHRCompanyExternal();
},
error: (error) => {
console.error('error cant get article', error);
swal("ข้อผิดพลาด", "ไม่สามารถดึงข้อมูลบริษัทได้", "error");
}
});
}
getMyHRCompanyExternal() {
const externalCompanyId = "5f3c2b6e-8d7a-4b2f-a3e6-9f1d8c4e7b0a";
this.myhrcompanyservice.getByCompany(externalCompanyId).subscribe({
next: (response: HrcompanyModel) => {
const company = new MyHrcompanyModel(response, this.translate);
this.HrcompanyList.push(company);
this.updatePagedItems();
},
error: (error) => {
console.error("error can't get external company", error);
swal("เกิดข้อผิดพลาด", "ไม่สามารถดึงข้อมูล external company ได้", "error");
}
});
}
getMyHRCompanyById() {
this.myhrcompanyservice.getByCompany(this.companyId).subscribe({
next: (response: HrcompanyModel) => {
const company = new MyHrcompanyModel(response, this.translate)
},
error: (error) => {
console.error("error can't get myhrcompany by Id")
swal("เกิดข้อผิดพลาด", "ไม่สามารถดึงข้อมูลบริษัทได้", "error")
}
})
}
goToDetail(companyId: string) {
this.router.navigate(['/mylearn/myhrcompany/manage-course', companyId]);
}
}
......@@ -118,6 +118,56 @@ export const mylearn: Routes = [
loadComponent: () =>
import('./pdpa-manage/pdpa-manage.component').then((m) => m.PdpaManageComponent),
},
{
path: 'user-company',
loadComponent: () =>
import('./user-company/user-company.component').then((m) => m.UserCompanyComponent),
},
{
path: 'myhrcompany',
children: [
{
path: 'manage-course/:id',
loadComponent: () =>
import('./myhrcompany/manage-course/manage-course.component')
.then(m => m.ManageCourseComponent),
},
{
path: '',
loadComponent: () =>
import('./myhrcompany/myhrcompany.component')
.then(m => m.MyhrcompanyComponent),
},
]
},
{
path: 'course-transfer',
loadComponent: () =>
import('./course-transfer/course-transfer.component').then((m) => m.CourseTransferComponent),
},
{
path: 'management-user',
children: [
{
path: 'user-role/:id',
loadComponent: () =>
import('./management-user/user-role/user-role.component')
.then(m => m.UserRoleComponent),
},
{
path: 'user-authorization/:id',
loadComponent: () =>
import('./management-user/user-authorization/user-authorization.component')
.then(m => m.UserAuthorizationComponent),
},
{
path: '',
loadComponent: () =>
import('./management-user/management-user.component')
.then(m => m.ManagementUserComponent),
},
]
},
...portalRoutes
]
}
......
<ng-container>
<app-page-header [title]="'จัดการบริษัท'" [activeTitle]="'ผู้ดูแลระบบ'" [title1]="'Company Page'"></app-page-header>
<div class="grid grid-cols-12 gap-6">
<div class="xl:col-span-12 col-span-12">
<div class="box">
<div class="box-header justify-between">
<div class="box-title">
{{ 'Company List' | translate }}
<span class="badge bg-light text-default rounded-full ms-1 text-[0.75rem] align-middle">
{{ filterArray.length }}
</span>
</div>
<div class="flex flex-wrap gap-2">
<input
class="form-control"
type="text"
placeholder="{{'Search by ID or Name' | translate}}"
[(ngModel)]="searchTerm"
/>
</div>
</div>
<div class="box-body">
<div class="table-responsive">
<table class="table whitespace-nowrap min-w-full ti-custom-table-hover">
<thead>
<tr class="border-b border-defaultborder">
<th class="!text-center" scope="col">#</th>
<th scope="col">{{ 'Picture' | translate }}</th>
<th scope="col">{{ 'Name' | translate }}</th>
<th scope="col">{{ 'Owner' | translate }}</th>
<th scope="col">{{ 'Status' | translate }}</th>
<th scope="col">{{ 'Action' | translate }}</th>
</tr>
</thead>
<tbody>
@if (filterArray.length > 0) {
@for(company of filterArray | slice:(page-1)*pageSize:(page-1)*pageSize+pageSize; track filterArray){
<tr class="border border-defaultborder dark:border-defaultborder/10">
<td class="text-center">{{ (page-1) * pageSize + $index+1 }}</td>
<td>
<img
*ngIf="company.pictureCompany; else blankImage"
[src]="company.pictureCompany"
class="border p-1 w-24 h-16 object-cover"
/>
<ng-template #blankImage>
<img src="assets/images/no_img.jpg" class="border p-1 w-24 h-16 object-cover" />
</ng-template>
</td>
<td class="text-wrap">{{ company.companyName }}</td>
<td class="text-wrap">{{ company.ownerName }}</td>
<td>
<span class="badge"
[ngClass]="company.companyStatus=='Open' ? 'bg-primary text-white' : 'bg-danger text-white'">
{{ company.companyStatus=='Open' ? ('Enable' | translate) : ('Disable' | translate) }}
</span>
</td>
<td>
<div class="flex flex-row items-center gap-2">
<!-- ✅ Tailwind tooltip -->
<a
class="relative group ti-btn ti-btn-wave bg-info/10 text-info hover:bg-info hover:text-white hover:border-info"
>
<!-- [routerLink]="'../user-profile/' + company.companyId" -->
<i class="ri-search-line"></i>
<span
class="absolute bottom-full mb-2 hidden group-hover:block
bg-gray-800 text-white text-xs rounded py-1 px-2 whitespace-nowrap">
{{ 'User' | translate }}
</span>
</a>
</div>
</td>
</tr>
}
} @else {
<tr>
<td colspan="6" class="text-center py-4">
<p>{{ 'No data available' | translate }}</p>
</td>
</tr>
}
</tbody>
</table>
</div>
</div>
<div class="box-footer">
<div class="flex items-center flex-wrap overflow-auto" *ngIf="filterArray.length > 0">
<div class="mb-2 sm:mb-0">
{{'Showing' | translate}} {{filterArray.length}} {{'entries' | translate}}
</div>
<div class="ms-auto">
<nav aria-label="Page navigation">
<ul class="ti-pagination mb-0">
<li *ngIf="page>1" class="page-item">
<a class="page-link px-3 py-[0.375rem]" (click)="page = page-1">{{'Previous' | translate}}</a>
</li>
<li class="page-item">
<a class="page-link active px-3 py-[0.375rem]" href="javascript:void(0);">{{page}}</a>
</li>
<li *ngIf="page*pageSize < filterArray.length" class="page-item">
<a class="page-link px-3 py-[0.375rem]" (click)="page = page+1">{{'Next' | translate}}</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
</ng-container>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { UserCompanyComponent } from './user-company.component';
describe('UserCompanyComponent', () => {
let component: UserCompanyComponent;
let fixture: ComponentFixture<UserCompanyComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UserCompanyComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(UserCompanyComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { CommonModule } from "@angular/common";
import { Component, OnInit } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { TranslateModule, TranslateService } from "@ngx-translate/core";
import { CompanyListModel, CompanyZeemeModel } from "../../models/mylearn/courseinsite.model";
import { UserProfileService } from "../../services/mylearn/user-profile.services";
import { CourseModel } from "../../models/mylearn/course.model";
import { ProfileModel } from "../../models/mylearn/user.model";
import { SharedModule } from "../../../shared/shared.module";
@Component({
selector: "app-user-company",
templateUrl: "./user-company.component.html",
styleUrls: ["./user-company.component.scss"],
standalone: true,
imports: [
CommonModule,
FormsModule,
TranslateModule,
SharedModule,
]
})
export class UserCompanyComponent implements OnInit {
filterArray: CompanyListModel[] = [];
courseList?: CourseModel[];
profileList?: ProfileModel[];
companyListAll?: CompanyZeemeModel[];
page = 1;
pageSize = 10;
searchTerm = "";
constructor(
private userProfileService: UserProfileService,
public translate: TranslateService,
) {}
ngOnInit(): void {
this.userProfileService.getListsAll().subscribe(response => {
this.profileList = response;
this.userProfileService.getCompanyListAll().subscribe(companyResponse => {
this.companyListAll = companyResponse;
this.profileList?.forEach(res => {
if (!this.filterArray.find(x => x.companyId == res.companyId) && res.companyId != undefined) {
let companyList = {} as CompanyListModel;
companyList.companyId = res.companyId!;
this.companyListAll?.forEach(y => {
if (y.companyId == res.companyId) {
companyList.companyName = y.companyName;
companyList.pictureCompany = y.pictureCompany;
companyList.companyStatus = y.companyStatus;
companyList.companyType = y.companyType;
companyList.ownerId = y.ownerId;
companyList.ownerName = y.ownerName;
this.filterArray.unshift(companyList);
}
});
}
});
});
});
}
openModalDetail() {}
setUser() {}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { CourseModel } from '../../models/mylearn/course.model';
@Injectable({
providedIn: 'root'
})
export class CourseService {
api = "/course"
urlApi = environment.baseUrls + "/course"
constructor(private http: HttpClient) { }
getcourse() {
return this.http.get<CourseModel>(this.urlApi)
}
getcourseList(): Observable<CourseModel[]> {
return this.http.get<CourseModel[]>(this.urlApi + "/lists")
}
getListByCompany(companyId: string): Observable<CourseModel[]> {
return this.http.get<CourseModel[]>(`${this.urlApi}/lists/${companyId}`);
}
// postMyHRcompany(body: Partial<CourseModel>): Observable<any> {
// return this.http.post(this.urlApi, body)
// }
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { HrcompanyModel } from '../../models/mylearn/myhrcompany.model';
@Injectable({
providedIn: 'root'
})
export class MyhrcompanyService {
api = "/myhrcompany"
urlApi = environment.baseUrls + "/myhrcompany"
constructor(private http: HttpClient) { }
getcompany() {
return this.http.get<HrcompanyModel>(this.urlApi)
}
getByCompany(companyId: string): Observable<HrcompanyModel> {
return this.http.get<HrcompanyModel>(`${this.urlApi}/${companyId}`);
}
getList(): Observable<HrcompanyModel[]> {
return this.http.get<HrcompanyModel[]>(this.urlApi + "/lists")
}
postMyHRcompany(body: Partial<HrcompanyModel>): Observable<any> {
return this.http.post(this.urlApi, body)
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { TransferModel } from '../../models/mylearn/transfer.model';
@Injectable({
providedIn: 'root'
})
export class TransferService {
api = "/course-transfer"
urlApi = environment.baseUrls + "/course-transfer"
constructor(private http: HttpClient) { }
TransferCourse(body: TransferModel): Observable<any>{
return this.http.post<any>(this.urlApi,body)
}
TransferHistory(body: TransferModel): Observable<any> {
return this.http.post<any>(`${this.urlApi}/history`, body);
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable, forkJoin } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { environment } from '../../../../environments/environment';
import { RoleModel, MyRoleModel } from '../../models/mylearn/user.model';
import { TranslateService } from '@ngx-translate/core';
import { PageResponseModel, ResponseModel } from '../../models/base.model';
@Injectable({
providedIn: 'root'
})
export class UserRoleService {
private urlApi = environment.baseUrls + "/users-role";
constructor(
private http: HttpClient,
private translateService: TranslateService
) { }
getAll(): Observable<MyRoleModel[]> {
return this.http
.get<RoleModel[]>(this.urlApi)
.pipe(map(list => list.map(e => new MyRoleModel(e, this.translateService))));
}
getById(roleId: number): Observable<MyRoleModel> {
return this.http
.get<RoleModel>(`${this.urlApi}/${roleId}`)
.pipe(map(e => new MyRoleModel(e, this.translateService)));
}
getByCode(roleCode: string): Observable<MyRoleModel> {
return this.http
.get<RoleModel>(`${this.urlApi}/rolecode/${roleCode}`)
.pipe(map(e => new MyRoleModel(e, this.translateService)));
}
getLists(): Observable<MyRoleModel[]> {
return this.http
.get<RoleModel[]>(`${this.urlApi}/lists`)
.pipe(map(list => list.map(e => new MyRoleModel(e, this.translateService))));
}
getListsByCompany(companyId: string): Observable<MyRoleModel[]> {
return this.http
.get<RoleModel[]>(`${this.urlApi}/lists?companyId=${companyId}`)
.pipe(
map(list => list.map(e => new MyRoleModel(e, this.translateService)))
);
}
getListByPageSize(body: { page: number; size: number }): Observable<PageResponseModel<MyRoleModel>> {
return this.http
.get<PageResponseModel<RoleModel>>(this.urlApi, { params: body })
.pipe(
map(page => ({
...page,
content: page.content.map(e => new MyRoleModel(e, this.translateService))
}))
);
}
getListAllPageSize(): Observable<MyRoleModel[]> {
return this.http
.get<PageResponseModel<RoleModel>>(this.urlApi, { params: { page: 0, size: 1 } })
.pipe(
switchMap(checkData => {
const size = 500;
const numOfPages = Math.ceil(checkData.totalElements / size);
const parallelList: Observable<PageResponseModel<MyRoleModel>>[] = [];
for (let page = 0; page < numOfPages; page++) {
parallelList.push(this.getListByPageSize({ page, size }));
}
return forkJoin(parallelList).pipe(
map(response => response.flatMap(r => r.content))
);
})
);
}
create(body: RoleModel): Observable<ResponseModel> {
return this.http.post<ResponseModel>(this.urlApi, new MyRoleModel(body));
}
delete(body: RoleModel): Observable<ResponseModel> {
const options = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
body: new MyRoleModel(body)
};
return this.http.delete<ResponseModel>(this.urlApi, options);
}
deleteroleById(roleId: number) {
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
body: {roleId : roleId},
};
return this.http.delete(this.urlApi, options)
}
}
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from '../../../../environments/environment';
import { ResponseModel, PageResponseModel } from '../../models/base.model';
import { ProfileModel, MyProfileModel } from '../../models/mylearn/user.model';
import { UserAccountModel, MyUserAccountModel } from '../../models/mylearn/user-account.model';
import { map } from 'rxjs/operators';
import { TranslateService } from '@ngx-translate/core';
@Injectable({
providedIn: 'root'
})
export class UserService {
private urlApi = environment.baseUrls + "/users";
constructor(
private http: HttpClient,
private translate: TranslateService
) { }
getAll(): Observable<MyProfileModel[]> {
return this.http.get<ProfileModel[]>(this.urlApi).pipe(
map(list => list.map(e => new MyProfileModel(e, this.translate)))
);
}
getByUsername(username: string): Observable<MyProfileModel> {
return this.http.get<ProfileModel>(`${this.urlApi}/${username}`).pipe(
map(e => new MyProfileModel(e, this.translate))
);
}
getLists(): Observable<MyProfileModel[]> {
return this.http.get<ProfileModel[]>(`${this.urlApi}/lists`).pipe(
map(list => list.map(e => new MyProfileModel(e, this.translate)))
);
}
getListsByCompany(companyId: string): Observable<MyUserAccountModel[]> {
return this.http
.get<UserAccountModel[]>(`${this.urlApi}/lists?companyId=${companyId}`)
.pipe(map(list => list.map(e => new MyUserAccountModel(e, this.translate))));
}
// create(user: ProfileModel): Observable<ResponseModel> {
// return this.http.post<ResponseModel>(this.urlApi, new MyProfileModel(user));
// }
save(user: UserAccountModel): Observable<ResponseModel> {
return this.http.post<ResponseModel>(this.urlApi, new MyUserAccountModel (user));
}
delete(user: ProfileModel): Observable<ResponseModel> {
const options = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
body: new MyProfileModel(user),
};
return this.http.delete<ResponseModel>(this.urlApi, options);
}
deleteById(memberId: string): Observable<ResponseModel> {
const options = {
headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
body: { memberId },
};
return this.http.delete<ResponseModel>(this.urlApi, options);
}
changePassword(username: string, newPassword: string): Observable<ResponseModel> {
return this.http.post<ResponseModel>(`${this.urlApi}/change-password`, {
username,
newPassword,
});
}
}
......@@ -221,10 +221,28 @@ export class NavService implements OnDestroy {
title: 'จัดการ PDPA',
type: 'link',
},
// {
// icon: 'receipt',
// path: '/mylearn/user-company',
// title: 'จัดการบริษัท',
// type: 'link',
// },
{
icon: 'news bx-flip-horizontal',
path: '/mylearn/myhrcompany',
title: 'จัดการบริษัท',
type: 'link',
},
{
icon: 'receipt',
path: '/mylearn/dashboard',
title: 'dashboard',
path: '/mylearn/management-user',
title: 'การจัดการผู้ใช้งาน',
type: 'link',
},
{
icon: 'receipt',
path: '/mylearn/course-transfer',
title: 'โอนย้ายคอร์ส',
type: 'link',
},
...this.createPortalMenu('mylearn')
......
......@@ -4,6 +4,9 @@
export const environment = {
production: false,
baseUrl: 'https://myjob-uat.myhr.co.th/api',
baseUrls: 'https://mylearn-uat.myhr.co.th/api',
// baseScormUrl: 'http://localhost/vsscorm',
// api: '9357268c262a35e41df4cb3774d28301',
url: 'https://portal.myhr.co.th/api/',
jbossUrl: 'https://hrplus.myhr.co.th/hr', //add
portalFixedToken: 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBdXRoIiwidWlkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0Iiwicm9sZSI6InVzZXIiLCJpc3MiOiJDb21wdXRlciBTY2llbmNlIENvcnBvcmF0aW9uIExpbWl0ZWQiLCJmdWxsTmFtZSI6InRlZXJhZGFjaCBrdWhhdGFuYXNhdGllbiIsIm1lbWJlcklkIjoiOGFhNDUzMzAtMzE0Yy0xMWU3LWJhZjMtMmQ3ZDA5ODc3NzQ0In0.FO7u8g7KfzkmZFTuuniBCEQxduPjcvzMbH7iug3DT90',
......
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