View | Details | Raw Unified | Return to bug 33355
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementLicenses.vue (-2 / +2 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div class="page-section" id="agreement_licenses">
2
    <fieldset class="rows" id="agreement_licenses">
3
        <legend>{{ $__("Licenses") }}</legend>
3
        <legend>{{ $__("Licenses") }}</legend>
4
        <fieldset
4
        <fieldset
5
            :id="`agreement_license_${counter}`"
5
            :id="`agreement_license_${counter}`"
Lines 97-103 Link Here
97
            ><font-awesome-icon icon="plus" /> {{ $__("Add new license") }}</a
97
            ><font-awesome-icon icon="plus" /> {{ $__("Add new license") }}</a
98
        >
98
        >
99
        <span v-else>{{ $__("There are no licenses created yet") }}</span>
99
        <span v-else>{{ $__("There are no licenses created yet") }}</span>
100
    </div>
100
    </fieldset>
101
</template>
101
</template>
102
102
103
<script>
103
<script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementPeriods.vue (-2 / +2 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div class="page-section" id="agreement_periods">
2
    <fieldset class="rows" id="agreement_periods">
3
        <legend>{{ $__("Periods") }}</legend>
3
        <legend>{{ $__("Periods") }}</legend>
4
        <fieldset
4
        <fieldset
5
            :id="`agreement_period_${counter}`"
5
            :id="`agreement_period_${counter}`"
Lines 63-69 Link Here
63
        <a class="btn btn-default" @click="addPeriod"
63
        <a class="btn btn-default" @click="addPeriod"
64
            ><font-awesome-icon icon="plus" /> {{ $__("Add new period") }}</a
64
            ><font-awesome-icon icon="plus" /> {{ $__("Add new period") }}</a
65
        >
65
        >
66
    </div>
66
    </fieldset>
67
</template>
67
</template>
68
68
69
<script>
69
<script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementRelationships.vue (-2 / +2 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div class="page-section" id="agreement_relationships">
2
    <fieldset class="rows" id="agreement_relationships">
3
        <legend>{{ $__("Related agreements") }}</legend>
3
        <legend>{{ $__("Related agreements") }}</legend>
4
        <fieldset
4
        <fieldset
5
            :id="`related_agreement_${counter}`"
5
            :id="`related_agreement_${counter}`"
Lines 85-91 Link Here
85
        <span v-else>{{
85
        <span v-else>{{
86
            $__("There are no other agreements created yet")
86
            $__("There are no other agreements created yet")
87
        }}</span>
87
        }}</span>
88
    </div>
88
    </fieldset>
89
</template>
89
</template>
90
90
91
<script>
91
<script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsFormAdd.vue (-134 / +132 lines)
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">{{
23
                                <span class="required">{{
23
                                $__("Required")
24
                                    $__("Required")
24
                            }}</span>
25
                                }}</span>
25
                        </li>
26
                            </li>
26
                        <li>
27
                            <li>
27
                            <label for="agreement_vendor_id"
28
                                <label for="agreement_vendor_id"
28
                                >{{ $__("Vendor") }}:</label
29
                                    >{{ $__("Vendor") }}:</label
29
                            >
30
                                >
30
                            <v-select
31
                                <v-select
31
                                id="agreement_vendor_id"
32
                                    id="agreement_vendor_id"
32
                                v-model="agreement.vendor_id"
33
                                    v-model="agreement.vendor_id"
33
                                label="display_name"
34
                                    label="display_name"
34
                                :reduce="vendor => vendor.id"
35
                                    :reduce="vendor => vendor.id"
35
                                :options="vendors"
36
                                    :options="vendors"
36
                            />
37
                                />
37
                        </li>
38
                            </li>
38
                        <li>
39
                            <li>
39
                            <label for="agreement_description"
40
                                <label for="agreement_description"
40
                                >{{ $__("Description") }}:
41
                                    >{{ $__("Description") }}:
41
                            </label>
42
                                </label>
42
                            <textarea
43
                                <textarea
43
                                id="agreement_description"
44
                                    id="agreement_description"
44
                                v-model="agreement.description"
45
                                    v-model="agreement.description"
45
                                :placeholder="$__('Description')"
46
                                    :placeholder="$__('Description')"
46
                                rows="10"
47
                                    rows="10"
47
                                cols="50"
48
                                    cols="50"
48
                            />
49
                                />
49
                        </li>
50
                            </li>
50
                        <li>
51
                            <li>
51
                            <label for="agreement_status" class="required"
52
                                <label for="agreement_status" class="required"
52
                                >{{ $__("Status") }}:</label
53
                                    >{{ $__("Status") }}:</label
53
                            >
54
                                >
54
                            <v-select
55
                                <v-select
55
                                id="agreement_status"
56
                                    id="agreement_status"
56
                                v-model="agreement.status"
57
                                    v-model="agreement.status"
57
                                label="description"
58
                                    label="description"
58
                                :reduce="av => av.value"
59
                                    :reduce="av => av.value"
59
                                :options="av_agreement_statuses"
60
                                    :options="av_agreement_statuses"
60
                                @option:selected="onStatusChanged"
61
                                    @option:selected="onStatusChanged"
61
                                :required="!agreement.status"
62
                                    :required="!agreement.status"
62
                            >
63
                                >
63
                                <template #search="{ attributes, events }">
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
64
                                    <input
103
                                        type="radio"
65
                                        :required="!agreement.status"
104
                                        name="is_perpetual"
66
                                        class="vs__search"
105
                                        id="agreement_is_perpetual_yes"
67
                                        v-bind="attributes"
106
                                        :value="true"
68
                                        v-on="events"
107
                                        v-model="agreement.is_perpetual"
108
                                    />
69
                                    />
109
                                </label>
70
                                </template>
110
                                <label
71
                            </v-select>
111
                                    class="radio"
72
                            <span class="required">{{
112
                                    for="agreement_is_perpetual_no"
73
                                $__("Required")
113
                                    >No
74
                            }}</span>
114
                                    <input
75
                        </li>
115
                                        type="radio"
76
                        <li>
116
                                        name="is_perpetual"
77
                            <label for="agreement_closure_reason"
117
                                        id="agreement_is_perpetual_no"
78
                                >{{ $__("Closure reason") }}:</label
118
                                        :value="false"
79
                            >
119
                                        v-model="agreement.is_perpetual"
80
                            <v-select
120
                                    />
81
                                id="agreement_closure_reason"
121
                                </label>
82
                                v-model="agreement.closure_reason"
122
                            </li>
83
                                label="description"
123
                            <li>
84
                                :reduce="av => av.value"
124
                                <label for="agreement_renewal_priority"
85
                                :options="av_agreement_closure_reasons"
125
                                    >{{ $__("Renewal priority") }}:</label
86
                                :disabled="
126
                                >
87
                                    agreement.status == 'closed'
127
                                <v-select
88
                                        ? false
128
                                    id="agreement_renewal_priority"
89
                                        : true
129
                                    v-model="agreement.renewal_priority"
90
                                "
130
                                    label="description"
91
                            />
131
                                    :reduce="av => av.value"
92
                        </li>
132
                                    :options="av_agreement_renewal_priorities"
93
                        <li>
94
                            <label for="agreement_is_perpetual"
95
                                >{{ $__("Is perpetual") }}:</label
96
                            >
97
                            <label
98
                                class="radio"
99
                                for="agreement_is_perpetual_yes"
100
                                >Yes
101
                                <input
102
                                    type="radio"
103
                                    name="is_perpetual"
104
                                    id="agreement_is_perpetual_yes"
105
                                    :value="true"
106
                                    v-model="agreement.is_perpetual"
133
                                />
107
                                />
134
                            </li>
108
                            </label>
135
                            <li>
109
                            <label
136
                                <label for="agreement_license_info"
110
                                class="radio"
137
                                    >{{ $__("License info") }}:
111
                                for="agreement_is_perpetual_no"
138
                                </label>
112
                                >No
139
                                <textarea
113
                                <input
140
                                    id="agreement_license_info"
114
                                    type="radio"
141
                                    v-model="agreement.license_info"
115
                                    name="is_perpetual"
142
                                    placeholder="License info"
116
                                    id="agreement_is_perpetual_no"
117
                                    :value="false"
118
                                    v-model="agreement.is_perpetual"
143
                                />
119
                                />
144
                            </li>
120
                            </label>
145
                        </ol>
121
                        </li>
146
                    </fieldset>
122
                        <li>
147
                </div>
123
                            <label for="agreement_renewal_priority"
124
                                >{{ $__("Renewal priority") }}:</label
125
                            >
126
                            <v-select
127
                                id="agreement_renewal_priority"
128
                                v-model="agreement.renewal_priority"
129
                                label="description"
130
                                :reduce="av => av.value"
131
                                :options="av_agreement_renewal_priorities"
132
                            />
133
                        </li>
134
                        <li>
135
                            <label for="agreement_license_info"
136
                                >{{ $__("License info") }}:
137
                            </label>
138
                            <textarea
139
                                id="agreement_license_info"
140
                                v-model="agreement.license_info"
141
                                placeholder="License info"
142
                            />
143
                        </li>
144
                    </ol>
145
                </fieldset>
148
                <AgreementPeriods :periods="agreement.periods" />
146
                <AgreementPeriods :periods="agreement.periods" />
149
                <UserRoles
147
                <UserRoles
150
                    :user_type="$__('Agreement user')"
148
                    :user_type="$__('Agreement user')"
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/Documents.vue (-2 / +2 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div class="page-section" id="documents">
2
    <fieldset class="rows" id="documents">
3
        <legend>{{ $__("Documents") }}</legend>
3
        <legend>{{ $__("Documents") }}</legend>
4
        <fieldset
4
        <fieldset
5
            :id="`document_${counter}`"
5
            :id="`document_${counter}`"
Lines 102-108 Link Here
102
        <a class="btn btn-default" @click="addDocument"
102
        <a class="btn btn-default" @click="addDocument"
103
            ><font-awesome-icon icon="plus" /> {{ $__("Add new document") }}</a
103
            ><font-awesome-icon icon="plus" /> {{ $__("Add new document") }}</a
104
        >
104
        >
105
    </div>
105
    </fieldset>
106
</template>
106
</template>
107
107
108
<script>
108
<script>
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesFormAdd.vue (-4 / +3 lines)
Lines 64-75 Link Here
64
                                v-model="erm_package.notes"
64
                                v-model="erm_package.notes"
65
                            />
65
                            />
66
                        </li>
66
                        </li>
67
68
                        <EHoldingsPackageAgreements
69
                            :package_agreements="erm_package.package_agreements"
70
                        />
71
                    </ol>
67
                    </ol>
72
                </fieldset>
68
                </fieldset>
69
                <EHoldingsPackageAgreements
70
                    :package_agreements="erm_package.package_agreements"
71
                />
73
                <fieldset class="action">
72
                <fieldset class="action">
74
                    <input type="submit" value="Submit" />
73
                    <input type="submit" value="Submit" />
75
                    <router-link
74
                    <router-link
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesFormAdd.vue (-4 / +1 lines)
Lines 364-375 Link Here
364
                                :placeholder="$__('Access type')"
364
                                :placeholder="$__('Access type')"
365
                            />
365
                            />
366
                        </li>
366
                        </li>
367
368
                        <EHoldingsTitlesFormAddResources
369
                            :resources="title.resources"
370
                        />
371
                    </ol>
367
                    </ol>
372
                </fieldset>
368
                </fieldset>
369
                <EHoldingsTitlesFormAddResources :resources="title.resources" />
373
                <fieldset class="action">
370
                <fieldset class="action">
374
                    <input type="submit" value="Submit" />
371
                    <input type="submit" value="Submit" />
375
                    <router-link
372
                    <router-link
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesFormAdd.vue (-119 / +117 lines)
Lines 7-131 Link Here
7
        <h2 v-else>{{ $__("New license") }}</h2>
7
        <h2 v-else>{{ $__("New license") }}</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 class="required" for="license_name"
14
                                <label class="required" for="license_name"
14
                                >{{ $__("License name") }}:</label
15
                                    >{{ $__("License name") }}:</label
15
                            >
16
                                >
16
                            <input
17
                                <input
17
                                id="license_name"
18
                                    id="license_name"
18
                                v-model="license.name"
19
                                    v-model="license.name"
19
                                :placeholder="$__('License name')"
20
                                    :placeholder="$__('License name')"
20
                                required
21
                                    required
21
                            />
22
                                />
22
                            <span class="required">{{
23
                                <span class="required">{{
23
                                $__("Required")
24
                                    $__("Required")
24
                            }}</span>
25
                                }}</span>
25
                        </li>
26
                            </li>
26
                        <li>
27
                            <li>
27
                            <label for="license_vendor_id"
28
                                <label for="license_vendor_id"
28
                                >{{ $__("Vendor") }}:</label
29
                                    >{{ $__("Vendor") }}:</label
29
                            >
30
                                >
30
                            <v-select
31
                                <v-select
31
                                id="license_vendor_id"
32
                                    id="license_vendor_id"
32
                                v-model="license.vendor_id"
33
                                    v-model="license.vendor_id"
33
                                label="display_name"
34
                                    label="display_name"
34
                                :reduce="vendor => vendor.id"
35
                                    :reduce="vendor => vendor.id"
35
                                :options="vendors"
36
                                    :options="vendors"
36
                            />
37
                                />
37
                        </li>
38
                            </li>
38
                        <li>
39
                            <li>
39
                            <label
40
                                <label
40
                                for="license_description"
41
                                    for="license_description"
41
                                class="required"
42
                                    class="required"
42
                                >{{ $__("Description") }}:
43
                                    >{{ $__("Description") }}:
43
                            </label>
44
                                </label>
44
                            <textarea
45
                                <textarea
45
                                id="license_description"
46
                                    id="license_description"
46
                                v-model="license.description"
47
                                    v-model="license.description"
47
                                :placeholder="$__('Description')"
48
                                    :placeholder="$__('Description')"
48
                                rows="10"
49
                                    rows="10"
49
                                cols="50"
50
                                    cols="50"
50
                                required
51
                                    required
51
                            />
52
                                />
52
                            <span class="required">{{
53
                                <span class="required">{{
53
                                $__("Required")
54
                                    $__("Required")
54
                            }}</span>
55
                                }}</span>
55
                        </li>
56
                            </li>
56
                        <li>
57
                            <li>
57
                            <label for="license_type" class="required"
58
                                <label for="license_type" class="required"
58
                                >{{ $__("Type") }}:</label
59
                                    >{{ $__("Type") }}:</label
59
                            >
60
                                >
60
                            <v-select
61
                                <v-select
61
                                id="license_type"
62
                                    id="license_type"
62
                                v-model="license.type"
63
                                    v-model="license.type"
63
                                label="description"
64
                                    label="description"
64
                                :reduce="av => av.value"
65
                                    :reduce="av => av.value"
65
                                :options="av_license_types"
66
                                    :options="av_license_types"
66
                            >
67
                                >
67
                                <template #search="{ attributes, events }">
68
                                    <template #search="{ attributes, events }">
68
                                    <input
69
                                        <input
69
                                        :required="!license.type"
70
                                            :required="!license.type"
70
                                        class="vs__search"
71
                                            class="vs__search"
71
                                        v-bind="attributes"
72
                                            v-bind="attributes"
72
                                        v-on="events"
73
                                            v-on="events"
73
                                    />
74
                                        />
74
                                </template>
75
                                    </template>
75
                            </v-select>
76
                                </v-select>
76
                            <span class="required">{{
77
                                <span class="required">{{
77
                                $__("Required")
78
                                    $__("Required")
78
                            }}</span>
79
                                }}</span>
79
                        </li>
80
                            </li>
80
                        <li>
81
                            <li>
81
                            <label for="license_status" class="required"
82
                                <label for="license_status" class="required"
82
                                >{{ $__("Status") }}:</label
83
                                    >{{ $__("Status") }}:</label
83
                            >
84
                                >
84
                            <v-select
85
                                <v-select
85
                                id="license_status"
86
                                    id="license_status"
86
                                v-model="license.status"
87
                                    v-model="license.status"
87
                                :reduce="av => av.value"
88
                                    :reduce="av => av.value"
88
                                :options="av_license_statuses"
89
                                    :options="av_license_statuses"
89
                                label="description"
90
                                    label="description"
90
                            >
91
                                >
91
                                <template #search="{ attributes, events }">
92
                                    <template #search="{ attributes, events }">
92
                                    <input
93
                                        <input
93
                                        :required="!license.status"
94
                                            :required="!license.status"
94
                                        class="vs__search"
95
                                            class="vs__search"
95
                                        v-bind="attributes"
96
                                            v-bind="attributes"
96
                                        v-on="events"
97
                                            v-on="events"
97
                                    />
98
                                        />
98
                                </template>
99
                                    </template>
99
                            </v-select>
100
                                </v-select>
100
                            <span class="required">{{
101
                                <span class="required">{{
101
                                $__("Required")
102
                                    $__("Required")
102
                            }}</span>
103
                                }}</span>
103
                        </li>
104
                            </li>
104
                        <li>
105
                            <li>
105
                            <label for="started_on"
106
                                <label for="started_on"
106
                                >{{ $__("Start date") }}:</label
107
                                    >{{ $__("Start date") }}:</label
107
                            >
108
                                >
108
                            <flat-pickr
109
                                <flat-pickr
109
                                id="started_on"
110
                                    id="started_on"
110
                                v-model="license.started_on"
111
                                    v-model="license.started_on"
111
                                :config="fp_config"
112
                                    :config="fp_config"
112
                                data-date_to="ended_on"
113
                                    data-date_to="ended_on"
113
                            />
114
                                />
114
                        </li>
115
                            </li>
115
                        <li>
116
                            <li>
116
                            <label for="ended_on"
117
                                <label for="ended_on"
117
                                >{{ $__("End date") }}:</label
118
                                    >{{ $__("End date") }}:</label
118
                            >
119
                                >
119
                            <flat-pickr
120
                                <flat-pickr
120
                                id="ended_on"
121
                                    id="ended_on"
121
                                v-model="license.ended_on"
122
                                    v-model="license.ended_on"
122
                                :config="fp_config"
123
                                    :config="fp_config"
123
                            />
124
                                />
124
                        </li>
125
                            </li>
125
                    </ol>
126
                        </ol>
126
                </fieldset>
127
                    </fieldset>
128
                </div>
129
                <UserRoles
127
                <UserRoles
130
                    :user_type="$__('License user')"
128
                    :user_type="$__('License user')"
131
                    :user_roles="license.user_roles"
129
                    :user_roles="license.user_roles"
(-)a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UserRoles.vue (-3 / +2 lines)
Lines 1-5 Link Here
1
<template>
1
<template>
2
    <div class="page-section" id="user_roles">
2
    <fieldset class="rows" id="user_roles">
3
        <legend>{{ $__("Users") }}</legend>
3
        <legend>{{ $__("Users") }}</legend>
4
        <fieldset
4
        <fieldset
5
            class="rows"
5
            class="rows"
Lines 61-67 Link Here
61
        <a class="btn btn-default" @click="addUser"
61
        <a class="btn btn-default" @click="addUser"
62
            ><font-awesome-icon icon="plus" /> {{ $__("Add new user") }}</a
62
            ><font-awesome-icon icon="plus" /> {{ $__("Add new user") }}</a
63
        >
63
        >
64
    </div>
64
    </fieldset>
65
</template>
65
</template>
66
66
67
<script>
67
<script>
68
- 

Return to bug 33355