2019-10-24 22:53:53 +00:00
|
|
|
<mg-ajax path="Clients/{{patch.params.id}}" options="vnPatch"></mg-ajax>
|
2017-02-21 15:21:55 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
|
|
|
data="$ctrl.client"
|
|
|
|
form="form"
|
2017-06-03 11:01:47 +00:00
|
|
|
save="patch">
|
2017-02-21 15:21:55 +00:00
|
|
|
</vn-watcher>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="ContactChannels"
|
|
|
|
data="contactChannels">
|
|
|
|
</vn-crud-model>
|
2022-02-23 11:57:43 +00:00
|
|
|
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-18 19:36:30 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
2023-07-13 10:59:39 +00:00
|
|
|
vn-one
|
|
|
|
label="Comercial Name"
|
2019-10-18 19:36:30 +00:00
|
|
|
ng-model="$ctrl.client.name"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2023-07-13 10:59:39 +00:00
|
|
|
<vn-autocomplete
|
2021-06-29 08:51:27 +00:00
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.client.businessTypeFk"
|
|
|
|
url="BusinessTypes"
|
|
|
|
show-field="description"
|
|
|
|
value-field="code"
|
|
|
|
label="Business type">
|
|
|
|
</vn-autocomplete>
|
2019-10-18 19:36:30 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Contact"
|
|
|
|
ng-model="$ctrl.client.contact"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
2023-07-13 10:59:39 +00:00
|
|
|
vn-one
|
|
|
|
label="Email"
|
2019-10-18 19:36:30 +00:00
|
|
|
ng-model="$ctrl.client.email"
|
|
|
|
rule
|
|
|
|
info="You can save multiple emails">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Phone"
|
|
|
|
ng-model="$ctrl.client.phone"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Mobile"
|
|
|
|
ng-model="$ctrl.client.mobile"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2023-07-13 10:59:39 +00:00
|
|
|
<vn-worker-autocomplete
|
2019-10-18 19:36:30 +00:00
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.client.salesPersonFk"
|
2023-07-13 10:59:39 +00:00
|
|
|
departments="['VT']"
|
2019-10-18 19:36:30 +00:00
|
|
|
show-field="nickname"
|
|
|
|
label="Salesperson"
|
2022-02-23 11:57:43 +00:00
|
|
|
vn-acl="salesAssistant">
|
2023-07-13 10:59:39 +00:00
|
|
|
</vn-worker-autocomplete>
|
|
|
|
<vn-autocomplete
|
2019-10-18 19:36:30 +00:00
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.client.contactChannelFk"
|
2020-09-17 18:12:52 +00:00
|
|
|
data="contactChannels"
|
2019-10-18 19:36:30 +00:00
|
|
|
label="Channel">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2021-06-02 15:35:30 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
ng-model="$ctrl.client.transferorFk"
|
2021-09-08 06:39:37 +00:00
|
|
|
url="Clients"
|
2021-06-02 15:35:30 +00:00
|
|
|
search-function="$ctrl.transferorSearchFunction($search)"
|
|
|
|
where="{id: {neq: $ctrl.client.id}}"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Previous client"
|
|
|
|
info="In case of a company succession, specify the grantor company"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2019-10-18 19:36:30 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-13 13:57:42 +00:00
|
|
|
<vn-submit
|
2020-12-15 15:51:36 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 13:57:42 +00:00
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
2020-12-15 15:51:36 +00:00
|
|
|
class="cancel"
|
2020-12-13 13:57:42 +00:00
|
|
|
label="Undo changes"
|
2020-12-15 15:51:36 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 13:57:42 +00:00
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button>
|
2019-10-18 19:36:30 +00:00
|
|
|
</vn-button-bar>
|
2017-01-31 13:13:06 +00:00
|
|
|
</form>
|