73 lines
2.1 KiB
HTML
73 lines
2.1 KiB
HTML
<vn-crud-model
|
|
auto-load="true"
|
|
url="Companies"
|
|
data="companiesData"
|
|
order="code">
|
|
</vn-crud-model>
|
|
<vn-crud-model
|
|
auto-load="true"
|
|
url="Samples/visible"
|
|
data="samplesVisible"
|
|
order="description">
|
|
</vn-crud-model>
|
|
<vn-watcher
|
|
vn-id="watcher"
|
|
url="ClientSamples"
|
|
data="$ctrl.clientSample"
|
|
insert-mode="true"
|
|
form="form">
|
|
</vn-watcher>
|
|
<vn-crud-model
|
|
auto-load="true"
|
|
url="Companies"
|
|
data="companiesData"
|
|
order="code">
|
|
</vn-crud-model>
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
|
<vn-card class="vn-pa-lg">
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
label="Recipient"
|
|
ng-model="$ctrl.clientSample.recipient"
|
|
info="Its only used when sample is sent">
|
|
</vn-textfield>
|
|
</vn-horizontal>
|
|
<vn-horizontal>
|
|
<vn-autocomplete
|
|
vn-id="sampleType"
|
|
ng-model="$ctrl.clientSample.typeFk"
|
|
model="ClientSample.typeFk"
|
|
fields="['code','hasCompany', 'hasPreview']"
|
|
data="samplesVisible"
|
|
show-field="description"
|
|
label="Sample">
|
|
</vn-autocomplete>
|
|
<vn-autocomplete
|
|
ng-model="$ctrl.companyId"
|
|
model="ClientSample.companyFk"
|
|
data="companiesData"
|
|
show-field="code"
|
|
label="Company"
|
|
ng-if="sampleType.selection.hasCompany">
|
|
</vn-autocomplete>
|
|
</vn-horizontal>
|
|
</vn-card>
|
|
<vn-button-bar>
|
|
<vn-submit label="Send"></vn-submit>
|
|
<vn-button ng-if="sampleType.selection.hasPreview"
|
|
label="Preview"
|
|
ng-click="$ctrl.showPreview()">
|
|
</vn-button>
|
|
<vn-button ui-sref="client.card.sample.index" label="Cancel"></vn-button>
|
|
</vn-button-bar>
|
|
</form>
|
|
<vn-dialog
|
|
vn-id="show-preview"
|
|
on-open="$ctrl.onPreviewOpen()">
|
|
<tpl-body class="client-sample-dialog">
|
|
<div class="loading">
|
|
<vn-spinner enable="true"></vn-spinner>
|
|
</div>
|
|
</tpl-body>
|
|
</vn-dialog>
|