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>
|
2019-10-18 19:36:30 +00:00
|
|
|
<form name="form" vn-http-submit="watcher.submit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Comercial Name"
|
|
|
|
ng-model="$ctrl.client.name"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Contact"
|
|
|
|
ng-model="$ctrl.client.contact"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Email"
|
|
|
|
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>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
ng-model="$ctrl.client.salesPersonFk"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Clients/activeWorkersWithRole"
|
2019-10-18 19:36:30 +00:00
|
|
|
show-field="nickname"
|
|
|
|
search-function="{firstName: $search}"
|
|
|
|
value-field="id"
|
|
|
|
where="{role: 'employee'}"
|
|
|
|
label="Salesperson"
|
|
|
|
vn-acl="salesAssistant">
|
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-autocomplete
|
|
|
|
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>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
|
|
|
<vn-submit label="Save"></vn-submit>
|
|
|
|
<vn-button label="Undo changes" ng-if="watcher.dataChanged()" ng-click="watcher.loadOriginalData()"></vn-button>
|
|
|
|
</vn-button-bar>
|
2017-01-31 13:13:06 +00:00
|
|
|
</form>
|