2018-01-29 11:37:54 +00:00
|
|
|
<mg-ajax path="/client/api/Clients/createWithUser" options="vnPost"></mg-ajax>
|
2017-02-07 11:58:25 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2017-02-21 10:36:43 +00:00
|
|
|
data="$ctrl.client"
|
2017-02-21 15:21:55 +00:00
|
|
|
form="form"
|
|
|
|
save="post">
|
2017-02-07 11:58:25 +00:00
|
|
|
</vn-watcher>
|
2017-02-21 15:21:55 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
|
2018-05-31 11:34:48 +00:00
|
|
|
<div style="max-width: 50em; margin: 0 auto;">
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-title>Create client</vn-title>
|
|
|
|
<vn-horizontal>
|
2018-03-22 17:02:48 +00:00
|
|
|
<vn-textfield vn-two label="Comercial Name" field="$ctrl.client.name" vn-focus></vn-textfield>
|
2018-03-01 22:38:14 +00:00
|
|
|
<vn-autocomplete vn-one
|
|
|
|
field="$ctrl.client.salesPersonFk"
|
|
|
|
url="/client/api/Clients/activeSalesPerson"
|
2018-04-03 17:29:01 +00:00
|
|
|
show-field="firstName"
|
2018-03-01 22:38:14 +00:00
|
|
|
value-field="id"
|
2018-04-03 17:29:01 +00:00
|
|
|
label="Salesperson">
|
|
|
|
<tpl-item>{{firstName}} {{name}}</tpl-item>
|
2018-03-01 22:38:14 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2018-03-22 17:02:48 +00:00
|
|
|
<vn-horizontal>
|
2018-05-31 11:34:48 +00:00
|
|
|
<vn-textfield vn-two label="Business name" field="$ctrl.client.socialName"></vn-textfield>
|
|
|
|
<vn-textfield vn-one label="Tax number" field="$ctrl.client.fi"></vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-03-22 17:02:48 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-two
|
|
|
|
label="Street"
|
|
|
|
field="$ctrl.client.street">
|
|
|
|
</vn-textfield>
|
2018-05-31 11:34:48 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
2018-03-22 17:02:48 +00:00
|
|
|
<vn-textfield
|
2018-05-31 11:34:48 +00:00
|
|
|
vn-one
|
|
|
|
label="Postcode"
|
|
|
|
field="$ctrl.client.postcode">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2018-03-22 17:02:48 +00:00
|
|
|
label="City"
|
|
|
|
field="$ctrl.client.city">
|
|
|
|
</vn-textfield>
|
2018-05-31 11:34:48 +00:00
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
field="$ctrl.client.countryFk"
|
|
|
|
url="/client/api/Countries"
|
|
|
|
show-field="country"
|
|
|
|
value-field="id"
|
|
|
|
label="Country">
|
|
|
|
</vn-autocomplete>
|
2018-03-22 17:02:48 +00:00
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
field="$ctrl.client.provinceFk"
|
|
|
|
url="/client/api/Provinces"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
label="Province">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
2018-05-31 11:34:48 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Web user"
|
|
|
|
field="$ctrl.client.userName">
|
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
|
|
|
label="Email"
|
|
|
|
field="$ctrl.client.email"
|
|
|
|
info="You can save multiple emails">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-check
|
|
|
|
vn-one
|
|
|
|
label="Is equalizated"
|
|
|
|
field="$ctrl.client.isEqualizated">
|
|
|
|
</vn-check>
|
|
|
|
</vn-horizontal>
|
2017-02-21 15:21:55 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2017-11-21 13:53:09 +00:00
|
|
|
<vn-submit label="Create"></vn-submit>
|
2018-04-22 14:25:44 +00:00
|
|
|
<button
|
|
|
|
class="mdl-button mdl-button--raised mdl-button--colored"
|
|
|
|
translate
|
2018-05-23 12:26:51 +00:00
|
|
|
ui-sref="client.index"
|
2018-04-22 14:25:44 +00:00
|
|
|
>Cancel
|
|
|
|
</button>
|
2017-02-21 15:21:55 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</div>
|
|
|
|
</form>
|