@necrolab/dashboard 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +45 -0
- package/.eslintrc.js +24 -0
- package/.prettierignore +1 -0
- package/.prettierrc +10 -0
- package/.vscode/extensions.json +3 -0
- package/ICONS.md +21 -0
- package/README.md +65 -0
- package/backend/api.js +430 -0
- package/backend/auth.js +62 -0
- package/backend/batching.js +43 -0
- package/backend/endpoints.js +343 -0
- package/backend/index.js +23 -0
- package/backend/mock-data.js +66 -0
- package/backend/mock-src/classes/logger.js +112 -0
- package/backend/mock-src/classes/utils.js +42 -0
- package/backend/mock-src/ticketmaster.js +92 -0
- package/backend/validator.js +62 -0
- package/config/configs.json +20 -0
- package/config/filter.json +3 -0
- package/config/presale.csv +3 -0
- package/config/proxies.txt +6 -0
- package/config/used-codes.json +4 -0
- package/index.html +114 -0
- package/index.js +2 -0
- package/jsconfig.json +16 -0
- package/package.json +48 -0
- package/postcss.config.js +6 -0
- package/postinstall.js +9 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/flags/ae.svg +1 -0
- package/public/flags/at.svg +1 -0
- package/public/flags/au.svg +1 -0
- package/public/flags/be.svg +1 -0
- package/public/flags/ch.svg +1 -0
- package/public/flags/cz.svg +1 -0
- package/public/flags/de.svg +1 -0
- package/public/flags/dk.svg +1 -0
- package/public/flags/es.svg +1 -0
- package/public/flags/nl.svg +1 -0
- package/public/flags/no.svg +1 -0
- package/public/flags/nz.svg +1 -0
- package/public/flags/pl.svg +1 -0
- package/public/flags/se.svg +1 -0
- package/public/flags/uk.svg +1 -0
- package/public/flags/us.svg +1 -0
- package/public/img/award.svg +3 -0
- package/public/img/background.svg +14 -0
- package/public/img/bag_w.svg +12 -0
- package/public/img/banks/amex.svg +4 -0
- package/public/img/banks/mastercard.svg +4 -0
- package/public/img/banks/visa.svg +4 -0
- package/public/img/camera.svg +3 -0
- package/public/img/close.svg +3 -0
- package/public/img/controls/disable.svg +5 -0
- package/public/img/controls/enable.svg +5 -0
- package/public/img/groups.svg +3 -0
- package/public/img/hand.svg +3 -0
- package/public/img/key.svg +3 -0
- package/public/img/logo.png +0 -0
- package/public/img/logo_icon.png +0 -0
- package/public/img/logo_icon_2.png +0 -0
- package/public/img/logo_trans.png +0 -0
- package/public/img/loyalty.svg +3 -0
- package/public/img/mail.svg +3 -0
- package/public/img/pencil.svg +3 -0
- package/public/img/profile.svg +4 -0
- package/public/img/reload.svg +3 -0
- package/public/img/sandclock.svg +25 -0
- package/public/img/save.svg +5 -0
- package/public/img/savings.svg +3 -0
- package/public/img/scanner.svg +3 -0
- package/public/img/sell.svg +3 -0
- package/public/img/shield.svg +3 -0
- package/public/img/ski.svg +3 -0
- package/public/img/stadium.svg +8 -0
- package/public/img/stadium_w.svg +8 -0
- package/public/img/timer.svg +3 -0
- package/public/manifest.json +27 -0
- package/public/robots.txt +2 -0
- package/run +10 -0
- package/src/App.vue +307 -0
- package/src/assets/css/_input.scss +197 -0
- package/src/assets/css/main.scss +269 -0
- package/src/assets/css/tailwind.css +3 -0
- package/src/assets/img/award.svg +3 -0
- package/src/assets/img/background.svg +11 -0
- package/src/assets/img/camera.svg +3 -0
- package/src/assets/img/close.svg +3 -0
- package/src/assets/img/eyes/closed.svg +13 -0
- package/src/assets/img/eyes/open.svg +12 -0
- package/src/assets/img/groups.svg +3 -0
- package/src/assets/img/hand.svg +3 -0
- package/src/assets/img/key.svg +3 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/logo_icon.png +0 -0
- package/src/assets/img/logo_icon_2.png +0 -0
- package/src/assets/img/logo_trans.png +0 -0
- package/src/assets/img/loyalty.svg +3 -0
- package/src/assets/img/mail.svg +3 -0
- package/src/assets/img/pencil.svg +3 -0
- package/src/assets/img/reload.svg +3 -0
- package/src/assets/img/savings.svg +3 -0
- package/src/assets/img/scanner.svg +3 -0
- package/src/assets/img/sell.svg +3 -0
- package/src/assets/img/shield.svg +3 -0
- package/src/assets/img/ski.svg +3 -0
- package/src/assets/img/square_check.svg +5 -0
- package/src/assets/img/square_uncheck.svg +5 -0
- package/src/assets/img/stadium.svg +8 -0
- package/src/assets/img/timer.svg +3 -0
- package/src/assets/img/wildcard.svg +7 -0
- package/src/components/Auth/LoginForm.vue +48 -0
- package/src/components/Editors/Account/Account.vue +119 -0
- package/src/components/Editors/Account/AccountCreator.vue +147 -0
- package/src/components/Editors/Account/AccountView.vue +87 -0
- package/src/components/Editors/Account/CreateAccount.vue +106 -0
- package/src/components/Editors/Profile/CreateProfile.vue +321 -0
- package/src/components/Editors/Profile/Profile.vue +142 -0
- package/src/components/Editors/Profile/ProfileCountryChooser.vue +75 -0
- package/src/components/Editors/Profile/ProfileView.vue +96 -0
- package/src/components/Editors/TagLabel.vue +16 -0
- package/src/components/Editors/TagToggle.vue +41 -0
- package/src/components/Filter/Filter.vue +409 -0
- package/src/components/Filter/FilterPreview.vue +236 -0
- package/src/components/Filter/PriceSortToggle.vue +105 -0
- package/src/components/Table/Header.vue +5 -0
- package/src/components/Table/Row.vue +5 -0
- package/src/components/Table/Table.vue +14 -0
- package/src/components/Table/index.js +4 -0
- package/src/components/Tasks/CheckStock.vue +62 -0
- package/src/components/Tasks/Controls/DesktopControls.vue +73 -0
- package/src/components/Tasks/Controls/MobileControls.vue +32 -0
- package/src/components/Tasks/Controls/index.js +3 -0
- package/src/components/Tasks/CreateTaskAXS.vue +339 -0
- package/src/components/Tasks/CreateTaskTM.vue +459 -0
- package/src/components/Tasks/MassEdit.vue +50 -0
- package/src/components/Tasks/QuickSettings.vue +167 -0
- package/src/components/Tasks/ScrapeVenue.vue +42 -0
- package/src/components/Tasks/Stats.vue +66 -0
- package/src/components/Tasks/Task.vue +296 -0
- package/src/components/Tasks/TaskLabel.vue +20 -0
- package/src/components/Tasks/TaskView.vue +126 -0
- package/src/components/Tasks/Utilities.vue +33 -0
- package/src/components/icons/Award.vue +8 -0
- package/src/components/icons/Bag.vue +8 -0
- package/src/components/icons/BagWhite.vue +8 -0
- package/src/components/icons/Box.vue +8 -0
- package/src/components/icons/Camera.vue +8 -0
- package/src/components/icons/Cart.vue +8 -0
- package/src/components/icons/Check.vue +5 -0
- package/src/components/icons/Checkmark.vue +11 -0
- package/src/components/icons/Click.vue +8 -0
- package/src/components/icons/Close.vue +21 -0
- package/src/components/icons/CloseX.vue +5 -0
- package/src/components/icons/Console.vue +13 -0
- package/src/components/icons/Down.vue +8 -0
- package/src/components/icons/Edit.vue +13 -0
- package/src/components/icons/Event.vue +8 -0
- package/src/components/icons/Expand.vue +8 -0
- package/src/components/icons/Filter.vue +13 -0
- package/src/components/icons/Gear.vue +8 -0
- package/src/components/icons/Group.vue +8 -0
- package/src/components/icons/Hand.vue +8 -0
- package/src/components/icons/Key.vue +21 -0
- package/src/components/icons/Logout.vue +13 -0
- package/src/components/icons/Loyalty.vue +8 -0
- package/src/components/icons/Mail.vue +8 -0
- package/src/components/icons/Menu.vue +8 -0
- package/src/components/icons/Pause.vue +5 -0
- package/src/components/icons/Pencil.vue +21 -0
- package/src/components/icons/Play.vue +8 -0
- package/src/components/icons/Plus.vue +8 -0
- package/src/components/icons/Profile.vue +18 -0
- package/src/components/icons/Reload.vue +7 -0
- package/src/components/icons/Sandclock.vue +33 -0
- package/src/components/icons/Savings.vue +8 -0
- package/src/components/icons/Scanner.vue +8 -0
- package/src/components/icons/Scrape.vue +8 -0
- package/src/components/icons/Sell.vue +21 -0
- package/src/components/icons/Shield.vue +8 -0
- package/src/components/icons/Shrink.vue +8 -0
- package/src/components/icons/Ski.vue +8 -0
- package/src/components/icons/Spinner.vue +42 -0
- package/src/components/icons/SquareCheck.vue +18 -0
- package/src/components/icons/SquareUncheck.vue +18 -0
- package/src/components/icons/Stadium.vue +13 -0
- package/src/components/icons/StadiumWhite.vue +13 -0
- package/src/components/icons/Status.vue +8 -0
- package/src/components/icons/Tag.vue +8 -0
- package/src/components/icons/Tasks.vue +13 -0
- package/src/components/icons/Ticket.vue +8 -0
- package/src/components/icons/Timer.vue +8 -0
- package/src/components/icons/Trash.vue +8 -0
- package/src/components/icons/Up.vue +10 -0
- package/src/components/icons/Wildcard.vue +18 -0
- package/src/components/icons/index.js +111 -0
- package/src/components/ui/Modal.vue +61 -0
- package/src/components/ui/Navbar.vue +207 -0
- package/src/components/ui/ReconnectIndicator.vue +90 -0
- package/src/components/ui/Splash.vue +24 -0
- package/src/components/ui/controls/CountryChooser.vue +87 -0
- package/src/components/ui/controls/EyeToggle.vue +11 -0
- package/src/components/ui/controls/atomic/Checkbox.vue +28 -0
- package/src/components/ui/controls/atomic/Dropdown.vue +138 -0
- package/src/components/ui/controls/atomic/LoadingButton.vue +45 -0
- package/src/components/ui/controls/atomic/MultiDropdown.vue +262 -0
- package/src/components/ui/controls/atomic/Switch.vue +84 -0
- package/src/libs/Filter.js +593 -0
- package/src/libs/ansii.js +565 -0
- package/src/libs/panzoom.js +1413 -0
- package/src/main.js +23 -0
- package/src/registerServiceWorker.js +32 -0
- package/src/router/index.js +65 -0
- package/src/stores/cities.json +1 -0
- package/src/stores/connection.js +399 -0
- package/src/stores/countries.js +88 -0
- package/src/stores/logger.js +103 -0
- package/src/stores/requests.js +88 -0
- package/src/stores/sampleData.js +1034 -0
- package/src/stores/ui.js +584 -0
- package/src/stores/utils.js +554 -0
- package/src/types/index.js +42 -0
- package/src/utils/debug.js +1 -0
- package/src/views/Accounts.vue +191 -0
- package/src/views/Console.vue +224 -0
- package/src/views/Editor.vue +785 -0
- package/src/views/FilterBuilder.vue +785 -0
- package/src/views/Login.vue +27 -0
- package/src/views/Profiles.vue +209 -0
- package/src/views/Tasks.vue +157 -0
- package/static/offline.html +184 -0
- package/tailwind.config.js +57 -0
- package/vite.config.js +63 -0
- package/vue.config.js +32 -0
- package/workbox-config.js +66 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
@click="increase"
|
|
4
|
+
:class="[
|
|
5
|
+
'sort-toggle',
|
|
6
|
+
{ 'darker': props.darker }
|
|
7
|
+
]"
|
|
8
|
+
>
|
|
9
|
+
<component :is="getCurrentIcon()" class="icon" />
|
|
10
|
+
<span class="text">{{ getCurrentText() }}</span>
|
|
11
|
+
</button>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { ref } from "vue";
|
|
16
|
+
import { UpIcon, DownIcon, FilterIcon, CheckIcon, CloseIcon } from "@/components/icons";
|
|
17
|
+
|
|
18
|
+
let sortOptions = ref(["none", "asc", "desc", "none"]);
|
|
19
|
+
const currentOpt = ref(0);
|
|
20
|
+
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
filter: Object,
|
|
23
|
+
index: Number,
|
|
24
|
+
expandedFilter: Number,
|
|
25
|
+
filterBuilder: Object,
|
|
26
|
+
options: Object,
|
|
27
|
+
current: String,
|
|
28
|
+
darker: Boolean
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if (props.options) sortOptions.value = props.options;
|
|
32
|
+
if (props.current) currentOpt.value = sortOptions.value.findIndex((s) => s === props.current);
|
|
33
|
+
|
|
34
|
+
const emit = defineEmits(["change"]);
|
|
35
|
+
|
|
36
|
+
const increase = () => {
|
|
37
|
+
currentOpt.value++;
|
|
38
|
+
emit("change", sortOptions.value[currentOpt.value]);
|
|
39
|
+
if (currentOpt.value === (props.options ? sortOptions.value.length : 3)) currentOpt.value = 0;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const getCurrentIcon = () => {
|
|
43
|
+
const current = sortOptions.value[currentOpt.value];
|
|
44
|
+
|
|
45
|
+
// Handle filter options (All, WL, BL)
|
|
46
|
+
if (props.options && props.options.includes('All')) {
|
|
47
|
+
switch (current) {
|
|
48
|
+
case 'All': return FilterIcon;
|
|
49
|
+
case 'WL': return CheckIcon;
|
|
50
|
+
case 'BL': return CloseIcon;
|
|
51
|
+
default: return FilterIcon;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Handle sort options (none, asc, desc)
|
|
56
|
+
switch (current) {
|
|
57
|
+
case 'asc': return UpIcon;
|
|
58
|
+
case 'desc': return DownIcon;
|
|
59
|
+
case 'none':
|
|
60
|
+
default: return FilterIcon;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const getCurrentText = () => {
|
|
65
|
+
const current = sortOptions.value[currentOpt.value];
|
|
66
|
+
|
|
67
|
+
// Handle filter options (All, WL, BL)
|
|
68
|
+
if (props.options && props.options.includes('All')) {
|
|
69
|
+
return current;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Handle sort options
|
|
73
|
+
switch (current) {
|
|
74
|
+
case 'asc': return 'Low';
|
|
75
|
+
case 'desc': return 'High';
|
|
76
|
+
case 'none': return 'None';
|
|
77
|
+
default: return current;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style scoped>
|
|
83
|
+
.sort-toggle {
|
|
84
|
+
@apply flex items-center gap-2 px-3 py-2 bg-dark-500 border border-dark-550 rounded text-gray text-sm font-medium transition-all duration-200 hover:bg-dark-400 hover:text-white hover:border-light-300 focus:outline-none;
|
|
85
|
+
min-width: 80px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.sort-toggle.darker {
|
|
89
|
+
@apply bg-dark-400 text-white border-light-300;
|
|
90
|
+
min-width: 100px;
|
|
91
|
+
height: 40px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.sort-toggle.darker:hover {
|
|
95
|
+
@apply bg-dark-300 border-light-400;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.icon {
|
|
99
|
+
@apply w-4 h-4 flex-shrink-0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.text {
|
|
103
|
+
@apply text-center flex-1;
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="table-component">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<style lang="scss">
|
|
7
|
+
.table-component {
|
|
8
|
+
@apply flex-col bg-clip-padding rounded relative box-border border-2 border-b-0 border-dark-550 bg-dark-500;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.table-component > .grid {
|
|
12
|
+
@apply bg-dark-500;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Modal>
|
|
3
|
+
<template #header> Check Stock <BoxIcon class="ml-4" /> </template>
|
|
4
|
+
<!-- Event ID -->
|
|
5
|
+
<div class="input-wrapper mt-7 mb-4">
|
|
6
|
+
<label class="label-override mb-2">Event ID or URL <StadiumIcon /></label>
|
|
7
|
+
<div class="input-default required">
|
|
8
|
+
<input
|
|
9
|
+
:placeholder="!isEU(ui.currentCountry.siteId) ? '102PDA9125510GYU' : '529171'"
|
|
10
|
+
v-model="eventId"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<!-- Presale Code -->
|
|
15
|
+
<div class="input-wrapper mb-4">
|
|
16
|
+
<label class="label-override mb-2">Presale code <AwardIcon /></label>
|
|
17
|
+
<div class="input-default">
|
|
18
|
+
<input placeholder="Presale code" v-model="presaleCode" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<!-- DID -->
|
|
22
|
+
<div class="input-wrapper mb-4" v-if="!isEU(ui.currentCountry.siteId)">
|
|
23
|
+
<label class="label-override mb-2">DID <AwardIcon /></label>
|
|
24
|
+
<div class="input-default">
|
|
25
|
+
<input placeholder="psl" v-model="eventDid" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<!-- CL ORIGIN -->
|
|
29
|
+
<div class="input-wrapper mb-8" v-if="isEU(ui.currentCountry.siteId)">
|
|
30
|
+
<label class="label-override mb-2">CL Origin / SubChannel ID <AwardIcon /></label>
|
|
31
|
+
<div class="input-default">
|
|
32
|
+
<input placeholder="ORIGIN2" v-model="clOrigin" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<button class="btn-action ml-auto" @click="done()">Check Stock <BoxIcon /></button>
|
|
36
|
+
</Modal>
|
|
37
|
+
</template>
|
|
38
|
+
<style lang="scss" scoped>
|
|
39
|
+
.input-wrapper {
|
|
40
|
+
label {
|
|
41
|
+
@apply flex;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
<script setup>
|
|
46
|
+
import Modal from "@/components/ui/Modal.vue";
|
|
47
|
+
import { StadiumIcon, BoxIcon, AwardIcon } from "@/components/icons";
|
|
48
|
+
import { useUIStore } from "@/stores/ui";
|
|
49
|
+
import { ref } from "vue";
|
|
50
|
+
import { isEU } from "@/stores/utils";
|
|
51
|
+
|
|
52
|
+
const ui = useUIStore();
|
|
53
|
+
const eventId = ref("");
|
|
54
|
+
const presaleCode = ref("");
|
|
55
|
+
const eventDid = ref("");
|
|
56
|
+
const clOrigin = ref("");
|
|
57
|
+
|
|
58
|
+
function done() {
|
|
59
|
+
ui.toggleModal("");
|
|
60
|
+
ui.checkStock(eventId.value, presaleCode.value, eventDid.value, clOrigin.value);
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="task-controls flex-row" v-once>
|
|
3
|
+
<div class="control-buttons mb-4 xl:mb-0">
|
|
4
|
+
<button @click="$emit('startAll')" class="bg-green-400 smooth-hover responsive-button border-none">
|
|
5
|
+
Start <PlayIcon />
|
|
6
|
+
</button>
|
|
7
|
+
<button @click="$emit('stopAll')" class="bg-red-400 smooth-hover responsive-button border-none">
|
|
8
|
+
Stop <PauseIcon />
|
|
9
|
+
</button>
|
|
10
|
+
<button @click="$emit('deleteAll')" class="bg-dark-400 smooth-hover responsive-button border border-light-300 hover:border-light-400">
|
|
11
|
+
Delete <TrashIcon />
|
|
12
|
+
</button>
|
|
13
|
+
<h4 class="text-light-300 text-sm flex-grow xl:flex-initial"></h4>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="flex gap-x-3">
|
|
16
|
+
<button
|
|
17
|
+
:disabled="ui.disabledButtons['add-tasks']"
|
|
18
|
+
class="bg-dark-400 disabled:opacity-70 smooth-hover flex-grow xl:flex-initial w-36 border border-light-300 hover:border-light-400"
|
|
19
|
+
@click="ui.toggleModal('create-task')"
|
|
20
|
+
>
|
|
21
|
+
Create Task
|
|
22
|
+
<PlusIcon class="ml-2" />
|
|
23
|
+
</button>
|
|
24
|
+
|
|
25
|
+
<button
|
|
26
|
+
class="bg-dark-400 smooth-hover flex-grow xl:flex-initial w-36 border border-light-300 hover:border-light-400"
|
|
27
|
+
@click="ui.toggleModal('mass-edit-presale-code')"
|
|
28
|
+
:disabled="ui.disabledButtons['mass-edit']"
|
|
29
|
+
v-if="ui.currentModule == 'TM'"
|
|
30
|
+
>
|
|
31
|
+
Mass Edit
|
|
32
|
+
<EditIcon class="ml-2" />
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
<script setup>
|
|
38
|
+
import { ref } from "vue";
|
|
39
|
+
import { useUIStore } from "@/stores/ui";
|
|
40
|
+
import { PlayIcon, PauseIcon, TrashIcon, ExpandIcon, ShrinkIcon, PlusIcon, EditIcon } from "@/components/icons";
|
|
41
|
+
|
|
42
|
+
const ui = useUIStore();
|
|
43
|
+
const isExpanded = ref(false);
|
|
44
|
+
</script>
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
button {
|
|
47
|
+
@apply text-white h-10 rounded-md text-xs flex items-center justify-center font-medium px-4;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.responsive-button {
|
|
51
|
+
min-width: 80px;
|
|
52
|
+
max-width: 120px;
|
|
53
|
+
@apply flex-grow xl:flex-initial;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.task-controls {
|
|
57
|
+
@apply gap-x-3;
|
|
58
|
+
.control-buttons {
|
|
59
|
+
@apply flex gap-x-3 items-center w-full;
|
|
60
|
+
button {
|
|
61
|
+
svg {
|
|
62
|
+
@apply ml-2;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
.expand-shrink {
|
|
67
|
+
@apply flex gap-x-2;
|
|
68
|
+
button {
|
|
69
|
+
@apply text-white text-xs px-4 flex items-center justify-center gap-x-4 duration-200 border border-light-300 hover:border-light-400;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="mobile-controls flex items-center justify-between" v-once>
|
|
3
|
+
<div class="expand-shrink">
|
|
4
|
+
<button class="mobile-btn" @click="$emit('expand')">
|
|
5
|
+
Expand
|
|
6
|
+
<ExpandIcon />
|
|
7
|
+
</button>
|
|
8
|
+
<button class="mobile-btn" @click="$emit('fold')">
|
|
9
|
+
Fold
|
|
10
|
+
<ShrinkIcon />
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script setup>
|
|
16
|
+
import { useUIStore } from "@/stores/ui";
|
|
17
|
+
|
|
18
|
+
import { PlayIcon, PauseIcon, TrashIcon, ExpandIcon, ShrinkIcon, EditIcon } from "@/components/icons";
|
|
19
|
+
const ui = useUIStore();
|
|
20
|
+
</script>
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
.mobile-controls {
|
|
23
|
+
.expand-shrink {
|
|
24
|
+
@apply flex gap-x-2;
|
|
25
|
+
.mobile-btn {
|
|
26
|
+
@apply text-white text-xs px-3 flex items-center justify-center gap-x-1 h-10 rounded-md bg-dark-400 border border-light-300 hover:border-light-400 transition-all duration-150 font-medium;
|
|
27
|
+
width: 80px;
|
|
28
|
+
font-size: 11px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Modal class="overflow-y-scroll max-w-screen">
|
|
3
|
+
<template #header>
|
|
4
|
+
Create Task
|
|
5
|
+
<img src="@/assets/img/pencil.svg" class="ml-4" />
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<!-- Task Form -->
|
|
10
|
+
<div class="form-grid mt-4 mb-4">
|
|
11
|
+
<!-- Event ID -->
|
|
12
|
+
<div class="input-wrapper">
|
|
13
|
+
<label class="label-override mb-2"
|
|
14
|
+
>Event ID
|
|
15
|
+
<StadiumIcon />
|
|
16
|
+
</label>
|
|
17
|
+
<div class="input-default required">
|
|
18
|
+
<input placeholder="827474" v-model="task.eventId" required />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<!-- Email -->
|
|
22
|
+
<div class="input-wrapper">
|
|
23
|
+
<label class="label-override mb-2"
|
|
24
|
+
>Email
|
|
25
|
+
<MailIcon />
|
|
26
|
+
</label>
|
|
27
|
+
<div class="input-default">
|
|
28
|
+
<input
|
|
29
|
+
placeholder="Email"
|
|
30
|
+
v-model="task.email"
|
|
31
|
+
autocomplete="off"
|
|
32
|
+
data-form-type="other"
|
|
33
|
+
name="axs_email_not_for_auth"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<!-- Proxy -->
|
|
38
|
+
<div class="input-wrapper">
|
|
39
|
+
<label class="label-override mb-2"
|
|
40
|
+
>Proxy
|
|
41
|
+
<CameraIcon />
|
|
42
|
+
</label>
|
|
43
|
+
<div class="input-default">
|
|
44
|
+
<input placeholder="Proxy" v-model="task.proxy" autocomplete="off" />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<!-- Presale Code -->
|
|
48
|
+
<div class="input-wrapper">
|
|
49
|
+
<label class="label-override mb-2"
|
|
50
|
+
>Presale Code
|
|
51
|
+
<AwardIcon />
|
|
52
|
+
</label>
|
|
53
|
+
<div class="input-default">
|
|
54
|
+
<input placeholder="Code" v-model="task.presaleCode" maxlength="15" autocomplete="off" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<!-- Ticket Quantity -->
|
|
58
|
+
<div class="input-wrapper">
|
|
59
|
+
<label class="label-override mb-2"
|
|
60
|
+
>Ticket Quantity
|
|
61
|
+
<BagIcon />
|
|
62
|
+
</label>
|
|
63
|
+
<div class="input-default">
|
|
64
|
+
<input placeholder="20" min="1" type="number" pattern="\d*" v-model="task.quantity" />
|
|
65
|
+
<div class="input-incrementer">
|
|
66
|
+
<button @click="task.quantity++">
|
|
67
|
+
<UpIcon />
|
|
68
|
+
</button>
|
|
69
|
+
<button @click="if (task.quantity > 1) task.quantity--;">
|
|
70
|
+
<DownIcon />
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<!-- Ticket Quantity -->
|
|
76
|
+
<div class="input-wrapper">
|
|
77
|
+
<label class="label-override mb-2">Amount <span class="ml-2" style="height: 18px">#</span></label>
|
|
78
|
+
<div class="input-default">
|
|
79
|
+
<input placeholder="20" min="1" type="number" pattern="\d*" v-model="task.taskQuantity" />
|
|
80
|
+
<div class="input-incrementer">
|
|
81
|
+
<button @click="task.taskQuantity++">
|
|
82
|
+
<UpIcon />
|
|
83
|
+
</button>
|
|
84
|
+
<button @click="if (task.taskQuantity > 1) task.taskQuantity--;">
|
|
85
|
+
<DownIcon />
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
<!-- Profile Tag(s) -->
|
|
92
|
+
<div class="input-wrapper" style="z-index: 50 !important">
|
|
93
|
+
<label class="label-override mb-2"
|
|
94
|
+
>Profile Tag(s)
|
|
95
|
+
<TagIcon />
|
|
96
|
+
</label>
|
|
97
|
+
<MultiDropdown
|
|
98
|
+
class="w-full will-change-auto input-default"
|
|
99
|
+
:onSelect="(v) => (task.profileTags = v)"
|
|
100
|
+
default="Any"
|
|
101
|
+
:options="
|
|
102
|
+
profileTagsOptions.map((opt) => {
|
|
103
|
+
return { label: opt, value: opt };
|
|
104
|
+
})
|
|
105
|
+
"
|
|
106
|
+
/>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- Account Tag -->
|
|
110
|
+
<div class="input-wrapper">
|
|
111
|
+
<label class="label-override mb-2"
|
|
112
|
+
>Account Tag
|
|
113
|
+
<ScannerIcon />
|
|
114
|
+
</label>
|
|
115
|
+
|
|
116
|
+
<Dropdown
|
|
117
|
+
:onClick="(f) => (task.accountTag = f)"
|
|
118
|
+
default="Default tag"
|
|
119
|
+
:chosen="task.accountTag"
|
|
120
|
+
:options="accountTagOptions"
|
|
121
|
+
:allowDefault="false"
|
|
122
|
+
:capitalize="true"
|
|
123
|
+
class="input-default dropdown p-4 w-full"
|
|
124
|
+
/>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="input-wrapper">
|
|
128
|
+
<label class="label-override mb-2">Start Offset (Minutes)<ShieldIcon /></label>
|
|
129
|
+
<div class="input-default">
|
|
130
|
+
<input placeholder="120" type="number" pattern="\d*" v-model="task.startOffset" />
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<div class="input-wrapper">
|
|
135
|
+
<label class="label-override mb-2"
|
|
136
|
+
>Promo ID
|
|
137
|
+
<AwardIcon />
|
|
138
|
+
</label>
|
|
139
|
+
<div class="input-default">
|
|
140
|
+
<input placeholder="63668" v-model="task.promoId" />
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="border border-light-300 mb-3" />
|
|
145
|
+
<!-- Task Switches -->
|
|
146
|
+
<div class="grid grid-cols-4 gap-y-4 mb-4 justify-between task-switches">
|
|
147
|
+
<div class="switch-wrapper flex flex-col">
|
|
148
|
+
<h4>
|
|
149
|
+
<span class="hidden xs:block">Do Not Pay</span>
|
|
150
|
+
<span class="block xs:hidden">DNP</span>
|
|
151
|
+
<SavingsIcon class="scale-90" />
|
|
152
|
+
</h4>
|
|
153
|
+
<Switch class="mx-auto" v-model="task.doNotPay" />
|
|
154
|
+
</div>
|
|
155
|
+
<div class="switch-wrapper flex flex-col">
|
|
156
|
+
<h4>
|
|
157
|
+
<span class="hidden xs:block">Smart Timer</span>
|
|
158
|
+
<span class="block xs:hidden">Timer</span>
|
|
159
|
+
<TimerIcon class="scale-90" />
|
|
160
|
+
</h4>
|
|
161
|
+
<Switch class="mx-auto" v-model="task.smartTimer" />
|
|
162
|
+
</div>
|
|
163
|
+
<div class="switch-wrapper flex flex-col">
|
|
164
|
+
<h4>
|
|
165
|
+
<span class="hidden xs:block">Quick Queue</span>
|
|
166
|
+
<span class="block xs:hidden">Quick Q.</span> <SkiIcon class="scale-90" />
|
|
167
|
+
</h4>
|
|
168
|
+
<Switch class="mx-auto" v-model="task.quickQueue" />
|
|
169
|
+
</div>
|
|
170
|
+
<div class="switch-wrapper flex flex-col">
|
|
171
|
+
<h4>
|
|
172
|
+
<span class="hidden xs:block">Manual</span>
|
|
173
|
+
</h4>
|
|
174
|
+
<Switch class="mx-auto" v-model="task.manual" />
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<!-- Task prefab -->
|
|
179
|
+
<div class="border border-light-300 my-3" />
|
|
180
|
+
<button class="btn-action mx-auto" @click="createTask">
|
|
181
|
+
Create
|
|
182
|
+
<EditIcon />
|
|
183
|
+
</button>
|
|
184
|
+
</Modal>
|
|
185
|
+
</template>
|
|
186
|
+
|
|
187
|
+
<script setup>
|
|
188
|
+
import { ref, watch } from "vue";
|
|
189
|
+
import Modal from "@/components/ui/Modal.vue";
|
|
190
|
+
import Switch from "@/components/ui/controls/atomic/Switch.vue";
|
|
191
|
+
import {
|
|
192
|
+
MailIcon,
|
|
193
|
+
CameraIcon,
|
|
194
|
+
AwardIcon,
|
|
195
|
+
StadiumIcon,
|
|
196
|
+
ScannerIcon,
|
|
197
|
+
BagIcon,
|
|
198
|
+
TagIcon,
|
|
199
|
+
SkiIcon,
|
|
200
|
+
HandIcon,
|
|
201
|
+
GroupIcon,
|
|
202
|
+
ShieldIcon,
|
|
203
|
+
TimerIcon,
|
|
204
|
+
SavingsIcon,
|
|
205
|
+
EditIcon,
|
|
206
|
+
UpIcon,
|
|
207
|
+
DownIcon,
|
|
208
|
+
SandclockIcon,
|
|
209
|
+
CartIcon
|
|
210
|
+
} from "@/components/icons";
|
|
211
|
+
import { useUIStore } from "@/stores/ui";
|
|
212
|
+
import Dropdown from "@/components/ui/controls/atomic/Dropdown.vue";
|
|
213
|
+
import MultiDropdown from "@/components/ui/controls/atomic/MultiDropdown.vue";
|
|
214
|
+
import { isEU, removeDuplicates } from "@/stores/utils";
|
|
215
|
+
|
|
216
|
+
const ui = useUIStore();
|
|
217
|
+
|
|
218
|
+
const accountTagOptions = ref(ui.profile.accountTags);
|
|
219
|
+
const defaultTags = ["Amex", "Visa", "Master"];
|
|
220
|
+
|
|
221
|
+
const profileTagsOptions = ref(removeDuplicates(["Any", ...defaultTags, ...ui.profile.profileTags]));
|
|
222
|
+
|
|
223
|
+
const baseTask = ref({
|
|
224
|
+
selected: false,
|
|
225
|
+
taskId: "",
|
|
226
|
+
active: false,
|
|
227
|
+
eventId: "",
|
|
228
|
+
status: "Created",
|
|
229
|
+
presaleCode: "",
|
|
230
|
+
quantity: 4,
|
|
231
|
+
reservedTicketsList: "ticket1-ticket2-ticket3",
|
|
232
|
+
email: "",
|
|
233
|
+
password: "",
|
|
234
|
+
proxy: "",
|
|
235
|
+
manual: true,
|
|
236
|
+
doNotPay: false,
|
|
237
|
+
quickQueue: false,
|
|
238
|
+
smartTimer: false,
|
|
239
|
+
accountTag: accountTagOptions.value[0],
|
|
240
|
+
profileTags: ["Any"],
|
|
241
|
+
taskQuantity: 1,
|
|
242
|
+
promoId: ""
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
const task = ref(ui.modalData[`task_${ui.currentCountry.siteId}`] || baseTask);
|
|
246
|
+
|
|
247
|
+
function createTask() {
|
|
248
|
+
ui.logger.Info("Created new task", task.value);
|
|
249
|
+
const eventIds = task.value.eventId.split(",").map((t) => t.trim());
|
|
250
|
+
const presaleCodes = task.value.presaleCode ? task.value.presaleCode.split(",").map((t) => t.trim()) : [undefined];
|
|
251
|
+
eventIds.forEach((eventId) => {
|
|
252
|
+
presaleCodes.forEach((presaleCode) => {
|
|
253
|
+
const t = { ...task.value, eventId: eventId, presaleCode: presaleCode };
|
|
254
|
+
ui.addNewTask(t);
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
watch(
|
|
260
|
+
() => task.value.profileTags,
|
|
261
|
+
(newTags) => {
|
|
262
|
+
ui.logger.Info("Profile tags update", newTags, task.value);
|
|
263
|
+
if (!newTags.length) task.value.profileTags.push("Any");
|
|
264
|
+
else if (newTags.length === profileTagsOptions.value.length - 1 && profileTagsOptions.value.length !== 3)
|
|
265
|
+
task.value.profileTags = ["Any"];
|
|
266
|
+
else if (newTags.length > 1 && newTags.includes("Any"))
|
|
267
|
+
task.value.profileTags = task.value.profileTags = newTags.filter((e) => e != "Any");
|
|
268
|
+
}
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
watch(() => task.value, (ui.modalData[`task_${ui.currentCountry.siteId}`] = task.value));
|
|
272
|
+
|
|
273
|
+
watch(
|
|
274
|
+
() => task.value.eventId,
|
|
275
|
+
(url) => {
|
|
276
|
+
ui.logger.Info("URL changed", url);
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
|
|
280
|
+
// fetchConfigs();
|
|
281
|
+
</script>
|
|
282
|
+
|
|
283
|
+
<style lang="scss" scoped>
|
|
284
|
+
.label-override {
|
|
285
|
+
@apply flex;
|
|
286
|
+
color: #6e7084 !important;
|
|
287
|
+
|
|
288
|
+
img {
|
|
289
|
+
@apply ml-2;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.task-switches {
|
|
294
|
+
h4 {
|
|
295
|
+
color: #6e7084;
|
|
296
|
+
@apply text-xs text-center flex items-center gap-x-2 mx-auto;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.switch-wrapper {
|
|
300
|
+
@apply gap-y-2;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
@media (max-width: 720px) {
|
|
305
|
+
.task-switches {
|
|
306
|
+
h4 {
|
|
307
|
+
font-size: 12px !important;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
</style>
|
|
312
|
+
<style lang="scss" scoped>
|
|
313
|
+
.label-override {
|
|
314
|
+
svg {
|
|
315
|
+
@apply ml-2;
|
|
316
|
+
|
|
317
|
+
path {
|
|
318
|
+
fill: #6e7084 !important;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
@apply flex items-center;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.switch-wrapper {
|
|
325
|
+
svg {
|
|
326
|
+
path {
|
|
327
|
+
fill: #6e7084 !important;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.z-inf {
|
|
333
|
+
z-index: 1000;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.z-inf2 {
|
|
337
|
+
z-index: 2000;
|
|
338
|
+
}
|
|
339
|
+
</style>
|