Compare commits

...

2 Commits

Author SHA1 Message Date
f8e081d7d1 AI Integration successful 2026-07-13 11:27:47 +06:00
21a06545ce sql query changed 2026-07-13 09:11:18 +06:00
3 changed files with 6 additions and 36 deletions

View File

@ -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)
{

View File

@ -17,32 +17,7 @@
<span *ngIf="item.isChart" class="chart-icon">📊</span>
</li>
</ul>
<!--<div class="flex justify-content-between align-items-center">
<div class="flex p-gap-2 align-items-center">
<kendo-dropdownlist
[data]="reportGroups"
[defaultItem]="{ description: 'Select AI Purpose....', value: null }"
[textField]="'description'"
[valueField]="'value'"
[valuePrimitive]="true"
[(ngModel)]="selectedReportGroup"
(valueChange)="onReportGroupChange($event)"
class="w-14rem">
</kendo-dropdownlist>
<button (click)="openAvailableInfoDialog()" [disabled]="selectedReportGroup === null || selectedReportGroup === undefined" kendoButton themeColor="secondary">Field Column</button>
</div>
<div class="flex p-gap-2 align-items-center">
<button [disabled]="selectedReportGroup === null || selectedReportGroup === undefined"
kendoButton themeColor="primary"
(click)="ShowAllQueryLog()">Chat History</button>
<button kendoButton themeColor="primary"
(click)="onCallOpenAI_One()"
(keydown.enter)="handleEnterKey($event)">Execute</button>
</div>
</div>-->
<div class="toolbar-container">
<!-- Left Side -->
<div class="toolbar-left">
<kendo-dropdownlist [data]="reportGroups"
[defaultItem]="{ description: 'Select AI Purpose....', value: null }"
@ -57,20 +32,16 @@
Field Column
</button>
</div>
<!-- Right Side -->
<div class="toolbar-right">
<button [disabled]="selectedReportGroup === null || selectedReportGroup === undefined"
kendoButton themeColor="primary" (click)="ShowAllQueryLog()">
Chat History
</button>
<button kendoButton themeColor="primary" (click)="onCallOpenAI_One()"
(keydown.enter)="handleEnterKey($event)">
Execute
</button>
</div>
</div>
</div>

View File

@ -122,7 +122,7 @@ export class HRMOpenAITestComponent implements OnInit{
}
LoadCurrentUserAllQueryLog(reportGroupType : EnumReportGroupType){
this.loadingpanelService.ShowLoadingPanel = false;
this.loadingpanelService.ShowLoadingPanel = true;
this.opeAiService.GetCurrentUserAllQueryLog(reportGroupType).subscribe(
(resp: any) => {
this.currentUserAllQueryLog = resp;
@ -220,7 +220,7 @@ export class HRMOpenAITestComponent implements OnInit{
return;
}
this.isUserPromptIsNotRelated = false;
this.loadingpanelService.ShowLoadingPanel = false;
this.loadingpanelService.ShowLoadingPanel = true;
this.opeAiService.AskOpenAI(data).subscribe(
(resp: any) => {
this.OpenAIResponce = JSON.parse(resp);
@ -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(
@ -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 !== ""){
@ -549,7 +549,7 @@ export class HRMOpenAITestComponent implements OnInit{
const data = {
oQueryLog : this.currentChat
}
this.loadingpanelService.ShowLoadingPanel = false;
this.loadingpanelService.ShowLoadingPanel = true;
this.opeAiService.ChatShareWithOthers(data).subscribe(
(resp: any) => {
},