diff --git a/HRM.DA/DA/OpenAIDA/OpenAIDA.cs b/HRM.DA/DA/OpenAIDA/OpenAIDA.cs index d124bf4..618b80e 100644 --- a/HRM.DA/DA/OpenAIDA/OpenAIDA.cs +++ b/HRM.DA/DA/OpenAIDA/OpenAIDA.cs @@ -84,8 +84,7 @@ namespace HRM.DA { if (reportGroupType == EnumReportGroupType.Salary) { - //sql = SQLParser.MakeSQL("select distinct(Head) as Head from vwEmployeeSalary"); - sql = SQLParser.MakeSQL("SELECT DISTINCT DESCRIPTION AS Head FROM SALARYMONTHLYDETAIL WHERE ITEMGROUP IN (1,2,3,5,8)"); + sql = SQLParser.MakeSQL("select distinct(Head) as Head from vwEmployeeSalary"); } else if(reportGroupType == EnumReportGroupType.Leave) { diff --git a/HRM.UI/ClientApp/src/app/hrmopen-ai/hrmopen-ai-test/hrmopen-aiteast.component.ts b/HRM.UI/ClientApp/src/app/hrmopen-ai/hrmopen-ai-test/hrmopen-aiteast.component.ts index eea5cb9..58a031a 100644 --- a/HRM.UI/ClientApp/src/app/hrmopen-ai/hrmopen-ai-test/hrmopen-aiteast.component.ts +++ b/HRM.UI/ClientApp/src/app/hrmopen-ai/hrmopen-ai-test/hrmopen-aiteast.component.ts @@ -404,7 +404,7 @@ export class HRMOpenAITestComponent implements OnInit{ || this.selectedReportGroup === EnumReportGroupType.Training || this.selectedReportGroup === EnumReportGroupType.Attendance || this.selectedReportGroup === EnumReportGroupType.Leave)){ - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.reportColumnDefinition = []; this.tableColumnDefinition = []; this.opeAiService.GetReportColumnDefinition(this.selectedReportGroup).subscribe( @@ -412,11 +412,11 @@ export class HRMOpenAITestComponent implements OnInit{ this.reportColumnDefinition = resp as any[]; }, (err: any) => { - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.notificationService.showError(err.error, "Error"); }, () => { - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.gridData = []; if (this.reportColumnDefinition && this.reportColumnDefinition.length > 0) { const excludedNormalizedCaptions = new Set(['employeeid']); @@ -452,7 +452,7 @@ export class HRMOpenAITestComponent implements OnInit{ let oQueryLog : OpenAIQueryLog = this.currentUserAllQueryLog.find(x => x.id === id) ?? undefined; if(oQueryLog != undefined){ this.isShowCurrentUserAllQueryLog = false - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.inputUserCommand = oQueryLog.userPrompt; this.selectedReportGroup = oQueryLog.reportGroup; if(oQueryLog.title && oQueryLog.title !== ""){ @@ -481,12 +481,12 @@ export class HRMOpenAITestComponent implements OnInit{ }, (err: any) => { this.isShowCurrentUserAllQueryLog = false - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.notificationService.showError(err.error, "Error"); }, () => { this.isShowCurrentUserAllQueryLog = false - this.loadingpanelService.ShowLoadingPanel = false; + this.loadingpanelService.ShowLoadingPanel = true; this.ProcessOpenAIData(); this.LoadCurrentUserAllQueryLog(this.selectedReportGroup); });