Commit 60b3d3af authored by ari_darmawan's avatar ari_darmawan

micro service

parent b69829bb
......@@ -13,7 +13,8 @@ import { LoginLogsComponent } from './login-logs/login-logs.component';
import { AdminDashboardLogbooksComponent } from './admin-dashboard-logbooks/admin-dashboard-logbooks.component';
import { AdminUserAgentComponent } from './admin-user-agent/admin-user-agent.component';
import { LogbookComponent } from './logbook/logbook.component';
import { AdminTestPingComponent } from '../admin/admin-test-ping/admin-test-ping.component'
import { AdminTestPingComponent } from '../admin/admin-test-ping/admin-test-ping.component';
import { CreateTicketTestComponent } from '../admin/admin-ticket/create-ticket-test/create-ticket-test.component';
const routes: Routes = [
{
......@@ -68,6 +69,10 @@ const routes: Routes = [
path: 'testing-server',
component: AdminTestPingComponent
},
{
path: 'create-ticket-test',
component: CreateTicketTestComponent
}
];
......
.custom-add-date{
background: transparent;
color: #222;
border-radius: 2px;
border: 1px solid #ccc;
}
.custom-add-date:hover{
background: #FAFAFA;
}
.arataka-custom-autocomplete{
border: 1px solid #cccccc;
padding: 0px;
border-radius: 5px;
margin-top: -5px;
position: absolute;
background: #ffffff !important;
z-index: 999;
width: 90%;
max-height: 260px;
overflow-y: auto;
}
.arataka-chevron-autocomplete{
position: absolute;
z-index: 999;
right: 0;
top: 0;
margin-top: 33px !important;
margin-right: 25px !important;
color: #9E9E9E;
}
.arataka-custom-autocomplete-itemlist{
font-size: 11px;
color: #222;
margin: 7px 0;
cursor: pointer;
padding: 3px 3px;
}
.arataka-custom-autocomplete-itemlist:hover{
background: #1976D2;
border-radius: 3px;
color: #ffffff;
}
.custom-minus-date{
position: absolute;
z-index: 99;
top:0;
right: 0;
height: 18px;
width: 18px;
border: 1px solid #ffffff;
border-radius: 50%;
background: #fff;
font-size: 12px;
color: #D50000;
cursor: pointer;
margin-top: 20px;
margin-right: 7px;
}
.input-information {
width: 100%;
height: 30px;
}
.custom-minus-date:hover{
background: #D50000;
border: 1px solid #D50000;
color: #fff;
}
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CreateTicketTestComponent } from './create-ticket-test.component';
describe('CreateTicketTestComponent', () => {
let component: CreateTicketTestComponent;
let fixture: ComponentFixture<CreateTicketTestComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CreateTicketTestComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CreateTicketTestComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
......@@ -40,6 +40,7 @@ import { PipeDencryptoJs } from '../pipe/pipe-global.pipe';
import { NzSelectModule } from 'ng-zorro-antd';
import { NgZorroAntdModule, NzPopoverModule, NzToolTipModule, NzNotificationModule, NzModalModule } from 'ng-zorro-antd';
import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.component';
import { CreateTicketTestComponent } from './admin-ticket/create-ticket-test/create-ticket-test.component';
@NgModule({
declarations: [
/*PipeSha256,
......@@ -72,6 +73,7 @@ import { AdminTestPingComponent } from './admin-test-ping/admin-test-ping.compon
LogbookComponent,
TabsLogbookComponent,
AdminTestPingComponent,
CreateTicketTestComponent,
],
imports: [
PipeglobalModule,
......
......@@ -4,8 +4,9 @@
export const environment = {
production: false,
"APIBASEURL" : "http://crm.nobubank.com/nobucall-api-v2/",
"MICROSERVICEURL" : "http://crm.nobubank.com/nobucall-api-log/api/v1/",
"APIBASEURL" : "http://innodev.vnetcloud.com/nobucall-api-v2/",
"APIBASEURLREPORT" : "http://innodev.vnetcloud.com/nobucall-api-report/",
"MICROSERVICEURL" : "http://innodev.vnetcloud.com/nobucall-api-log/api/v1/",
"SITE_NAME" : "Visionet Helpdesk System",
"SITE_LOGO" : "https://i0.wp.com/jogorogo.info/wp-content/uploads/2017/07/logo_visionet.png?fit=879%2C227",
"COMPANY_NAME" : "PT. Visionet Data Internasional",
......
......@@ -11,6 +11,7 @@ import { environment } from '../../environments/environment';
//const API_URL = environment.apiUrl;
var API_URL = environment.APIBASEURL;
var API_REPORT_URL = environment.APIBASEURLREPORT;
var API_MICROSERVICE = environment.MICROSERVICEURL;
var ckConfig = environment.ckeConfig;
var SITE_NAME = environment.SITE_NAME;
......@@ -274,33 +275,33 @@ export class TicketService {
if(data.search != ""){
searchQ = '?search=' + data.Search
}
return this.http.get(API_URL +'v3/tickets/bycontact/' + service.getUserInformation.values.user_id + '/'+ data.TeamID + '/'+data.FilterTicket+'/'+data.Page+'/'+data.PerPage+''+searchQ, options);
return this.http.get(API_REPORT_URL +'v3/tickets/bycontact/' + service.getUserInformation.values.user_id + '/'+ data.TeamID + '/'+data.FilterTicket+'/'+data.Page+'/'+data.PerPage+''+searchQ, options);
}else if(data.FilterByContact == 'team'){
var searchQ = ""
if(data.search != ""){
searchQ = '?search=' + data.Search
}
return this.http.get(API_URL +'v3/tickets/bycontactteam/' + Team + '/'+data.FilterTicket+'/'+data.Page+'/'+data.PerPage+''+searchQ, options);
return this.http.get(API_REPORT_URL +'v3/tickets/bycontactteam/' + Team + '/'+data.FilterTicket+'/'+data.Page+'/'+data.PerPage+''+searchQ, options);
}else{
if(data.Search != ""){
//return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/0/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
if(service.getUserInformation.values.team_id == environment.Team.CsCabangBranchAgent){
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + service.getUserInformation.values.user_id + '/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + service.getUserInformation.values.user_id + '/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
}else if(service.getUserInformation.values.team_id == environment.Team.SupervisorNobu){
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/0/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/0/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
}
else{
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + Team + '/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + Team + '/'+data.Page+'/'+data.PerPage+'?search=' + data.Search, options);
}
}else{
if(service.getUserInformation.values.team_id == environment.Team.CsCabangBranchAgent){
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + service.getUserInformation.values.user_id + '/'+data.Page+'/'+data.PerPage+'', options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + service.getUserInformation.values.user_id + '/'+data.Page+'/'+data.PerPage+'', options);
}else if(service.getUserInformation.values.team_id == environment.Team.SupervisorNobu){
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/0/'+data.Page+'/'+data.PerPage+'', options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/0/'+data.Page+'/'+data.PerPage+'', options);
}
else{
return this.http.get(API_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + Team+ '/'+data.Page+'/'+data.PerPage+'', options);
return this.http.get(API_REPORT_URL +'v3/nobutickets/0/'+data.FilterTicket+'/0/0/' + Team+ '/'+data.Page+'/'+data.PerPage+'', options);
}
}
......@@ -436,6 +437,19 @@ export class TicketService {
return this.http.post(API_URL +'v3/ticket/withcontact', data, options);
}
CreateTicketWithContactTest(_data) {
var data = _data
const service = this.injector.get(ServiceProxyWeb)
let headers = new HttpHeaders({
'Content-Type': 'application/json',
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.post(API_URL +'v3/ticket/withcontact-test', data, options);
}
AutoResolveTicket(_data) {
......@@ -477,6 +491,19 @@ export class TicketService {
return this.http.post(API_URL +'v3/ticket/assign/'+ _data.ticket_assign, data, options);
}
CreateTicketAssignTest(_data) {
var data = _data
const service = this.injector.get(ServiceProxyWeb)
let headers = new HttpHeaders({
'Content-Type': 'application/json',
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.post(API_URL +'v3/ticket/assign-test/'+ _data.ticket_assign, data, options);
}
CreateTicketDispatch(_data) {
var data = _data
......@@ -996,7 +1023,7 @@ export class DashboardService {
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.post(API_URL +'v3/dashboard', _data, options);
return this.http.post(API_REPORT_URL +'v3/dashboard', _data, options);
}
......@@ -1033,7 +1060,7 @@ export class DashboardService {
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.post(API_URL +'v3/report/logbook', _data, options);
return this.http.post(API_REPORT_URL +'v3/report/logbook', _data, options);
}
......@@ -1048,7 +1075,7 @@ export class DashboardService {
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.get(API_URL +'v3/report/logbook/category/'+_TeamID, options);
return this.http.get(API_REPORT_URL +'v3/report/logbook/category/'+_TeamID, options);
}
......@@ -1061,7 +1088,7 @@ export class DashboardService {
'Authorization' : 'Bearer '+ service.getUserInformation.values.access_token
});
let options = { headers: headers };
return this.http.post(API_URL +'v3/report/ticketcount', _data, options);
return this.http.post(API_REPORT_URL +'v3/report/ticketcount', _data, options);
}
......@@ -1091,7 +1118,7 @@ export class DashboardService {
responseType: 'arraybuffer'
}
return this.http.post<any>(API_URL +'v3/dashboard/export',_data, requestOptions);
return this.http.post<any>(API_REPORT_URL +'v3/dashboard/export',_data, requestOptions);
}
downloadFileExcelReport(_data: any) :Observable<any> {
......@@ -1123,7 +1150,7 @@ export class DashboardService {
responseType: 'arraybuffer'
}
return this.http.post<any>(API_URL +'v3/report/logbook',_data, requestOptions);
return this.http.post<any>(API_REPORT_URL +'v3/report/logbook',_data, requestOptions);
}
......
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