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 / +124 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">{{ $__("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')"
(-)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 / +105 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">{{ $__("Required") }}</span>
23
                                <span class="required">{{
23
                        </li>
24
                                    $__("Required")
24
                        <li>
25
                                }}</span>
25
                            <label for="license_vendor_id"
26
                            </li>
26
                                >{{ $__("Vendor") }}:</label
27
                            <li>
27
                            >
28
                                <label for="license_vendor_id"
28
                            <v-select
29
                                    >{{ $__("Vendor") }}:</label
29
                                id="license_vendor_id"
30
                                >
30
                                v-model="license.vendor_id"
31
                                <v-select
31
                                label="name"
32
                                    id="license_vendor_id"
32
                                :reduce="vendor => vendor.id"
33
                                    v-model="license.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="license_description" class="required"
38
                            </li>
38
                                >{{ $__("Description") }}:
39
                            <li>
39
                            </label>
40
                                <label
40
                            <textarea
41
                                    for="license_description"
41
                                id="license_description"
42
                                    class="required"
42
                                v-model="license.description"
43
                                    >{{ $__("Description") }}:
43
                                :placeholder="$__('Description')"
44
                                </label>
44
                                rows="10"
45
                                <textarea
45
                                cols="50"
46
                                    id="license_description"
46
                                required
47
                                    v-model="license.description"
47
                            />
48
                                    :placeholder="$__('Description')"
48
                            <span class="required">{{ $__("Required") }}</span>
49
                                    rows="10"
49
                        </li>
50
                                    cols="50"
50
                        <li>
51
                                    required
51
                            <label for="license_type" class="required"
52
                                />
52
                                >{{ $__("Type") }}:</label
53
                                <span class="required">{{
53
                            >
54
                                    $__("Required")
54
                            <v-select
55
                                }}</span>
55
                                id="license_type"
56
                            </li>
56
                                v-model="license.type"
57
                            <li>
57
                                label="description"
58
                                <label for="license_type" class="required"
58
                                :reduce="av => av.value"
59
                                    >{{ $__("Type") }}:</label
59
                                :options="av_license_types"
60
                                >
60
                            >
61
                                <v-select
61
                                <template #search="{ attributes, events }">
62
                                    id="license_type"
62
                                    <input
63
                                    v-model="license.type"
63
                                        :required="!license.type"
64
                                    label="description"
64
                                        class="vs__search"
65
                                    :reduce="av => av.value"
65
                                        v-bind="attributes"
66
                                    :options="av_license_types"
66
                                        v-on="events"
67
                                >
67
                                    />
68
                                    <template #search="{ attributes, events }">
68
                                </template>
69
                                        <input
69
                            </v-select>
70
                                            :required="!license.type"
70
                            <span class="required">{{ $__("Required") }}</span>
71
                                            class="vs__search"
71
                        </li>
72
                                            v-bind="attributes"
72
                        <li>
73
                                            v-on="events"
73
                            <label for="license_status" class="required"
74
                                        />
74
                                >{{ $__("Status") }}:</label
75
                                    </template>
75
                            >
76
                                </v-select>
76
                            <v-select
77
                                <span class="required">{{
77
                                id="license_status"
78
                                    $__("Required")
78
                                v-model="license.status"
79
                                }}</span>
79
                                :reduce="av => av.value"
80
                            </li>
80
                                :options="av_license_statuses"
81
                            <li>
81
                                label="description"
82
                                <label for="license_status" class="required"
82
                            >
83
                                    >{{ $__("Status") }}:</label
83
                                <template #search="{ attributes, events }">
84
                                >
84
                                    <input
85
                                <v-select
85
                                        :required="!license.status"
86
                                    id="license_status"
86
                                        class="vs__search"
87
                                    v-model="license.status"
87
                                        v-bind="attributes"
88
                                    :reduce="av => av.value"
88
                                        v-on="events"
89
                                    :options="av_license_statuses"
89
                                    />
90
                                    label="description"
90
                                </template>
91
                                >
91
                            </v-select>
92
                                    <template #search="{ attributes, events }">
92
                            <span class="required">{{ $__("Required") }}</span>
93
                                        <input
93
                        </li>
94
                                            :required="!license.status"
94
                        <li>
95
                                            class="vs__search"
95
                            <label for="started_on"
96
                                            v-bind="attributes"
96
                                >{{ $__("Start date") }}:</label
97
                                            v-on="events"
97
                            >
98
                                        />
98
                            <flat-pickr
99
                                    </template>
99
                                id="started_on"
100
                                </v-select>
100
                                v-model="license.started_on"
101
                                <span class="required">{{
101
                                :config="fp_config"
102
                                    $__("Required")
102
                                data-date_to="ended_on"
103
                                }}</span>
103
                            />
104
                            </li>
104
                        </li>
105
                            <li>
105
                        <li>
106
                                <label for="started_on"
106
                            <label for="ended_on">{{ $__("End date") }}:</label>
107
                                    >{{ $__("Start date") }}:</label
107
                            <flat-pickr
108
                                >
108
                                id="ended_on"
109
                                <flat-pickr
109
                                v-model="license.ended_on"
110
                                    id="started_on"
110
                                :config="fp_config"
111
                                    v-model="license.started_on"
111
                            />
112
                                    :config="fp_config"
112
                        </li>
113
                                    data-date_to="ended_on"
113
                    </ol>
114
                                />
114
                </fieldset>
115
                            </li>
116
                            <li>
117
                                <label for="ended_on"
118
                                    >{{ $__("End date") }}:</label
119
                                >
120
                                <flat-pickr
121
                                    id="ended_on"
122
                                    v-model="license.ended_on"
123
                                    :config="fp_config"
124
                                />
125
                            </li>
126
                        </ol>
127
                    </fieldset>
128
                </div>
129
                <UserRoles
115
                <UserRoles
130
                    :user_type="$__('License user')"
116
                    :user_type="$__('License user')"
131
                    :user_roles="license.user_roles"
117
                    :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