Commit 5172e66d by Nattana Chaiyamat

ทะเบียนเครื่องมือ

parent f61fc5dd
...@@ -178,7 +178,7 @@ export class UserSettingsComponent { ...@@ -178,7 +178,7 @@ export class UserSettingsComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.user.loading = true this.user.loading = true
this.fileService.upload(formData, 'muser').subscribe({ this.fileService.uploadExcel(formData, 'muser').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -195,7 +195,7 @@ export class UserSettingsComponent { ...@@ -195,7 +195,7 @@ export class UserSettingsComponent {
} }
downloadFile() { downloadFile() {
const fileName = 'IMPORT_USER.xlsx' const fileName = 'IMPORT_USER.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -65,7 +65,7 @@ export class DepartmentListComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class DepartmentListComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu2ListLoading = true this.bu2ListLoading = true
this.fileService.upload(formData, 'mbu2').subscribe({ this.fileService.uploadExcel(formData, 'mbu2').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -83,7 +83,7 @@ export class DepartmentListComponent implements OnInit { ...@@ -83,7 +83,7 @@ export class DepartmentListComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -42,7 +42,7 @@ export class DepartmentRegisterComponent implements OnInit { ...@@ -42,7 +42,7 @@ export class DepartmentRegisterComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu1ListLoading = true this.bu1ListLoading = true
this.fileService.upload(formData, 'mbu1').subscribe({ this.fileService.uploadExcel(formData, 'mbu1').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -60,7 +60,7 @@ export class DepartmentRegisterComponent implements OnInit { ...@@ -60,7 +60,7 @@ export class DepartmentRegisterComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -66,7 +66,7 @@ export class SectionRegistrationComponent implements OnInit { ...@@ -66,7 +66,7 @@ export class SectionRegistrationComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu3ListLoading = true this.bu3ListLoading = true
this.fileService.upload(formData, 'mbu3').subscribe({ this.fileService.uploadExcel(formData, 'mbu3').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -84,7 +84,7 @@ export class SectionRegistrationComponent implements OnInit { ...@@ -84,7 +84,7 @@ export class SectionRegistrationComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -66,7 +66,7 @@ export class SubDepartmentFourComponent implements OnInit { ...@@ -66,7 +66,7 @@ export class SubDepartmentFourComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu7ListLoading = true this.bu7ListLoading = true
this.fileService.upload(formData, 'mbu7').subscribe({ this.fileService.uploadExcel(formData, 'mbu7').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -84,7 +84,7 @@ export class SubDepartmentFourComponent implements OnInit { ...@@ -84,7 +84,7 @@ export class SubDepartmentFourComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -66,7 +66,7 @@ export class SubDepartmentOneComponent implements OnInit { ...@@ -66,7 +66,7 @@ export class SubDepartmentOneComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu4ListLoading = true this.bu4ListLoading = true
this.fileService.upload(formData, 'mbu4').subscribe({ this.fileService.uploadExcel(formData, 'mbu4').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -84,7 +84,7 @@ export class SubDepartmentOneComponent implements OnInit { ...@@ -84,7 +84,7 @@ export class SubDepartmentOneComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -66,7 +66,7 @@ export class SubDepartmentThreeComponent implements OnInit { ...@@ -66,7 +66,7 @@ export class SubDepartmentThreeComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu6ListLoading = true this.bu6ListLoading = true
this.fileService.upload(formData, 'mbu6').subscribe({ this.fileService.uploadExcel(formData, 'mbu6').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -84,7 +84,7 @@ export class SubDepartmentThreeComponent implements OnInit { ...@@ -84,7 +84,7 @@ export class SubDepartmentThreeComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -65,7 +65,7 @@ export class SubDepartmentTwoComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class SubDepartmentTwoComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.bu5ListLoading = true this.bu5ListLoading = true
this.fileService.upload(formData, 'mbu5').subscribe({ this.fileService.uploadExcel(formData, 'mbu5').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -83,7 +83,7 @@ export class SubDepartmentTwoComponent implements OnInit { ...@@ -83,7 +83,7 @@ export class SubDepartmentTwoComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_BU.xlsx' const fileName = 'IMPORT_BU.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -142,7 +142,7 @@ export class CompanyRegistrationPageComponent { ...@@ -142,7 +142,7 @@ export class CompanyRegistrationPageComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, '').subscribe({ this.fileService.uploadExcel(formData, '').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -161,7 +161,7 @@ export class CompanyRegistrationPageComponent { ...@@ -161,7 +161,7 @@ export class CompanyRegistrationPageComponent {
} }
downloadFile() { downloadFile() {
const fileName = '.xlsx' const fileName = '.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -98,7 +98,7 @@ export class SubEmployeeRegistrationComponent { ...@@ -98,7 +98,7 @@ export class SubEmployeeRegistrationComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.employee.loading = true this.employee.loading = true
this.fileService.upload(formData, '').subscribe({ this.fileService.uploadExcel(formData, '').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -117,7 +117,7 @@ export class SubEmployeeRegistrationComponent { ...@@ -117,7 +117,7 @@ export class SubEmployeeRegistrationComponent {
} }
downloadFile() { downloadFile() {
const fileName = 'IMPORT_MPOSITION.xlsx' const fileName = 'IMPORT_MPOSITION.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -54,7 +54,7 @@ export class EmployeeCategories { ...@@ -54,7 +54,7 @@ export class EmployeeCategories {
const formData = new FormData(); const formData = new FormData();
this.dataLoading = true this.dataLoading = true
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.fileService.upload(formData, 'employment_type').subscribe({ this.fileService.uploadExcel(formData, 'employment_type').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -74,7 +74,7 @@ export class EmployeeCategories { ...@@ -74,7 +74,7 @@ export class EmployeeCategories {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_MEMPLOYMENTTYPE.xlsx' const fileName = 'IMPORT_MEMPLOYMENTTYPE.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -55,7 +55,7 @@ export class EmployeeGroupUnit implements OnInit { ...@@ -55,7 +55,7 @@ export class EmployeeGroupUnit implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, 'mgroup').subscribe({ this.fileService.uploadExcel(formData, 'mgroup').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -73,7 +73,7 @@ export class EmployeeGroupUnit implements OnInit { ...@@ -73,7 +73,7 @@ export class EmployeeGroupUnit implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_MGROUP.xlsx' const fileName = 'IMPORT_MGROUP.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -56,7 +56,7 @@ export class EmployeeLevel implements OnInit { ...@@ -56,7 +56,7 @@ export class EmployeeLevel implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, 'pl').subscribe({ this.fileService.uploadExcel(formData, 'pl').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -76,7 +76,7 @@ export class EmployeeLevel implements OnInit { ...@@ -76,7 +76,7 @@ export class EmployeeLevel implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_PL.xlsx' const fileName = 'IMPORT_PL.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -55,7 +55,7 @@ export class PositionUnitComponent implements OnInit { ...@@ -55,7 +55,7 @@ export class PositionUnitComponent implements OnInit {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, 'mposition').subscribe({ this.fileService.uploadExcel(formData, 'mposition').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -75,7 +75,7 @@ export class PositionUnitComponent implements OnInit { ...@@ -75,7 +75,7 @@ export class PositionUnitComponent implements OnInit {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_MPOSITION.xlsx' const fileName = 'IMPORT_MPOSITION.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -560,7 +560,7 @@ ...@@ -560,7 +560,7 @@
<div class="flex justify-end"> <div class="flex justify-end">
<ng-container *ngIf="modalStatus=='add'||modalStatus=='edit'"> <ng-container *ngIf="modalStatus=='add'||modalStatus=='edit'">
<button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger" <button type="button" class="hs-dropdown-toggle ti-modal-clode-btn text-danger"
data-hs-overlay="#competency-topic-page-alert-modal"> data-hs-overlay="#competency-topic-page-modal">
<span class="sr-only">Close</span> <span class="sr-only">Close</span>
<i class="ti ti-circle-x fs-xxl"></i> <i class="ti ti-circle-x fs-xxl"></i>
</button> </button>
......
...@@ -87,7 +87,7 @@ export class CompetencyTopic { ...@@ -87,7 +87,7 @@ export class CompetencyTopic {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, 'competency_topic').subscribe({ this.fileService.uploadExcel(formData, 'competency_topic').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -108,7 +108,7 @@ export class CompetencyTopic { ...@@ -108,7 +108,7 @@ export class CompetencyTopic {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_COMPETENCY_TOPIC.xlsx' const fileName = 'IMPORT_COMPETENCY_TOPIC.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -60,7 +60,7 @@ export class TypeRegistration { ...@@ -60,7 +60,7 @@ export class TypeRegistration {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.dataLoading = true this.dataLoading = true
this.fileService.upload(formData, 'competency_type').subscribe({ this.fileService.uploadExcel(formData, 'competency_type').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -80,7 +80,7 @@ export class TypeRegistration { ...@@ -80,7 +80,7 @@ export class TypeRegistration {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_COMPETENCY_TYPE.xlsx' const fileName = 'IMPORT_COMPETENCY_TYPE.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
</a> </a>
</nav> </nav>
</div> </div>
<div class="mt-3 px-3rem !-mt-3 pt-50px"> <div class="mt-3 px-2rem !-mt-3 pt-50px">
<div id="underline-1" role="tabpanel" aria-labelledby="underline-item-1"> <div id="underline-1" role="tabpanel" aria-labelledby="underline-item-1">
<app-assessment-tool [pathTitle]="pathTitle" <app-assessment-tool></app-assessment-tool>
(sendPathTitle)="pathTitle=$event"></app-assessment-tool>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -92,7 +92,7 @@ export class SubJobCompetencyComponent { ...@@ -92,7 +92,7 @@ export class SubJobCompetencyComponent {
const formData = new FormData(); const formData = new FormData();
formData.append('file', this.selectedFile); formData.append('file', this.selectedFile);
this.loading = true this.loading = true
this.fileService.upload(formData, 'MJOBCODE_COMPETENCY').subscribe({ this.fileService.uploadExcel(formData, 'MJOBCODE_COMPETENCY').subscribe({
next: response => { next: response => {
if (response.success) { if (response.success) {
this.showAlert(response.message, 'success') this.showAlert(response.message, 'success')
...@@ -111,7 +111,7 @@ export class SubJobCompetencyComponent { ...@@ -111,7 +111,7 @@ export class SubJobCompetencyComponent {
downloadFile() { downloadFile() {
const fileName = 'IMPORT_MJOBCODEV2.xlsx' const fileName = 'IMPORT_MJOBCODEV2.xlsx'
this.fileService.download(fileName).subscribe({ this.fileService.downloadTemplate(fileName).subscribe({
next: response => { next: response => {
const url = window.URL.createObjectURL(response); const url = window.URL.createObjectURL(response);
const a = document.createElement("a"); const a = document.createElement("a");
......
...@@ -13,12 +13,12 @@ export class MyAssessmentModel implements AssessmentModel { ...@@ -13,12 +13,12 @@ export class MyAssessmentModel implements AssessmentModel {
edesc: string edesc: string
tdesc: string tdesc: string
shortName: string shortName: string
constructor(data: Partial<AssessmentModel>) { constructor(data?: Partial<AssessmentModel>) {
this.assessmentId = data.assessmentId || "" this.assessmentId = data?.assessmentId || ""
this.companyId = data.companyId || "" this.companyId = data?.companyId || ""
this.edesc = data.edesc || "" this.edesc = data?.edesc || ""
this.tdesc = data.tdesc || "" this.tdesc = data?.tdesc || ""
this.shortName = data.shortName || "" this.shortName = data?.shortName || ""
} }
} }
...@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core'; ...@@ -3,6 +3,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment'; import { environment } from 'src/environments/environment';
import { AssessmentModel } from '../model/assessment.model'; import { AssessmentModel } from '../model/assessment.model';
import { AlertModel } from '../model/alert.model';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
...@@ -17,16 +18,16 @@ export class AssessmentService { ...@@ -17,16 +18,16 @@ export class AssessmentService {
getList(): Observable<AssessmentModel[]> { getList(): Observable<AssessmentModel[]> {
return this.http.get<AssessmentModel[]>(this.urlApi + "/lists") return this.http.get<AssessmentModel[]>(this.urlApi + "/lists")
} }
post(body: AssessmentModel) { post(body: AssessmentModel): Observable<AlertModel> {
return this.http.post(this.urlApi, body) return this.http.post<AlertModel>(this.urlApi, body)
} }
delete(body: AssessmentModel) { delete(body: AssessmentModel): Observable<AlertModel> {
const options = { const options = {
headers: new HttpHeaders({ headers: new HttpHeaders({
"Content-Type": "application/json", "Content-Type": "application/json",
}), }),
body: body body: body
}; };
return this.http.delete(this.urlApi, options) return this.http.delete<AlertModel>(this.urlApi, options)
} }
} }
\ No newline at end of file
...@@ -10,10 +10,10 @@ export class FileService { ...@@ -10,10 +10,10 @@ export class FileService {
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
upload(formData: any, table: string): Observable<AlertModel> { uploadExcel(formData: any, table: string): Observable<AlertModel> {
return this.http.post<AlertModel>(environment.baseUrl + '/import/excel/' + table, formData) return this.http.post<AlertModel>(environment.baseUrl + '/import/excel/' + table, formData)
} }
download(fileName: string) { downloadTemplate(fileName: string) {
return this.http.get("/assets/template/" + fileName, { responseType: "blob" }) return this.http.get("/assets/template/" + fileName, { responseType: "blob" })
} }
} }
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