Lines 7-150
Link Here
|
7 |
<h2 v-else>{{ $__("New agreement") }}</h2> |
7 |
<h2 v-else>{{ $__("New agreement") }}</h2> |
8 |
<div> |
8 |
<div> |
9 |
<form @submit="onSubmit($event)"> |
9 |
<form @submit="onSubmit($event)"> |
10 |
<div class="page-section"> |
10 |
<fieldset class="rows"> |
11 |
<fieldset class="rows"> |
11 |
<ol> |
12 |
<ol> |
12 |
<li> |
13 |
<li> |
13 |
<label for="agreement_name" class="required" |
14 |
<label for="agreement_name" class="required" |
14 |
>{{ $__("Agreement name") }}:</label |
15 |
>{{ $__("Agreement name") }}:</label |
15 |
> |
16 |
> |
16 |
<input |
17 |
<input |
17 |
id="agreement_name" |
18 |
id="agreement_name" |
18 |
v-model="agreement.name" |
19 |
v-model="agreement.name" |
19 |
:placeholder="$__('Agreement name')" |
20 |
:placeholder="$__('Agreement name')" |
20 |
required |
21 |
required |
21 |
/> |
22 |
/> |
22 |
<span class="required">{{ $__("Required") }}</span> |
23 |
<span class="required">{{ |
23 |
</li> |
24 |
$__("Required") |
24 |
<li> |
25 |
}}</span> |
25 |
<label for="agreement_vendor_id" |
26 |
</li> |
26 |
>{{ $__("Vendor") }}:</label |
27 |
<li> |
27 |
> |
28 |
<label for="agreement_vendor_id" |
28 |
<v-select |
29 |
>{{ $__("Vendor") }}:</label |
29 |
id="agreement_vendor_id" |
30 |
> |
30 |
v-model="agreement.vendor_id" |
31 |
<v-select |
31 |
label="name" |
32 |
id="agreement_vendor_id" |
32 |
:reduce="vendor => vendor.id" |
33 |
v-model="agreement.vendor_id" |
33 |
:options="vendors" |
34 |
label="name" |
34 |
/> |
35 |
:reduce="vendor => vendor.id" |
35 |
</li> |
36 |
:options="vendors" |
36 |
<li> |
37 |
/> |
37 |
<label for="agreement_description" |
38 |
</li> |
38 |
>{{ $__("Description") }}: |
39 |
<li> |
39 |
</label> |
40 |
<label for="agreement_description" |
40 |
<textarea |
41 |
>{{ $__("Description") }}: |
41 |
id="agreement_description" |
42 |
</label> |
42 |
v-model="agreement.description" |
43 |
<textarea |
43 |
:placeholder="$__('Description')" |
44 |
id="agreement_description" |
44 |
rows="10" |
45 |
v-model="agreement.description" |
45 |
cols="50" |
46 |
:placeholder="$__('Description')" |
46 |
/> |
47 |
rows="10" |
47 |
</li> |
48 |
cols="50" |
48 |
<li> |
49 |
/> |
49 |
<label for="agreement_status" class="required" |
50 |
</li> |
50 |
>{{ $__("Status") }}:</label |
51 |
<li> |
51 |
> |
52 |
<label for="agreement_status" class="required" |
52 |
<v-select |
53 |
>{{ $__("Status") }}:</label |
53 |
id="agreement_status" |
54 |
> |
54 |
v-model="agreement.status" |
55 |
<v-select |
55 |
label="description" |
56 |
id="agreement_status" |
56 |
:reduce="av => av.value" |
57 |
v-model="agreement.status" |
57 |
:options="av_agreement_statuses" |
58 |
label="description" |
58 |
@option:selected="onStatusChanged" |
59 |
:reduce="av => av.value" |
59 |
:required="!agreement.status" |
60 |
:options="av_agreement_statuses" |
60 |
> |
61 |
@option:selected="onStatusChanged" |
61 |
<template #search="{ attributes, events }"> |
62 |
:required="!agreement.status" |
|
|
63 |
> |
64 |
<template #search="{ attributes, events }"> |
65 |
<input |
66 |
:required="!agreement.status" |
67 |
class="vs__search" |
68 |
v-bind="attributes" |
69 |
v-on="events" |
70 |
/> |
71 |
</template> |
72 |
</v-select> |
73 |
<span class="required">{{ |
74 |
$__("Required") |
75 |
}}</span> |
76 |
</li> |
77 |
<li> |
78 |
<label for="agreement_closure_reason" |
79 |
>{{ $__("Closure reason") }}:</label |
80 |
> |
81 |
<v-select |
82 |
id="agreement_closure_reason" |
83 |
v-model="agreement.closure_reason" |
84 |
label="description" |
85 |
:reduce="av => av.value" |
86 |
:options="av_agreement_closure_reasons" |
87 |
:disabled=" |
88 |
agreement.status == 'closed' |
89 |
? false |
90 |
: true |
91 |
" |
92 |
/> |
93 |
</li> |
94 |
<li> |
95 |
<label for="agreement_is_perpetual" |
96 |
>{{ $__("Is perpetual") }}:</label |
97 |
> |
98 |
<label |
99 |
class="radio" |
100 |
for="agreement_is_perpetual_yes" |
101 |
>Yes |
102 |
<input |
62 |
<input |
103 |
type="radio" |
63 |
:required="!agreement.status" |
104 |
name="is_perpetual" |
64 |
class="vs__search" |
105 |
id="agreement_is_perpetual_yes" |
65 |
v-bind="attributes" |
106 |
:value="true" |
66 |
v-on="events" |
107 |
v-model="agreement.is_perpetual" |
|
|
108 |
/> |
67 |
/> |
109 |
</label> |
68 |
</template> |
110 |
<label |
69 |
</v-select> |
111 |
class="radio" |
70 |
<span class="required">{{ $__("Required") }}</span> |
112 |
for="agreement_is_perpetual_no" |
71 |
</li> |
113 |
>No |
72 |
<li> |
114 |
<input |
73 |
<label for="agreement_closure_reason" |
115 |
type="radio" |
74 |
>{{ $__("Closure reason") }}:</label |
116 |
name="is_perpetual" |
75 |
> |
117 |
id="agreement_is_perpetual_no" |
76 |
<v-select |
118 |
:value="false" |
77 |
id="agreement_closure_reason" |
119 |
v-model="agreement.is_perpetual" |
78 |
v-model="agreement.closure_reason" |
120 |
/> |
79 |
label="description" |
121 |
</label> |
80 |
:reduce="av => av.value" |
122 |
</li> |
81 |
:options="av_agreement_closure_reasons" |
123 |
<li> |
82 |
:disabled=" |
124 |
<label for="agreement_renewal_priority" |
83 |
agreement.status == 'closed' ? false : true |
125 |
>{{ $__("Renewal priority") }}:</label |
84 |
" |
126 |
> |
85 |
/> |
127 |
<v-select |
86 |
</li> |
128 |
id="agreement_renewal_priority" |
87 |
<li> |
129 |
v-model="agreement.renewal_priority" |
88 |
<label for="agreement_is_perpetual" |
130 |
label="description" |
89 |
>{{ $__("Is perpetual") }}:</label |
131 |
:reduce="av => av.value" |
90 |
> |
132 |
:options="av_agreement_renewal_priorities" |
91 |
<label |
|
|
92 |
class="radio" |
93 |
for="agreement_is_perpetual_yes" |
94 |
>Yes |
95 |
<input |
96 |
type="radio" |
97 |
name="is_perpetual" |
98 |
id="agreement_is_perpetual_yes" |
99 |
:value="true" |
100 |
v-model="agreement.is_perpetual" |
133 |
/> |
101 |
/> |
134 |
</li> |
102 |
</label> |
135 |
<li> |
103 |
<label class="radio" for="agreement_is_perpetual_no" |
136 |
<label for="agreement_license_info" |
104 |
>No |
137 |
>{{ $__("License info") }}: |
105 |
<input |
138 |
</label> |
106 |
type="radio" |
139 |
<textarea |
107 |
name="is_perpetual" |
140 |
id="agreement_license_info" |
108 |
id="agreement_is_perpetual_no" |
141 |
v-model="agreement.license_info" |
109 |
:value="false" |
142 |
placeholder="License info" |
110 |
v-model="agreement.is_perpetual" |
143 |
/> |
111 |
/> |
144 |
</li> |
112 |
</label> |
145 |
</ol> |
113 |
</li> |
146 |
</fieldset> |
114 |
<li> |
147 |
</div> |
115 |
<label for="agreement_renewal_priority" |
|
|
116 |
>{{ $__("Renewal priority") }}:</label |
117 |
> |
118 |
<v-select |
119 |
id="agreement_renewal_priority" |
120 |
v-model="agreement.renewal_priority" |
121 |
label="description" |
122 |
:reduce="av => av.value" |
123 |
:options="av_agreement_renewal_priorities" |
124 |
/> |
125 |
</li> |
126 |
<li> |
127 |
<label for="agreement_license_info" |
128 |
>{{ $__("License info") }}: |
129 |
</label> |
130 |
<textarea |
131 |
id="agreement_license_info" |
132 |
v-model="agreement.license_info" |
133 |
placeholder="License info" |
134 |
/> |
135 |
</li> |
136 |
</ol> |
137 |
</fieldset> |
148 |
<AgreementPeriods :periods="agreement.periods" /> |
138 |
<AgreementPeriods :periods="agreement.periods" /> |
149 |
<UserRoles |
139 |
<UserRoles |
150 |
:user_type="$__('Agreement user')" |
140 |
:user_type="$__('Agreement user')" |