Commit 42d22de4 by Nakarin Luankla

Merge branch 'DEV' of https://mygit.myhr.co.th/angular/myAppraisal into DEV

parents b2001f7f 0c259e86
...@@ -31,6 +31,7 @@ import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model'; ...@@ -31,6 +31,7 @@ import { Bu6Model, MyBu6Model } from 'src/app/shared/model/bu6.model';
import { Bu7Model, MyBu7Model } from 'src/app/shared/model/bu7.model'; import { Bu7Model, MyBu7Model } from 'src/app/shared/model/bu7.model';
import { EmpStatusService } from 'src/app/shared/services/emp-status.service'; import { EmpStatusService } from 'src/app/shared/services/emp-status.service';
import { StatusModel, MyStatusModel } from 'src/app/shared/model/status.model'; import { StatusModel, MyStatusModel } from 'src/app/shared/model/status.model';
import { MyBossModel } from 'src/app/shared/model/boss.model';
export interface DataEmployee { export interface DataEmployee {
loading: boolean loading: boolean
select: EmployeeModel | any select: EmployeeModel | any
...@@ -112,12 +113,6 @@ export class SubEmployeeRegistrationComponent { ...@@ -112,12 +113,6 @@ export class SubEmployeeRegistrationComponent {
this.getEmployeeList() this.getEmployeeList()
this.getEmpGroupList() this.getEmpGroupList()
this.getBu1List() this.getBu1List()
this.getBu2List()
this.getBu3List()
this.getBu4List()
this.getBu5List()
this.getBu6List()
this.getBu7List()
this.getPositionList() this.getPositionList()
this.getJobcodeList() this.getJobcodeList()
this.getBranchList() this.getBranchList()
...@@ -304,10 +299,24 @@ export class SubEmployeeRegistrationComponent { ...@@ -304,10 +299,24 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu1(data?: Bu1Model) {
this.employee.select.bu1 = new MyBu1Model(data)
this.employee.select.bu2 = new MyBu2Model()
this.employee.select.bu3 = new MyBu3Model()
this.employee.select.bu4 = new MyBu4Model()
this.employee.select.bu5 = new MyBu5Model()
this.employee.select.bu6 = new MyBu6Model()
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu1.bu1id) {
this.getBu2List()
} else {
this.bu2.dataList = []
}
}
getBu2List() { getBu2List() {
this.bu2.loading = false this.bu2.loading = false
this.bu2Service.getList().subscribe({ this.bu2Service.getListByParent(this.employee.select.bu1.bu1id).subscribe({
next: response => { next: response => {
this.bu2.dataList = response.map((x: any) => new MyBu2Model(x)) this.bu2.dataList = response.map((x: any) => new MyBu2Model(x))
this.bu2.loading = false this.bu2.loading = false
...@@ -324,10 +333,23 @@ export class SubEmployeeRegistrationComponent { ...@@ -324,10 +333,23 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu2(data?: Bu2Model) {
this.employee.select.bu2 = new MyBu2Model(data)
this.employee.select.bu3 = new MyBu3Model()
this.employee.select.bu4 = new MyBu4Model()
this.employee.select.bu5 = new MyBu5Model()
this.employee.select.bu6 = new MyBu6Model()
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu2.bu2id) {
this.getBu3List()
} else {
this.bu3.dataList = []
}
}
getBu3List() { getBu3List() {
this.bu3.loading = false this.bu3.loading = false
this.bu3Service.getList().subscribe({ this.bu3Service.getListByParent(this.employee.select.bu2.bu2id).subscribe({
next: response => { next: response => {
this.bu3.dataList = response.map((x: any) => new MyBu3Model(x)) this.bu3.dataList = response.map((x: any) => new MyBu3Model(x))
this.bu3.loading = false this.bu3.loading = false
...@@ -344,10 +366,22 @@ export class SubEmployeeRegistrationComponent { ...@@ -344,10 +366,22 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu3(data?: Bu3Model) {
this.employee.select.bu3 = new MyBu3Model(data)
this.employee.select.bu4 = new MyBu4Model()
this.employee.select.bu5 = new MyBu5Model()
this.employee.select.bu6 = new MyBu6Model()
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu3.bu3id) {
this.getBu4List()
} else {
this.bu4.dataList = []
}
}
getBu4List() { getBu4List() {
this.bu4.loading = false this.bu4.loading = false
this.bu4Service.getList().subscribe({ this.bu4Service.getListByParent(this.employee.select.bu3.bu3id).subscribe({
next: response => { next: response => {
this.bu4.dataList = response.map((x: any) => new MyBu4Model(x)) this.bu4.dataList = response.map((x: any) => new MyBu4Model(x))
this.bu4.loading = false this.bu4.loading = false
...@@ -364,10 +398,21 @@ export class SubEmployeeRegistrationComponent { ...@@ -364,10 +398,21 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu4(data?: Bu4Model) {
this.employee.select.bu4 = new MyBu4Model(data)
this.employee.select.bu5 = new MyBu5Model()
this.employee.select.bu6 = new MyBu6Model()
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu4.bu4id) {
this.getBu5List()
} else {
this.bu5.dataList = []
}
}
getBu5List() { getBu5List() {
this.bu5.loading = false this.bu5.loading = false
this.bu5Service.getList().subscribe({ this.bu5Service.getListByParent(this.employee.select.bu4.bu4id).subscribe({
next: response => { next: response => {
this.bu5.dataList = response.map((x: any) => new MyBu5Model(x)) this.bu5.dataList = response.map((x: any) => new MyBu5Model(x))
this.bu5.loading = false this.bu5.loading = false
...@@ -384,10 +429,20 @@ export class SubEmployeeRegistrationComponent { ...@@ -384,10 +429,20 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu5(data?: Bu5Model) {
this.employee.select.bu5 = new MyBu5Model(data)
this.employee.select.bu6 = new MyBu6Model()
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu5.bu5id) {
this.getBu6List()
} else {
this.bu6.dataList = []
}
}
getBu6List() { getBu6List() {
this.bu6.loading = false this.bu6.loading = false
this.bu6Service.getList().subscribe({ this.bu6Service.getListByParent(this.employee.select.bu5.bu5id).subscribe({
next: response => { next: response => {
this.bu6.dataList = response.map((x: any) => new MyBu6Model(x)) this.bu6.dataList = response.map((x: any) => new MyBu6Model(x))
this.bu6.loading = false this.bu6.loading = false
...@@ -404,10 +459,19 @@ export class SubEmployeeRegistrationComponent { ...@@ -404,10 +459,19 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu6(data?: Bu6Model) {
this.employee.select.bu6 = new MyBu6Model(data)
this.employee.select.bu7 = new MyBu7Model()
if (this.employee.select.bu6.bu6id) {
this.getBu7List()
} else {
this.bu7.dataList = []
}
}
getBu7List() { getBu7List() {
this.bu7.loading = false this.bu7.loading = false
this.bu7Service.getList().subscribe({ this.bu7Service.getListByParent(this.employee.select.bu6.bu6id).subscribe({
next: response => { next: response => {
this.bu7.dataList = response.map((x: any) => new MyBu7Model(x)) this.bu7.dataList = response.map((x: any) => new MyBu7Model(x))
this.bu7.loading = false this.bu7.loading = false
...@@ -424,6 +488,9 @@ export class SubEmployeeRegistrationComponent { ...@@ -424,6 +488,9 @@ export class SubEmployeeRegistrationComponent {
x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) || x.tdesc.toLowerCase().includes(this.modal.search.toLowerCase()) ||
x.edesc.toLowerCase().includes(this.modal.search.toLowerCase())) x.edesc.toLowerCase().includes(this.modal.search.toLowerCase()))
} }
selectBu7(data?: Bu7Model) {
this.employee.select.bu7 = new MyBu7Model(data)
}
getEmpGroupList() { getEmpGroupList() {
this.empGroup.loading = false this.empGroup.loading = false
...@@ -518,15 +585,18 @@ export class SubEmployeeRegistrationComponent { ...@@ -518,15 +585,18 @@ export class SubEmployeeRegistrationComponent {
} }
selectEmployee(data?: EmployeeModel) { selectEmployee(data?: EmployeeModel) {
if (this.modalType == 'update' && !data) { if (this.modalType == 'update' && !data) {
this.employee.select = { ...new MyEmployeeModel({ employeeId: this.employee.select.employeeId }), dateIso: '', dateEndIso: '' } this.employee.select = { ...new MyEmployeeModel({ employeeId: this.employee.select.employeeId }), dateIso: '', dateEndIso: '2100-12-31' }
this.employee.select.status = new MyStatusModel(this.empStatus.dataList[0]) this.employee.select.status = new MyStatusModel(this.empStatus.dataList[0])
} else { } else {
this.employee.select = { ...new MyEmployeeModel(data || {}), dateIso: this.toISODate(data?.firstHireDate), dateEndIso: this.toISODate(data?.resigndate) } this.employee.select = { ...new MyEmployeeModel(data || {}), dateIso: this.toISODate(data?.firstHireDate), dateEndIso: this.toISODate(data?.resignDate || '2100-12-31') }
if (!this.employee.select.status.statusCode) { if (!this.employee.select.status.statusCode) {
this.employee.select.status = new MyStatusModel(this.empStatus.dataList[0]) this.employee.select.status = new MyStatusModel(this.empStatus.dataList[0])
} }
} }
} }
selectBoss(data: any) {
this.employee.select.boss = new MyBossModel({ ...data, empType: data.empType.codeId })
}
changeDate(target: { [key: string]: any }, field: string, dateIso: string) { changeDate(target: { [key: string]: any }, field: string, dateIso: string) {
target[field] = this.toYYYYMMDD(dateIso) target[field] = this.toYYYYMMDD(dateIso)
} }
...@@ -555,6 +625,7 @@ export class SubEmployeeRegistrationComponent { ...@@ -555,6 +625,7 @@ export class SubEmployeeRegistrationComponent {
selectDataModal(target: { [key: string]: any }, field: string, data: any) { selectDataModal(target: { [key: string]: any }, field: string, data: any) {
target[field] = JSON.parse(JSON.stringify(data)) target[field] = JSON.parse(JSON.stringify(data))
} }
showAlert(text: string, type: 'success' | 'error') { showAlert(text: string, type: 'success' | 'error') {
this.toastr[type](text, 'แจ้งเตือน', { this.toastr[type](text, 'แจ้งเตือน', {
timeOut: 3000, timeOut: 3000,
...@@ -586,7 +657,7 @@ export class SubEmployeeRegistrationComponent { ...@@ -586,7 +657,7 @@ export class SubEmployeeRegistrationComponent {
!this.employee.select.lname || !this.employee.select.lname ||
!this.employee.select.empGroup.groupId || !this.employee.select.empGroup.groupId ||
!this.employee.select.firstHireDate || !this.employee.select.firstHireDate ||
!this.employee.select.resigndate || !this.employee.select.resignDate ||
!this.employee.select.bu1.bu1id || !this.employee.select.bu1.bu1id ||
!this.employee.select.bu2.bu2id || !this.employee.select.bu2.bu2id ||
!this.employee.select.bu3.bu3id || !this.employee.select.bu3.bu3id ||
......
...@@ -27,18 +27,18 @@ export class MyBossModel implements BossModel { ...@@ -27,18 +27,18 @@ export class MyBossModel implements BossModel {
job: JobCodeModel job: JobCodeModel
thFullName: string thFullName: string
engFullName: string engFullName: string
constructor(data: Partial<BossModel>) { constructor(data?: Partial<BossModel>) {
this.employeeId = data.employeeId || "" this.employeeId = data?.employeeId || ""
this.prefix = new MyPrefixModel(data.prefix || {}) this.prefix = new MyPrefixModel(data?.prefix || {})
this.fname = data.fname || "" this.fname = data?.fname || ""
this.lname = data.lname || "" this.lname = data?.lname || ""
this.efname = data.efname || "" this.efname = data?.efname || ""
this.elname = data.elname || "" this.elname = data?.elname || ""
this.empType = data.empType || "" this.empType = data?.empType || ""
this.empPosition = data.empPosition || "" this.empPosition = data?.empPosition || ""
this.job = new MyJobCodeModel(data.job || {}) this.job = new MyJobCodeModel(data?.job || {})
this.thFullName = data.thFullName || "" this.thFullName = data?.thFullName || ""
this.engFullName = data.engFullName || "" this.engFullName = data?.engFullName || ""
} }
} }
...@@ -111,7 +111,7 @@ export interface EmployeeModel { ...@@ -111,7 +111,7 @@ export interface EmployeeModel {
thFullName: string thFullName: string
engFullName: string engFullName: string
pl: PLModel pl: PLModel
resigndate: string resignDate: string
} }
export class MyEmployeeModel implements EmployeeModel { export class MyEmployeeModel implements EmployeeModel {
...@@ -201,7 +201,7 @@ export class MyEmployeeModel implements EmployeeModel { ...@@ -201,7 +201,7 @@ export class MyEmployeeModel implements EmployeeModel {
thFullName: string thFullName: string
engFullName: string engFullName: string
pl: PLModel pl: PLModel
resigndate: string resignDate: string
constructor(data?: Partial<EmployeeModel>) { constructor(data?: Partial<EmployeeModel>) {
this.employeeId = data?.employeeId || "" this.employeeId = data?.employeeId || ""
this.prefix = new MyPrefixModel(data?.prefix || {}) this.prefix = new MyPrefixModel(data?.prefix || {})
...@@ -289,7 +289,7 @@ export class MyEmployeeModel implements EmployeeModel { ...@@ -289,7 +289,7 @@ export class MyEmployeeModel implements EmployeeModel {
this.thFullName = data?.thFullName || "" this.thFullName = data?.thFullName || ""
this.engFullName = data?.engFullName || "" this.engFullName = data?.engFullName || ""
this.pl = new MyPLModel(data?.workarea || {}) this.pl = new MyPLModel(data?.workarea || {})
this.resigndate = data?.resigndate || "" this.resignDate = data?.resignDate || ""
} }
} }
...@@ -26,4 +26,8 @@ export class AppraisalService { ...@@ -26,4 +26,8 @@ export class AppraisalService {
getBossList(): Observable<AppraisalSubordinateModel[]> { getBossList(): Observable<AppraisalSubordinateModel[]> {
return this.http.get<AppraisalSubordinateModel[]>(this.urlApi + "/boss/emp") return this.http.get<AppraisalSubordinateModel[]>(this.urlApi + "/boss/emp")
} }
getFormPmsById(evaluationRoundId: string, apsassessy: string): Observable<AppraisalCompentencyModel2> {
return this.http.get<AppraisalCompentencyModel2>(this.urlApi + "/pms/" + evaluationRoundId + "/" + apsassessy)
}
} }
\ No newline at end of file
...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment'; ...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import { Bu2Model } from '../model/bu2.model'; import { Bu2Model } from '../model/bu2.model';
import { AlertModel } from '../model/alert.model'; import { AlertModel } from '../model/alert.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class Bu2Service { export class Bu2Service {
api = "/bu2" api = "/bu2"
urlApi = environment.baseUrl + this.api urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
getList(): Observable<Bu2Model[]> { getList(): Observable<Bu2Model[]> {
return this.http.get<Bu2Model[]>(this.urlApi + "/lists") return this.http.get<Bu2Model[]>(this.urlApi + "/lists")
} }
getById(bu2id: string): Observable<Bu2Model> { getListByParent(bu1id: string): Observable<Bu2Model[]> {
return this.http.get<Bu2Model>(this.urlApi + "/" + bu2id) return this.http.get<Bu2Model[]>(environment.baseUrl + "/bu1/parent/" + bu1id)
} }
post(body: Bu2Model): Observable<AlertModel> { getById(bu2id: string): Observable<Bu2Model> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.get<Bu2Model>(this.urlApi + "/" + bu2id)
} }
delete(body: Bu2Model[]): Observable<AlertModel> { post(body: Bu2Model): Observable<AlertModel> {
const options = { return this.http.post<AlertModel>(this.urlApi, body)
headers: new HttpHeaders({ }
"Content-Type": "application/json", delete(body: Bu2Model[]): Observable<AlertModel> {
}), const options = {
body: body headers: new HttpHeaders({
}; "Content-Type": "application/json",
return this.http.delete<AlertModel>(this.urlApi, options) }),
} body: body
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
} }
...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment'; ...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import { Bu3Model } from '../model/bu3.model'; import { Bu3Model } from '../model/bu3.model';
import { AlertModel } from '../model/alert.model'; import { AlertModel } from '../model/alert.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class Bu3Service { export class Bu3Service {
api = "/bu3" api = "/bu3"
urlApi = environment.baseUrl + this.api urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
getById(bu3id:string): Observable<Bu3Model> { getById(bu3id: string): Observable<Bu3Model> {
return this.http.get<Bu3Model>(this.urlApi + "/" + bu3id) return this.http.get<Bu3Model>(this.urlApi + "/" + bu3id)
} }
getList(): Observable<Bu3Model[]> { getListByParent(bu2id: string): Observable<Bu3Model[]> {
return this.http.get<Bu3Model[]>(this.urlApi + "/lists") return this.http.get<Bu3Model[]>(environment.baseUrl + "/bu2/parent/" + bu2id)
} }
post(body: Bu3Model): Observable<AlertModel> { getList(): Observable<Bu3Model[]> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.get<Bu3Model[]>(this.urlApi + "/lists")
} }
delete(body: Bu3Model[]): Observable<AlertModel> { post(body: Bu3Model): Observable<AlertModel> {
const options = { return this.http.post<AlertModel>(this.urlApi, body)
headers: new HttpHeaders({ }
"Content-Type": "application/json", delete(body: Bu3Model[]): Observable<AlertModel> {
}), const options = {
body: body headers: new HttpHeaders({
}; "Content-Type": "application/json",
return this.http.delete<AlertModel>(this.urlApi, options) }),
} body: body
} };
\ No newline at end of file return this.http.delete<AlertModel>(this.urlApi, options)
}
}
\ No newline at end of file
...@@ -15,6 +15,9 @@ export class Bu4Service { ...@@ -15,6 +15,9 @@ export class Bu4Service {
getList(): Observable<Bu4Model[]> { getList(): Observable<Bu4Model[]> {
return this.http.get<Bu4Model[]>(this.urlApi + "/lists") return this.http.get<Bu4Model[]>(this.urlApi + "/lists")
} }
getListByParent(bu3id: string): Observable<Bu4Model[]> {
return this.http.get<Bu4Model[]>(environment.baseUrl + "/bu3/parent/" + bu3id)
}
getById(bu4id: string): Observable<Bu4Model> { getById(bu4id: string): Observable<Bu4Model> {
return this.http.get<Bu4Model>(this.urlApi + "/" + bu4id) return this.http.get<Bu4Model>(this.urlApi + "/" + bu4id)
} }
......
...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment'; ...@@ -5,29 +5,32 @@ import { environment } from 'src/environments/environment';
import { Bu5Model } from '../model/bu5.model'; import { Bu5Model } from '../model/bu5.model';
import { AlertModel } from '../model/alert.model'; import { AlertModel } from '../model/alert.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
export class Bu5Service { export class Bu5Service {
api = "/bu5" api = "/bu5"
urlApi = environment.baseUrl + this.api urlApi = environment.baseUrl + this.api
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
getList(): Observable<Bu5Model[]> { getList(): Observable<Bu5Model[]> {
return this.http.get<Bu5Model[]>(this.urlApi + "/lists") return this.http.get<Bu5Model[]>(this.urlApi + "/lists")
} }
getById(bu5id: string): Observable<Bu5Model> { getListByParent(bu4id: string): Observable<Bu5Model[]> {
return this.http.get<Bu5Model>(this.urlApi + "/" + bu5id) return this.http.get<Bu5Model[]>(environment.baseUrl + "/bu4/parent/" + bu4id)
} }
post(body: Bu5Model): Observable<AlertModel> { getById(bu5id: string): Observable<Bu5Model> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.get<Bu5Model>(this.urlApi + "/" + bu5id)
} }
delete(body: Bu5Model[]): Observable<AlertModel> { post(body: Bu5Model): Observable<AlertModel> {
const options = { return this.http.post<AlertModel>(this.urlApi, body)
headers: new HttpHeaders({ }
"Content-Type": "application/json", delete(body: Bu5Model[]): Observable<AlertModel> {
}), const options = {
body: body headers: new HttpHeaders({
}; "Content-Type": "application/json",
return this.http.delete<AlertModel>(this.urlApi, options) }),
} body: body
};
return this.http.delete<AlertModel>(this.urlApi, options)
}
} }
...@@ -15,6 +15,9 @@ export class Bu6Service { ...@@ -15,6 +15,9 @@ export class Bu6Service {
getList(): Observable<Bu6Model[]> { getList(): Observable<Bu6Model[]> {
return this.http.get<Bu6Model[]>(this.urlApi + "/lists") return this.http.get<Bu6Model[]>(this.urlApi + "/lists")
} }
getListByParent(bu5id: string): Observable<Bu6Model[]> {
return this.http.get<Bu6Model[]>(environment.baseUrl + "/bu5/parent/" + bu5id)
}
getById(bu6id: string): Observable<Bu6Model> { getById(bu6id: string): Observable<Bu6Model> {
return this.http.get<Bu6Model>(this.urlApi + "/" + bu6id) return this.http.get<Bu6Model>(this.urlApi + "/" + bu6id)
} }
......
...@@ -15,8 +15,11 @@ export class Bu7Service { ...@@ -15,8 +15,11 @@ export class Bu7Service {
getList(): Observable<Bu7Model[]> { getList(): Observable<Bu7Model[]> {
return this.http.get<Bu7Model[]>(this.urlApi + "/lists") return this.http.get<Bu7Model[]>(this.urlApi + "/lists")
} }
getListByParent(bu6id: string): Observable<Bu7Model[]> {
return this.http.get<Bu7Model[]>(environment.baseUrl + "/parent/" + bu6id)
}
getById(bu7id: string): Observable<Bu7Model> { getById(bu7id: string): Observable<Bu7Model> {
return this.http.get<Bu7Model>(this.urlApi + "/" + bu7id) return this.http.get<Bu7Model>(environment.baseUrl + "/bu6/" + bu7id)
} }
post(body: Bu7Model): Observable<AlertModel> { post(body: Bu7Model): Observable<AlertModel> {
return this.http.post<AlertModel>(this.urlApi, body) return this.http.post<AlertModel>(this.urlApi, body)
......
...@@ -25033,3 +25033,7 @@ div:where(.swal2-container) div:where(.swal2-validation-message) { ...@@ -25033,3 +25033,7 @@ div:where(.swal2-container) div:where(.swal2-validation-message) {
.\!border-red { .\!border-red {
border-color: red !important; border-color: red !important;
} }
.\!bg-white{
background-color: white;
}
\ 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