refs #6119 microsip link added #1729

Merged
jorgep merged 23 commits from 6119-addMicrosipLink into dev 2023-10-13 11:15:49 +00:00
17 changed files with 96 additions and 156 deletions
Showing only changes of commit c2a54b8c65 - Show all commits

View File

@ -39,6 +39,7 @@ import './range';
import './input-time'; import './input-time';
import './input-file'; import './input-file';
import './label'; import './label';
import './link-phone';
import './list'; import './list';
import './popover'; import './popover';
import './popup'; import './popup';

View File

@ -0,0 +1,21 @@
<span ng-if="$ctrl.phoneNumber">
<span ng-if="$ctrl.icon" >
<span ng-if="$ctrl.showNumber">
{{ $ctrl.phoneNumber }}
</span>
<a href="{{$ctrl.schemeUrl}}:{{$ctrl.phoneNumber}}">
<vn-icon
flat
round
icon="phone"
title="MicroSIP"
ng-click="$event.stopPropagation();"
>
</vn-icon>
</a>
</span>
<a ng-if="!$ctrl.icon" href="$ctrl.schemeUrl:$ctrl.phoneNumber">
{{ $ctrl.phoneNumber }}
</a>
</span>
<span ng-if="!$ctrl.phoneNumber">-</span>

View File

@ -0,0 +1,21 @@
import ngModule from '../../module';
import './style.scss';
class Controller {
constructor() {
this.phoneNumber = null;
this.icon = true;
this.showNumber = true;
this.schemeUrl = 'tel';
}
}
ngModule.vnComponent('vnLinkPhone', {
template: require('./index.html'),
controller: Controller,
bindings: {
phoneNumber: '<',
icon: '<?',
showNumber: '<?',
schemeUrl: '<?',
}
});

View File

@ -0,0 +1,7 @@
vn-link-phone {
vn-icon {
font-size: 1.1em;
vertical-align: bottom;
}
}

View File

@ -46,25 +46,15 @@
value="{{$ctrl.summary.contact}}"> value="{{$ctrl.summary.contact}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Phone"> <vn-label-value label="Phone">
{{$ctrl.summary.phone}} <vn-link-phone
<a href="tel:{{$ctrl.summary.phone}}"> phone-number="$ctrl.summary.phone"
<vn-icon ></vn-link-phone>
class="tel"
jorgep marked this conversation as resolved
Review

Porqué se repite dos veces el valor del teléfono? Cual es la funcion del componente vnLinkPhone?

Porqué se repite dos veces el valor del teléfono? Cual es la funcion del componente vnLinkPhone?
Review

Antes quería mostrar el número y un icono, pero , ahora solo se mostrará el icono del teléfono.

Antes quería mostrar el número y un icono, pero , ahora solo se mostrará el icono del teléfono.
icon="call"
translate-attr="{title: 'Microsip'}"
>
</vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Mobile"> <vn-label-value label="Mobile">
{{$ctrl.summary.mobile}} <vn-link-phone
<a href="tel:{{$ctrl.summary.mobile}}"> phone-number="$ctrl.summary.mobile"
<vn-icon ></vn-link-phone>
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Email" no-ellipsize <vn-label-value label="Email" no-ellipsize
value="{{$ctrl.listEmails($ctrl.summary.email)}}"> value="{{$ctrl.listEmails($ctrl.summary.email)}}">

View File

@ -11,8 +11,4 @@ vn-client-summary .summary {
font-family: 'salixfont' !important; font-family: 'salixfont' !important;
content: "\e965"; content: "\e965";
} }
vn-icon.tel {
font-size: 1.1em;
vertical-align: bottom;
}
} }

View File

@ -48,17 +48,10 @@
<vn-label-value label="Landed" <vn-label-value label="Landed"
value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy HH:mm'}}"> value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Phone" <vn-label-value label="Phone">
> <vn-link-phone
{{$ctrl.summary.address.phone}} phone-number="$ctrl.summary.address.phone"
<a href="tel:{{$ctrl.summary.address.phone}}"> ></vn-link-phone>
<vn-icon
class="tel"
icon="smartphone"
translate-attr="{title:'Microsip'}"
>
</vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Created from" <vn-label-value label="Created from"
value="{{$ctrl.summary.sourceApp}}"> value="{{$ctrl.summary.sourceApp}}">

View File

@ -17,8 +17,4 @@ vn-order-summary .summary{
} }
} }
} }
vn-icon.tel {
font-size: 1.1em;
vertical-align: bottom;
}
} }

View File

@ -26,15 +26,9 @@
<vn-label-value <vn-label-value
label="Phone" label="Phone"
> >
{{summary.phone}} <vn-link-phone
<a href="tel:{{summary.phone}}" class="tel"> phone-number="summary.phone"
<vn-icon ></vn-link-phone>
class="tel"
icon="call"
translate-attr="{title: 'Microsip'}"
>
</vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value <vn-label-value
label="Worker" label="Worker"

View File

@ -1,14 +1,9 @@
@import "variables"; @import "variables";
vn-roadmap-summary .summary { vn-roadmap-summary .summary {
a:not(.tel) { a:not(vn-link-phone a) {
display: flex; display: flex;
align-items: center; align-items: center;
height: 18.328px; height: 18.328px;
} }
vn-icon.tel {
font-size: 1.1em;
vertical-align: bottom;
}
} }

View File

@ -84,48 +84,28 @@
<vn-label-value label="Address phone" <vn-label-value label="Address phone"
ng-if="$ctrl.summary.address.phone != null" ng-if="$ctrl.summary.address.phone != null"
> >
{{$ctrl.summary.address.phone}} <vn-link-phone
<a href="sip:{{$ctrl.summary.address.phone}}"> phone-number="$ctrl.summary.address.phone"
<vn-icon ></vn-link-phone>
class="tel"
icon="call"
translate-attr="{title: 'Microsip'}"
>
</vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Address mobile" <vn-label-value label="Address mobile"
ng-if="$ctrl.summary.address.mobile != null" ng-if="$ctrl.summary.address.mobile != null"
> >
{{$ctrl.summary.address.mobile}} <vn-link-phone
<a href="sip:{{$ctrl.summary.address.mobile}}"> phone-number="$ctrl.summary.address.mobile"
<vn-icon ></vn-link-phone>
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"
>
</vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Client phone" <vn-label-value label="Client phone"
ng-if="$ctrl.summary.client.phone != null"> ng-if="$ctrl.summary.client.phone != null">
{{$ctrl.summary.client.phone}} <vn-link-phone
<a href="sip:{{$ctrl.summary.client.phone}}"> phone-number="$ctrl.summary.client.phone"
<vn-icon ></vn-link-phone>
class="tel"
icon="phone"
translate-attr="{title: 'Microsip'}"></vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Client mobile" <vn-label-value label="Client mobile"
ng-if="$ctrl.summary.client.mobile != null"> ng-if="$ctrl.summary.client.mobile != null">
{{$ctrl.summary.client.mobile}} <vn-link-phone
<a href="sip:{{$ctrl.summary.client.mobile}}"> phone-number="$ctrl.summary.client.mobile"
<vn-icon ></vn-link-phone>
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"></vn-icon>
</a>
</vn-label-value> </vn-label-value>
<vn-label-value label="Address" no-ellipsize <vn-label-value label="Address" no-ellipsize
value="{{$ctrl.formattedAddress}}"> value="{{$ctrl.formattedAddress}}">

View File

@ -36,34 +36,18 @@
value="{{$ctrl.worker.department.department.name}}"> value="{{$ctrl.worker.department.department.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value <vn-label-value
label="Phone"> label="Phone"
<span ng-if="!$ctrl.worker.phone">-</span> >
<span ng-if="$ctrl.worker.phone"> <vn-link-phone
{{$ctrl.worker.phone}} phone-number=":$ctrl.worker.phone"
<a ></vn-link-phone>
href="tel:{{$ctrl.worker.phone}}">
<vn-icon
class="tel"
icon="phone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</span>
</vn-label-value> </vn-label-value>
<vn-label-value <vn-label-value
label="Extension"> label="Extension"
<span ng-if="!$ctrl.worker.sip.extension">-</span> >
<span ng-if="$ctrl.worker.sip.extension"> <vn-link-phone
{{$ctrl.worker.sip.extension}} phone-number="$ctrl.worker.sip.extension"
<a ></vn-link-phone>
href="tel:{{$ctrl.worker.sip.extension}}">
<vn-icon
class="tel"
icon="phone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</span>
</vn-label-value> </vn-label-value>
</div> </div>
<div class="icons"> <div class="icons">

View File

@ -1,6 +1,5 @@
import ngModule from '../module'; import ngModule from '../module';
import Descriptor from 'salix/components/descriptor'; import Descriptor from 'salix/components/descriptor';
import './style.scss';
class Controller extends Descriptor { class Controller extends Descriptor {
constructor($element, $, $rootScope) { constructor($element, $, $rootScope) {
super($element, $); super($element, $);

View File

@ -1,6 +0,0 @@
vn-worker-descriptor {
vn-icon.tel {
font-size: 1.1em;
vertical-align: bottom;
}
}

View File

@ -43,44 +43,20 @@
</span> </span>
</vn-label-value> </vn-label-value>
<vn-label-value label="Mobile extension"> <vn-label-value label="Mobile extension">
<span ng-show="!worker.mobileExtension">-</span> <vn-link-phone
<span ng-show="worker.mobileExtension"> phone-number="worker.mobileExtension"
{{worker.mobileExtension}} ></vn-link-phone>
<a href="tel:{{worker.mobileExtension}}">
<vn-icon
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</span>
</vn-label-value> </vn-label-value>
<vn-label-value label="Business phone"> <vn-label-value label="Business phone">
<span ng-show="!worker.phone">-</span> <vn-link-phone
<span ng-show="worker.phone"> phone-number="worker.phone"
{{worker.phone}} ></vn-link-phone>
<a href="tel:{{worker.phone}}">
<vn-icon
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</span>
</vn-label-value> </vn-label-value>
<vn-label-value label="Personal phone" <vn-label-value label="Personal phone"
> >
<span ng-show="!worker.client.phone">-</span> <vn-link-phone
<span ng-show="worker.client.phone"> phone-number="worker.client.phone"
{{worker.client.phone}} ></vn-link-phone>
<a href="tel:{{worker.client.phone}}">
<vn-icon
class="tel"
icon="smartphone"
translate-attr="{title: 'Microsip'}"
></vn-icon>
</a>
</span>
</vn-label-value> </vn-label-value>
<vn-label-value label="Locker" <vn-label-value label="Locker"
value="{{worker.locker}}"> value="{{worker.locker}}">

View File

@ -1,6 +1,5 @@
import ngModule from '../module'; import ngModule from '../module';
import Summary from 'salix/components/summary'; import Summary from 'salix/components/summary';
import './style.scss';
class Controller extends Summary { class Controller extends Summary {
get worker() { get worker() {
return this._worker; return this._worker;

View File

@ -1,6 +0,0 @@
vn-worker-summary {
vn-icon.tel {
font-size: 1.1em;
vertical-align: bottom;
}
}