Skip to content

Commit abd5e3b

Browse files
committed
Merge remote-tracking branch 'origin/dev' into tim/crew-capabilites
2 parents a6f7dc9 + 46d3bf0 commit abd5e3b

File tree

5 files changed

+99
-85
lines changed

5 files changed

+99
-85
lines changed

client/src/router/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,9 @@ const routes = [
5252
meta: { requiresAuth: true, requiresShowAccess: true },
5353
},
5454
{
55-
name: 'show-config-acts',
55+
name: 'show-config-acts-scenes',
5656
path: 'acts',
57-
component: () => import('../views/show/config/ConfigActs.vue'),
58-
meta: { requiresAuth: true, requiresShowAccess: true },
59-
},
60-
{
61-
name: 'show-config-scenes',
62-
path: 'scenes',
63-
component: () => import('../views/show/config/ConfigScenes.vue'),
57+
component: () => import('../views/show/config/ConfigActsAndScenes.vue'),
6458
meta: { requiresAuth: true, requiresShowAccess: true },
6559
},
6660
{

client/src/views/show/ShowConfigView.vue

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,11 @@
4444
<b-button
4545
:disabled="!shouldViewShowConfig"
4646
replace
47-
:to="{ name: 'show-config-acts' }"
47+
:to="{ name: 'show-config-acts-scenes' }"
4848
variant="outline-info"
4949
active-class="active"
5050
>
51-
Acts
52-
</b-button>
53-
<b-button
54-
:disabled="!shouldViewShowConfig"
55-
replace
56-
:to="{ name: 'show-config-scenes' }"
57-
variant="outline-info"
58-
active-class="active"
59-
>
60-
Scenes
51+
Acts & Scenes
6152
</b-button>
6253
<b-button
6354
:disabled="!shouldShowScriptConfig"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template>
2+
<b-container class="mx-0" fluid>
3+
<b-row>
4+
<b-col>
5+
<b-tabs content-class="mt-3">
6+
<b-tab title="Acts" active>
7+
<config-acts />
8+
</b-tab>
9+
<b-tab title="Scenes">
10+
<config-scenes />
11+
</b-tab>
12+
</b-tabs>
13+
</b-col>
14+
</b-row>
15+
</b-container>
16+
</template>
17+
18+
<script>
19+
import ConfigActs from '@/vue_components/show/config/acts_and_scenes/ConfigActs.vue';
20+
import ConfigScenes from '@/vue_components/show/config/acts_and_scenes/ConfigScenes.vue';
21+
22+
export default {
23+
name: 'ConfigActsAndScenes',
24+
components: { ConfigScenes, ConfigActs },
25+
};
26+
</script>

client/src/views/show/config/ConfigActs.vue renamed to client/src/vue_components/show/config/acts_and_scenes/ConfigActs.vue

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,61 @@
11
<template>
2-
<b-container class="mx-0" fluid>
3-
<b-row>
4-
<b-col>
5-
<h5>Act List</h5>
6-
<b-table
7-
id="acts-table"
8-
:items="actTableItems"
9-
:fields="actFields"
10-
:per-page="rowsPerPage"
11-
:current-page="currentPage"
12-
show-empty
13-
>
14-
<template #head(btn)="data">
15-
<b-button v-if="IS_SHOW_EDITOR" v-b-modal.new-act variant="outline-success">
16-
New Act
17-
</b-button>
18-
</template>
19-
<template #cell(interval_after)="data">
20-
<b-icon-check-square-fill v-if="data.item.interval_after" variant="success" />
21-
<b-icon-x-square-fill v-else variant="danger" />
22-
</template>
23-
<template #cell(next_act)="data">
24-
<p v-if="data.item.next_act">
25-
{{ ACT_BY_ID(data.item.next_act).name }}
26-
</p>
27-
<p v-else>N/A</p>
28-
</template>
29-
<template #cell(previous_act)="data">
30-
<p v-if="data.item.previous_act">
31-
{{ ACT_BY_ID(data.item.previous_act).name }}
32-
</p>
33-
<p v-else>N/A</p>
34-
</template>
35-
<template #cell(btn)="data">
36-
<b-button-group v-if="IS_SHOW_EDITOR">
37-
<b-button
38-
variant="warning"
39-
:disabled="submittingEditAct || deletingAct"
40-
@click="openEditForm(data)"
41-
>
42-
Edit
43-
</b-button>
44-
<b-button
45-
variant="danger"
46-
:disabled="submittingEditAct || deletingAct"
47-
@click="deleteAct(data)"
48-
>
49-
Delete
50-
</b-button>
51-
</b-button-group>
52-
</template>
53-
</b-table>
54-
<b-pagination
55-
v-show="actTableItems.length > rowsPerPage"
56-
v-model="currentPage"
57-
:total-rows="actTableItems.length"
58-
:per-page="rowsPerPage"
59-
aria-controls="acts-table"
60-
class="justify-content-center"
61-
/>
62-
</b-col>
63-
</b-row>
2+
<span v-if="!loading">
3+
<b-table
4+
id="acts-table"
5+
:items="actTableItems"
6+
:fields="actFields"
7+
:per-page="rowsPerPage"
8+
:current-page="currentPage"
9+
show-empty
10+
>
11+
<template #head(btn)="data">
12+
<b-button v-if="IS_SHOW_EDITOR" v-b-modal.new-act variant="outline-success">
13+
New Act
14+
</b-button>
15+
</template>
16+
<template #cell(interval_after)="data">
17+
<b-icon-check-square-fill v-if="data.item.interval_after" variant="success" />
18+
<b-icon-x-square-fill v-else variant="danger" />
19+
</template>
20+
<template #cell(next_act)="data">
21+
<p v-if="data.item.next_act">
22+
{{ ACT_BY_ID(data.item.next_act).name }}
23+
</p>
24+
<p v-else>N/A</p>
25+
</template>
26+
<template #cell(previous_act)="data">
27+
<p v-if="data.item.previous_act">
28+
{{ ACT_BY_ID(data.item.previous_act).name }}
29+
</p>
30+
<p v-else>N/A</p>
31+
</template>
32+
<template #cell(btn)="data">
33+
<b-button-group v-if="IS_SHOW_EDITOR">
34+
<b-button
35+
variant="warning"
36+
:disabled="submittingEditAct || deletingAct"
37+
@click="openEditForm(data)"
38+
>
39+
Edit
40+
</b-button>
41+
<b-button
42+
variant="danger"
43+
:disabled="submittingEditAct || deletingAct"
44+
@click="deleteAct(data)"
45+
>
46+
Delete
47+
</b-button>
48+
</b-button-group>
49+
</template>
50+
</b-table>
51+
<b-pagination
52+
v-show="actTableItems.length > rowsPerPage"
53+
v-model="currentPage"
54+
:total-rows="actTableItems.length"
55+
:per-page="rowsPerPage"
56+
aria-controls="acts-table"
57+
class="justify-content-center"
58+
/>
6459
<b-modal
6560
id="new-act"
6661
ref="new-act"
@@ -152,7 +147,10 @@
152147
</b-form-group>
153148
</b-form>
154149
</b-modal>
155-
</b-container>
150+
</span>
151+
<div v-else class="text-center py-5">
152+
<b-spinner label="Loading" />
153+
</div>
156154
</template>
157155

158156
<script>
@@ -164,6 +162,7 @@ export default {
164162
name: 'ConfigActs',
165163
data() {
166164
return {
165+
loading: true,
167166
rowsPerPage: 15,
168167
currentPage: 1,
169168
actFields: [
@@ -260,6 +259,7 @@ export default {
260259
},
261260
async mounted() {
262261
await this.GET_ACT_LIST();
262+
this.loading = false;
263263
},
264264
methods: {
265265
resetNewForm() {

client/src/views/show/config/ConfigScenes.vue renamed to client/src/vue_components/show/config/acts_and_scenes/ConfigScenes.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<template>
2-
<b-container class="mx-0" fluid>
2+
<b-container v-if="!loading" class="mx-0" fluid>
33
<b-row>
44
<b-col cols="8">
5-
<h5>Scene List</h5>
65
<b-table
76
id="scene-table"
87
:items="sceneTableItems"
@@ -60,7 +59,6 @@
6059
/>
6160
</b-col>
6261
<b-col cols="4">
63-
<h5>Act First Scenes</h5>
6462
<b-table id="first-scenes-table" :items="ACT_LIST" :fields="firstSceneFields" show-empty>
6563
<template #cell(first_scene)="data">
6664
<p v-if="data.item.first_scene">
@@ -208,6 +206,9 @@
208206
</b-form>
209207
</b-modal>
210208
</b-container>
209+
<div v-else class="text-center py-5">
210+
<b-spinner label="Loading" />
211+
</div>
211212
</template>
212213

213214
<script>
@@ -219,6 +220,7 @@ export default {
219220
name: 'ConfigScenes',
220221
data() {
221222
return {
223+
loading: true,
222224
rowsPerPage: 15,
223225
currentPage: 1,
224226
sceneFields: [
@@ -414,6 +416,7 @@ export default {
414416
async mounted() {
415417
await this.GET_SCENE_LIST();
416418
await this.GET_ACT_LIST();
419+
this.loading = false;
417420
},
418421
methods: {
419422
resetNewForm() {

0 commit comments

Comments
 (0)