-
Notifications
You must be signed in to change notification settings - Fork 11
/
editor.html
145 lines (144 loc) · 7.24 KB
/
editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>The Show Mission Tracker</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css" type="text/css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap-vue.min.css"/>
<link type="text/css" rel="stylesheet" href="css/app.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap-vue.min.js"></script>
<script src="js/vue-select.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="js/model/Mission.js"></script>
<script src="js/editor.min.js"></script>
</head>
<body>
<div id="app" v-cloak>
<b-container fluid class="align-items-center">
<b-row class="mb-3 mt-2 text-center">
<b-col class="w-100">
<b-btn class="w-25" size="lg" variant="primary" @click="addRow">
Add Mission
</b-btn>
<b-btn class="w-25" size="lg" variant="secondary" @click="exportMissions">
Export Data
</b-btn>
</b-col>
</b-row>
<b-row class="text-center" ref="exportArea">
<b-col class="w-100">
<textarea style="height: 100px;" class="w-75 m-3" :value="exportData" align="center"></textarea>
</b-col>
</b-row>
<table class="mb-3 mt-3 table w-75 table-bordered table-striped table-hover table-sm" align="center">
<thead class="thead-light">
<tr>
<th>ID</th>
<th>Player</th>
<th>Rating</th>
<th>Series</th>
<th>Team</th>
<th>Duration</th>
<th>Program Type</th>
<th>Program Name</th>
<th>Requirements</th>
</tr>
</thead>
<tbody>
<tr v-for="mission in missions" v-bind:key="mission.id" @click="editRow(mission)">
<td>{{ mission.id }}</td>
<td>{{ mission.player }}</td>
<td>{{ mission.rating }}</td>
<td>{{ mission.series }}</td>
<td>{{ mission.team }}</td>
<td>{{ mission.duration }}</td>
<td>{{ mission.program_type }}</td>
<td>{{ mission.program }}</td>
<td>{{ mission.requirements.length }}</td>
</tr>
</tbody>
</table>
</b-container>
<b-modal ref="addModal" id="addModal" size="lg" title="Edit/Add Mission" @ok="rowSaved">
<b-form class="m-3">
<h5>Program Description</h5>
<div class="row">
<div class="col">
<b-form-group label="ID">
<b-input type="text" v-model="selectedMission.id"></b-input>
</b-form-group>
</div>
<div class="col">
<b-form-group label="Player Name">
<b-input type="text" v-model="selectedMission.player"></b-input>
</b-form-group>
</div>
</div>
<div class="row">
<div class="col">
<b-form-group label="Rating">
<b-input type="text" v-model="selectedMission.rating"></b-input>
</b-form-group>
</div>
<div class="col">
<b-form-group label="Series">
<v-select :options="settings.series" v-model="selectedMission.series" placeholder="Select a series..." class="w-100"></v-select>
</b-form-group>
</div>
</div>
<div class="row">
<div class="col">
<b-form-group label="Team">
<v-select :options="settings.teams" v-model="selectedMission.team" placeholder="Select a team..." class="w-100"></v-select>
</b-form-group>
</div>
<div class="col">
<b-form-group label="Position">
<v-select :options="settings.positions" v-model="selectedMission.position" placeholder="Select a player position..." class="w-100"></v-select>
</b-form-group>
</div>
</div>
<div class="row">
<div class="col">
<b-form-group label="Program Type">
<v-select :options="settings.program_types" v-model="selectedMission.program_type" placeholder="Select a player mission..." class="w-100"></v-select>
</b-form-group>
</div>
<div class="col">
<b-form-group label="Program">
<b-input type="text" v-model="selectedMission.program"></b-input>
</b-form-group>
</div>
<div class="col">
<b-form-group label="Duration">
<v-select :options="settings.durations" v-model="selectedMission.duration" placeholder="Duration..." class="w-100"></v-select>
</b-form-group>
</div>
</div>
<h5>Requirements</h5>
<div class="mb-3 row" v-for="requirement in selectedMission.requirements">
<div class="col">
<b-input type="text" v-model="requirement.requirement_type"></b-input>
</div>
<div class="col">
<b-btn class="float-right" variant="danger" @click="removeRequirement(requirement)"><i class="octicon octicon-x"></i></b-btn>
<b-input class="float-left w-75" type="text" v-model="requirement.goal"></b-input>
</div>
</div>
<div class="row">
<div class="col">
<b-btn class="w-25" size="sm" variant="primary" @click="addRequirement">
Add Requirement
</b-btn>
</div>
</div>
</b-form>
</b-modal>
</div>
</body>
</html>