Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aeropuertov2-front-framework
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Charles Torres
aeropuertov2-front-framework
Commits
b6cf1368
Commit
b6cf1368
authored
Sep 10, 2020
by
Sebastian Chicoma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correcciones en la sección Informacion general del wizard de agentes
parent
227251a9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
32 deletions
+38
-32
agent-fake-backend.interceptor.ts
...ml/src/app/interceptors/agent-fake-backend.interceptor.ts
+4
-4
agent-routing.module.ts
...ytebot-html/src/app/modules/agent/agent-routing.module.ts
+4
-5
agent-status.pipe.ts
...ebot-html/src/app/modules/agent/pipe/agent-status.pipe.ts
+4
-4
agent-detail.resolver.ts
...l/src/app/modules/agent/resolver/agent-detail.resolver.ts
+1
-1
agent.service.ts
...tebot-html/src/app/modules/agent/service/agent.service.ts
+1
-1
agent-list.component.html
...p/modules/agent/view/agent-list/agent-list.component.html
+1
-1
agent.component.ts
...-html/src/app/modules/agent/view/agent/agent.component.ts
+10
-11
ca-general-information.component.html
...general-information/ca-general-information.component.html
+1
-1
ca-general-information.component.ts
...a-general-information/ca-general-information.component.ts
+9
-3
es.json
projects/bytebot-html/src/assets/i18n/es.json
+3
-1
No files found.
projects/bytebot-html/src/app/interceptors/agent-fake-backend.interceptor.ts
View file @
b6cf1368
...
...
@@ -105,10 +105,10 @@ export class AgentFakeBackendInterceptor implements HttpInterceptor {
// return pagination(body);
case
url
.
indexOf
(
basePath
+
'/connection/data'
)
!==
-
1
&&
method
===
'GET '
:
return
ok
({});
case
url
.
indexOf
(
basePath
+
'/country'
)
!==
-
1
&&
method
===
'GET'
:
return
ok
(
countries
);
case
url
.
indexOf
(
basePath
+
'/'
)
!==
-
1
&&
method
===
'GET'
:
return
ok
(
data
);
//
case url.indexOf(basePath + '/country') !== -1 && method === 'GET':
//
return ok(countries);
//
case url.indexOf(basePath + '/') !== -1 && method === 'GET':
//
return ok(data);
default
:
// pass through any requests not handled above
return
next
.
handle
(
request
);
...
...
projects/bytebot-html/src/app/modules/agent/agent-routing.module.ts
View file @
b6cf1368
...
...
@@ -23,7 +23,6 @@ const routes: Routes = [
//component: AgentDetailComponent,
component
:
AgentComponent
,
resolve
:
{
dataForWizard
:
AgentDataForWizardResolver
,
countryData
:
CountryDataForWizardResolver
},
canActivate
:
[
AuthGuard
,
ResourceAuthGuard
],
canDeactivate
:
[
DirtyGuard
],
...
...
@@ -40,8 +39,8 @@ const routes: Routes = [
//component: AgentDetailComponent,
component
:
AgentComponent
,
resolve
:
{
externalSystem
Detail
:
AgentDetailResolver
,
dataForWizard
:
Agent
DataForWizardResolver
agent
Detail
:
AgentDetailResolver
,
countryData
:
Country
DataForWizardResolver
},
canActivate
:
[
AuthGuard
,
ResourceAuthGuard
],
canDeactivate
:
[
DirtyGuard
],
data
:
...
...
@@ -56,8 +55,8 @@ const routes: Routes = [
//component: AgentDetailComponent,
component
:
AgentComponent
,
resolve
:
{
externalSystem
Detail
:
AgentDetailResolver
,
dataForWizard
:
Agent
DataForWizardResolver
agent
Detail
:
AgentDetailResolver
,
countryData
:
Country
DataForWizardResolver
},
canActivate
:
[
AuthGuard
,
ResourceAuthGuard
],
data
:
...
...
projects/bytebot-html/src/app/modules/agent/pipe/agent-status.pipe.ts
View file @
b6cf1368
...
...
@@ -8,10 +8,10 @@ export class AgentStatusPipe implements PipeTransform {
transform
(
value
:
any
,
...
args
:
any
[]):
any
{
if
(
value
)
{
switch
(
value
)
{
case
'
AC
'
:
return
'label.
active
'
;
case
'
IN
'
:
return
'label.
inactive
'
;
case
'
CR
'
:
return
'label.
created
'
;
case
'
DP
'
:
return
'label.
deployed
'
;
}
}
...
...
projects/bytebot-html/src/app/modules/agent/resolver/agent-detail.resolver.ts
View file @
b6cf1368
...
...
@@ -14,7 +14,7 @@ export class AgentDetailResolver implements Resolve<any> {
):
Observable
<
any
>|
Promise
<
any
>|
any
{
let
code
=
route
.
paramMap
.
get
(
'code'
);
return
this
.
service
.
getResult
(
code
);
}
}
projects/bytebot-html/src/app/modules/agent/service/agent.service.ts
View file @
b6cf1368
...
...
@@ -26,7 +26,7 @@ export class AgentService extends DynaDataService {
}
getCountryDataForWizard
()
{
return
this
.
httpClient
.
get
(
this
.
serviceURL
+
'/countr
y
'
);
return
this
.
httpClient
.
get
(
this
.
serviceURL
+
'/countr
ies
'
);
}
}
projects/bytebot-html/src/app/modules/agent/view/agent-list/agent-list.component.html
View file @
b6cf1368
...
...
@@ -50,7 +50,7 @@
<div
*
ngIf=
"template['name'] !== 'avatar'"
>
<span
class=
"label"
[
ngClass
]="{'
label-success
'
:
item
[
template
['
name
']]
===
'
AC
',
'
label-default
'
:
item
[
template
['
name
']]
===
'
IN
'}"
<span
class=
"label"
[
ngClass
]="{'
label-success
'
:
item
[
template
['
name
']]
===
'
DP
',
'
label-default
'
:
item
[
template
['
name
']]
===
'
CR
'}"
*
ngIf=
"template['name'] === 'status'"
>
{{ item[template['name']] | agentStatus | translate }}
</span>
<span
*
ngIf=
"template['name'] !== 'status'"
>
{{ item[template['name']] }}
</span>
...
...
projects/bytebot-html/src/app/modules/agent/view/agent/agent.component.ts
View file @
b6cf1368
...
...
@@ -34,7 +34,7 @@ export class AgentComponent implements OnInit, IDirty {
@
ViewChild
(
'stepper'
,
{
static
:
true
})
stepper
:
MatStepper
;
externalSystem
Detail
:
any
;
agent
Detail
:
any
;
isLinear
=
true
;
isNew
=
true
;
...
...
@@ -91,24 +91,23 @@ export class AgentComponent implements OnInit, IDirty {
this
.
isNew
=
this
.
_activatedRoute
.
snapshot
.
data
.
mode
===
'create'
;
if
(
this
.
isNew
)
{
this
.
externalSystemDetail
=
{
connections
:
[]
this
.
agentDetail
=
{
};
}
else
{
this
.
externalSystemDetail
=
this
.
_activatedRoute
.
snapshot
.
data
.
externalSystem
Detail
;
this
.
agentDetail
=
this
.
_activatedRoute
.
snapshot
.
data
.
agent
Detail
;
}
let
dataForWizard
=
this
.
_activatedRoute
.
snapshot
.
data
.
dataForWizard
;
//
let dataForWizard = this._activatedRoute.snapshot.data.dataForWizard;
this
.
frequentQuestionsComponent
.
setDataForWizard
(
dataForWizard
);
//
this.frequentQuestionsComponent.setDataForWizard(dataForWizard);
//this.stepsComponent.setDataForWizard(dataForWizard);
//this.entitiesComponent.setDataForWizard(dataForWizard);
this
.
generalInformationComponent
.
buildForm
(
this
.
externalSystem
Detail
);
this
.
frequentQuestionsComponent
.
buildForm
(
this
.
externalSystem
Detail
);
//this.stepsComponent.buildForm(this.
externalSystem
Detail, this.resourceAuth);
//this.entitiesComponent.buildForm(this.
externalSystem
Detail);
//this.summaryComponent.buildForm(this.
externalSystem
Detail);
this
.
generalInformationComponent
.
buildForm
(
this
.
agent
Detail
);
this
.
frequentQuestionsComponent
.
buildForm
(
this
.
agent
Detail
);
//this.stepsComponent.buildForm(this.
agent
Detail, this.resourceAuth);
//this.entitiesComponent.buildForm(this.
agent
Detail);
//this.summaryComponent.buildForm(this.
agent
Detail);
}
...
...
projects/bytebot-html/src/app/modules/agent/view/components/ca-general-information/ca-general-information.component.html
View file @
b6cf1368
...
...
@@ -75,7 +75,7 @@
<div
class=
"col-12"
>
<mat-form-field
class=
"amd-form-control"
>
<mat-select
[
placeholder
]="'
label
.
country
'
|
translate
"
formControlName=
"country"
required
(
selectionChange
)="
onCountryChange
($
event
)"
>
required
(
selectionChange
)="
onCountryChange
($
event
,
true
)"
>
<mat-option
*
ngFor=
"let country of countries"
[
value
]="
country
.
id
"
>
{{country.name | translate}}
</mat-option>
...
...
projects/bytebot-html/src/app/modules/agent/view/components/ca-general-information/ca-general-information.component.ts
View file @
b6cf1368
...
...
@@ -57,6 +57,7 @@ export class CaGeneralInformationComponent implements OnInit {
)
{
this
.
viewMode
=
this
.
_activatedRoute
.
snapshot
.
data
.
mode
===
'view'
;
this
.
countries
=
this
.
_activatedRoute
.
snapshot
.
data
.
countryData
;
this
.
formGroup
=
this
.
formBuilder
.
group
({
name
:
new
FormControl
({
value
:
""
,
disabled
:
this
.
viewMode
}),
...
...
@@ -72,7 +73,6 @@ export class CaGeneralInformationComponent implements OnInit {
}
ngOnInit
()
{
this
.
countries
=
this
.
_activatedRoute
.
snapshot
.
data
.
countryData
;
}
buildForm
(
agentDetail
:
any
)
{
...
...
@@ -88,6 +88,8 @@ export class CaGeneralInformationComponent implements OnInit {
language
:
agentDetail
.
language
,
type
:
agentDetail
.
type
});
this
.
onCountryChange
(
this
.
formGroup
.
controls
.
country
);
}
}
...
...
@@ -125,10 +127,14 @@ export class CaGeneralInformationComponent implements OnInit {
}
}
onCountryChange
(
obj
)
{
onCountryChange
(
obj
,
deleteTimeZone
?:
boolean
)
{
let
selectedCountry
=
obj
.
value
;
this
.
timezones
=
[];
this
.
formGroup
.
controls
[
'timezone'
].
setValue
(
null
);
if
(
deleteTimeZone
)
{
this
.
formGroup
.
controls
[
'timezone'
].
setValue
(
null
);
}
if
(
selectedCountry
)
{
for
(
var
index
in
this
.
countries
)
{
if
(
selectedCountry
===
this
.
countries
[
index
].
id
)
{
...
...
projects/bytebot-html/src/assets/i18n/es.json
View file @
b6cf1368
...
...
@@ -22,5 +22,7 @@
"label.deployment-channels.configuration.description"
:
"Seleccione un canal de despliegue"
,
"label.status.active"
:
"Activo"
,
"label.status.loaded"
:
"Cargado"
,
"label.status.off"
:
"En Baja"
"label.status.off"
:
"En Baja"
,
"label.created"
:
"Creado"
,
"label.deployed"
:
"Desplegado"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment