2017-02-07 11:58:25 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2020-03-09 08:00:03 +00:00
|
|
|
url="Clients/createWithUser"
|
2017-02-21 10:36:43 +00:00
|
|
|
data="$ctrl.client"
|
2020-03-09 08:00:03 +00:00
|
|
|
insert-mode="true"
|
|
|
|
form="form">
|
2017-02-07 11:58:25 +00:00
|
|
|
</vn-watcher>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" vn-http-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
|
|
<vn-card class="vn-pa-lg">
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-two
|
|
|
|
label="Comercial Name"
|
|
|
|
ng-model="$ctrl.client.name"
|
|
|
|
rule
|
|
|
|
vn-focus>
|
|
|
|
</vn-textfield>
|
2023-07-13 10:59:39 +00:00
|
|
|
<vn-worker-autocomplete
|
2020-03-09 08:00:03 +00:00
|
|
|
label="Salesperson"
|
2019-11-10 10:08:44 +00:00
|
|
|
ng-model="$ctrl.client.salesPersonFk"
|
2023-07-13 10:59:39 +00:00
|
|
|
departments="['VT']"
|
|
|
|
show-field="nickname">
|
|
|
|
</vn-worker-autocomplete>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2023-06-12 12:58:28 +00:00
|
|
|
<vn-autocomplete
|
2021-11-12 12:10:11 +00:00
|
|
|
vn-id="businessTypeFk"
|
|
|
|
ng-model="$ctrl.client.businessTypeFk"
|
|
|
|
url="BusinessTypes"
|
|
|
|
show-field="description"
|
|
|
|
value-field="code"
|
|
|
|
label="Business type"
|
|
|
|
rule>
|
|
|
|
</vn-autocomplete>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-textfield
|
|
|
|
label="Tax number"
|
|
|
|
ng-model="$ctrl.client.fi"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2021-11-15 09:16:23 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
label="Business name"
|
|
|
|
ng-model="$ctrl.client.socialName"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2019-11-10 10:08:44 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-two
|
|
|
|
label="Street"
|
|
|
|
ng-model="$ctrl.client.street"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-datalist
|
2019-11-10 10:08:44 +00:00
|
|
|
label="Postcode"
|
|
|
|
ng-model="$ctrl.client.postcode"
|
2020-02-21 11:39:41 +00:00
|
|
|
selection="$ctrl.postcode"
|
2019-11-10 10:08:44 +00:00
|
|
|
url="Postcodes/location"
|
2020-02-21 11:39:41 +00:00
|
|
|
fields="['code','townFk']"
|
2019-11-10 10:08:44 +00:00
|
|
|
order="code, townFk"
|
|
|
|
value-field="code"
|
2020-02-21 11:39:41 +00:00
|
|
|
show-field="code"
|
|
|
|
rule>
|
2019-11-10 10:08:44 +00:00
|
|
|
<tpl-item>
|
2023-06-12 12:58:28 +00:00
|
|
|
{{code}} - {{town.name}} ({{town.province.name}},
|
2020-02-24 10:27:36 +00:00
|
|
|
{{town.province.country.country}})
|
2019-11-10 10:08:44 +00:00
|
|
|
</tpl-item>
|
2020-02-24 10:27:36 +00:00
|
|
|
<append>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New postcode"
|
2020-03-04 11:51:29 +00:00
|
|
|
ng-click="postcode.open()"
|
2023-06-21 11:34:27 +00:00
|
|
|
vn-acl="deliveryAssistant"
|
2020-03-04 11:51:29 +00:00
|
|
|
vn-acl-action="remove">
|
2020-02-24 10:27:36 +00:00
|
|
|
</vn-icon-button>
|
|
|
|
</append>
|
2020-02-21 11:39:41 +00:00
|
|
|
</vn-datalist>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-datalist
|
2023-06-12 12:58:28 +00:00
|
|
|
vn-id="town"
|
2020-03-02 08:30:54 +00:00
|
|
|
label="City"
|
|
|
|
ng-model="$ctrl.client.city"
|
|
|
|
selection="$ctrl.town"
|
2020-10-15 11:59:28 +00:00
|
|
|
url="Towns/location"
|
2020-03-02 08:30:54 +00:00
|
|
|
fields="['id', 'name', 'provinceFk']"
|
|
|
|
value-field="name">
|
|
|
|
<tpl-item>
|
2023-06-12 12:58:28 +00:00
|
|
|
{{name}}, {{province.name}}
|
2020-03-02 08:30:54 +00:00
|
|
|
({{province.country.country}})
|
|
|
|
</tpl-item>
|
|
|
|
</vn-datalist>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-id="province"
|
2020-03-02 08:30:54 +00:00
|
|
|
label="Province"
|
|
|
|
ng-model="$ctrl.client.provinceFk"
|
|
|
|
selection="$ctrl.province"
|
|
|
|
url="Provinces/location"
|
|
|
|
fields="['id', 'name', 'countryFk']"
|
|
|
|
rule>
|
|
|
|
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
|
|
|
</vn-autocomplete>
|
2020-03-09 08:00:03 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-id="country"
|
|
|
|
label="Country"
|
2020-03-02 08:30:54 +00:00
|
|
|
ng-model="$ctrl.client.countryFk"
|
|
|
|
url="Countries"
|
2020-03-09 08:00:03 +00:00
|
|
|
show-field="country">
|
2020-03-02 08:30:54 +00:00
|
|
|
</vn-autocomplete>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
label="Web user"
|
|
|
|
ng-model="$ctrl.client.userName"
|
|
|
|
rule>
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="Email"
|
|
|
|
ng-model="$ctrl.client.email"
|
|
|
|
rule
|
|
|
|
info="You can save multiple emails">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-check
|
|
|
|
label="Is equalizated"
|
|
|
|
ng-model="$ctrl.client.isEqualizated">
|
|
|
|
</vn-check>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-15 15:51:36 +00:00
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Create">
|
|
|
|
</vn-submit>
|
|
|
|
<vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Cancel"
|
|
|
|
ui-sref="client.index">
|
|
|
|
</vn-button>
|
2019-11-10 10:08:44 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|
|
|
|
<!-- New postcode dialog -->
|
2020-10-14 09:33:42 +00:00
|
|
|
<vn-geo-postcode
|
2019-11-10 10:08:44 +00:00
|
|
|
vn-id="postcode"
|
|
|
|
on-response="$ctrl.onResponse($response)">
|
2023-06-12 12:58:28 +00:00
|
|
|
</vn-geo-postcode>
|