Commit 36437990 authored by ari_darmawan's avatar ari_darmawan

add user team sd

parent b641a92c
# VERSION 2.1.0
- add user team sd
\ No newline at end of file
...@@ -115,6 +115,7 @@ export class LogbookComponent implements OnInit { ...@@ -115,6 +115,7 @@ export class LogbookComponent implements OnInit {
this.DashboardCountRequest.start_date = AratakaConfig.BootstrapDateCustomPicker({ ID: '#StartDate', isGet: true, isGetFormat: 'YYYY-MM-DD'}); this.DashboardCountRequest.start_date = AratakaConfig.BootstrapDateCustomPicker({ ID: '#StartDate', isGet: true, isGetFormat: 'YYYY-MM-DD'});
this.DashboardCountRequest.end_date = AratakaConfig.BootstrapDateCustomPicker({ ID: '#EndDate', isGet: true, isGetFormat: 'YYYY-MM-DD' }); this.DashboardCountRequest.end_date = AratakaConfig.BootstrapDateCustomPicker({ ID: '#EndDate', isGet: true, isGetFormat: 'YYYY-MM-DD' });
if(this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport) this.DashboardCountRequest.user_id = null; if(this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport) this.DashboardCountRequest.user_id = null;
else if(this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceDesk) this.DashboardCountRequest.user_id = this._SP.SERVICE_DESK_ID;
this.dashboardListCard = []; this.dashboardListCard = [];
this.isDashboardCardLoading = true; this.isDashboardCardLoading = true;
this.isDashboardCardEmpty = false; this.isDashboardCardEmpty = false;
...@@ -144,7 +145,7 @@ export class LogbookComponent implements OnInit { ...@@ -144,7 +145,7 @@ export class LogbookComponent implements OnInit {
GettingExcelForDashboardDataAPI(_i: number){ GettingExcelForDashboardDataAPI(_i: number){
let userID = null let userID = null
if (this.RoleID == this._SP.PARAM_SPV) userID = null; if (this.RoleID == this._SP.PARAM_SPV) userID = null;
else userID = this._SP.getUserInformation.values.user_id; else userID = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceDesk ? this._SP.SERVICE_DESK_ID : this._SP.getUserInformation.values.user_id;
let request = { let request = {
user_id : userID, user_id : userID,
......
...@@ -349,10 +349,12 @@ export class TabsLogbookComponent implements OnInit, OnChanges { ...@@ -349,10 +349,12 @@ export class TabsLogbookComponent implements OnInit, OnChanges {
GettingTicketReportDataAPI(){ GettingTicketReportDataAPI(){
this.isDisabledButtonSearch = true; this.isDisabledButtonSearch = true;
this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID; this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID;
this.listRequest.user_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.listRequest.user_id; // this.listRequest.user_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.listRequest.user_id;
this.listRequest.roleID = this.RoleID; this.listRequest.roleID = this.RoleID;
this.isLoadingLogbooks = true; this.isLoadingLogbooks = true;
this.isEmptyLogbooks = false; this.isEmptyLogbooks = false;
if (this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceDesk) this.listRequest.user_id = this._SP.SERVICE_DESK_ID;
else if (this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport) this.listRequest.user_id = null
this._DashboardService.ReportTicketLogBook(this.listRequest) this._DashboardService.ReportTicketLogBook(this.listRequest)
.subscribe((result: any) => { .subscribe((result: any) => {
if (result.values.data.length != 0) { if (result.values.data.length != 0) {
...@@ -376,9 +378,10 @@ export class TabsLogbookComponent implements OnInit, OnChanges { ...@@ -376,9 +378,10 @@ export class TabsLogbookComponent implements OnInit, OnChanges {
this.listRequest.field_export = this.fieldExport; this.listRequest.field_export = this.fieldExport;
this.listRequest.is_export = true; this.listRequest.is_export = true;
this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID; this.listRequest.team_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.TeamID;
this.listRequest.user_id = this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport ? null : this.listRequest.user_id;
this.listRequest.roleID = this.RoleID; this.listRequest.roleID = this.RoleID;
if (this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceDesk) this.listRequest.user_id = this._SP.SERVICE_DESK_ID;
else if (this._SP.getUserInformation.values.team_id == this.Env.Team.ServiceReport) this.listRequest.user_id = null
// else this.listRequest.user_id = this._SP.
AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.') AratakaConfig.LoadingPage.showLoading('Please wait.., perparing excel.')
this._DashboardService.downloadFileExcelReportLogBook(this.listRequest) this._DashboardService.downloadFileExcelReportLogBook(this.listRequest)
.subscribe((result: any) => { .subscribe((result: any) => {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
export const environment = { export const environment = {
production: false, production: false,
"APIBASEURL" : "http://crm.nobubank.com/nobucall-api-v2/", "APIBASEURL" : "http://innodev.vnetcloud.com/nobucall-api-v2/",
"MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/", "MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/",
"SITE_NAME" : "Visionet Helpdesk System", "SITE_NAME" : "Visionet Helpdesk System",
"SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227", "SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227",
...@@ -18,6 +18,7 @@ export const environment = { ...@@ -18,6 +18,7 @@ export const environment = {
"ZENDESK_API_URL" : "https://ovo1552295957.zendesk.com/", "ZENDESK_API_URL" : "https://ovo1552295957.zendesk.com/",
"ZENDESK_API_USER" : "xxx", "ZENDESK_API_USER" : "xxx",
"ZENDESK_API_PASS" : "xxx", "ZENDESK_API_PASS" : "xxx",
"Service_desk_ID" : 43,
"API_CRON_USER" : "admin", "API_CRON_USER" : "admin",
"API_CRON_PASS" : "Superm@n123", "API_CRON_PASS" : "Superm@n123",
"Topic" : { "Topic" : {
......
...@@ -24,6 +24,7 @@ var PARAM_SUPPORT = environment.PARAM_SUPPORT ...@@ -24,6 +24,7 @@ var PARAM_SUPPORT = environment.PARAM_SUPPORT
var ZENDESK_API_URL = environment.ZENDESK_API_URL var ZENDESK_API_URL = environment.ZENDESK_API_URL
var ZENDESK_API_USER = environment.ZENDESK_API_USER var ZENDESK_API_USER = environment.ZENDESK_API_USER
var ZENDESK_API_PASS = environment.ZENDESK_API_PASS var ZENDESK_API_PASS = environment.ZENDESK_API_PASS
var SERVICE_DESK_ID = environment.Service_desk_ID
var CATEGORY = environment.category.servicesubcategory_id var CATEGORY = environment.category.servicesubcategory_id
// var API_URL; // var API_URL;
// var API_MICROSERVICE; // var API_MICROSERVICE;
...@@ -1272,6 +1273,7 @@ export class ServiceProxyWeb { ...@@ -1272,6 +1273,7 @@ export class ServiceProxyWeb {
public ZENDESK_API_URL = ZENDESK_API_URL public ZENDESK_API_URL = ZENDESK_API_URL
public ZENDESK_API_USER = ZENDESK_API_USER public ZENDESK_API_USER = ZENDESK_API_USER
public ZENDESK_API_PASS = ZENDESK_API_PASS public ZENDESK_API_PASS = ZENDESK_API_PASS
public SERVICE_DESK_ID = SERVICE_DESK_ID
public APIURL = API_URL; public APIURL = API_URL;
......
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