This commit is contained in:
2023-06-23 07:56:45 +10:00
parent fd6867740e
commit 8906936e51
23 changed files with 460 additions and 1100 deletions

View File

@@ -18,6 +18,7 @@
"league/flysystem-aws-s3-v3": "^3.12",
"owen-it/laravel-auditing": "^13.1",
"php-ffmpeg/php-ffmpeg": "^1.1",
"square/square": "28.0.1.20230608",
"sunspikes/clamav-validator": "*",
"thiagoalessio/tesseract_ocr": "^2.12",
"vlucas/phpdotenv": "^5.5"

329
composer.lock generated
View File

@@ -4,8 +4,223 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "da0c8af3d32e5c24161a1a419da7c22a",
"content-hash": "c2106c68b2c6082ba4648e518b942b85",
"packages": [
{
"name": "apimatic/core",
"version": "0.3.1",
"source": {
"type": "git",
"url": "https://github.com/apimatic/core-lib-php.git",
"reference": "8e7154a40a1c14f34294357f3a8e03541ddf4714"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/apimatic/core-lib-php/zipball/8e7154a40a1c14f34294357f3a8e03541ddf4714",
"reference": "8e7154a40a1c14f34294357f3a8e03541ddf4714",
"shasum": ""
},
"require": {
"apimatic/core-interfaces": "~0.1.0",
"apimatic/jsonmapper": "^3.1.1",
"ext-curl": "*",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"php": "^7.2 || ^8.0",
"php-jsonpointer/php-jsonpointer": "^3.0.2"
},
"require-dev": {
"phan/phan": "5.4.2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Core\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Core logic and the utilities for the Apimatic's PHP SDK",
"homepage": "https://github.com/apimatic/core-lib-php",
"keywords": [
"apimatic",
"core",
"corelib",
"php"
],
"support": {
"issues": "https://github.com/apimatic/core-lib-php/issues",
"source": "https://github.com/apimatic/core-lib-php/tree/0.3.1"
},
"time": "2023-06-14T07:32:12+00:00"
},
{
"name": "apimatic/core-interfaces",
"version": "0.1.2",
"source": {
"type": "git",
"url": "https://github.com/apimatic/core-interfaces-php.git",
"reference": "183214195a79784c382a446795c46ca8c1f43cc1"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/apimatic/core-interfaces-php/zipball/183214195a79784c382a446795c46ca8c1f43cc1",
"reference": "183214195a79784c382a446795c46ca8c1f43cc1",
"shasum": ""
},
"require": {
"php": "^7.2 || ^8.0"
},
"type": "library",
"autoload": {
"psr-4": {
"CoreInterfaces\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Definition of the behavior of apimatic/core, apimatic/unirest-php and Apimatic's PHP SDK",
"homepage": "https://github.com/apimatic/core-interfaces-php",
"keywords": [
"apimatic",
"core",
"corelib",
"interface",
"php",
"unirest"
],
"support": {
"issues": "https://github.com/apimatic/core-interfaces-php/issues",
"source": "https://github.com/apimatic/core-interfaces-php/tree/0.1.2"
},
"time": "2023-04-04T06:40:52+00:00"
},
{
"name": "apimatic/jsonmapper",
"version": "3.1.2",
"source": {
"type": "git",
"url": "https://github.com/apimatic/jsonmapper.git",
"reference": "6673a946c21f2ceeec0cb60d17541c11a22bc79d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/apimatic/jsonmapper/zipball/6673a946c21f2ceeec0cb60d17541c11a22bc79d",
"reference": "6673a946c21f2ceeec0cb60d17541c11a22bc79d",
"shasum": ""
},
"require": {
"ext-json": "*",
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
"squizlabs/php_codesniffer": "^3.0.0"
},
"type": "library",
"autoload": {
"psr-4": {
"apimatic\\jsonmapper\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"OSL-3.0"
],
"authors": [
{
"name": "Christian Weiske",
"email": "christian.weiske@netresearch.de",
"homepage": "http://www.netresearch.de/",
"role": "Developer"
},
{
"name": "Mehdi Jaffery",
"email": "mehdi.jaffery@apimatic.io",
"homepage": "http://apimatic.io/",
"role": "Developer"
}
],
"description": "Map nested JSON structures onto PHP classes",
"support": {
"email": "mehdi.jaffery@apimatic.io",
"issues": "https://github.com/apimatic/jsonmapper/issues",
"source": "https://github.com/apimatic/jsonmapper/tree/3.1.2"
},
"time": "2023-06-08T04:27:10+00:00"
},
{
"name": "apimatic/unirest-php",
"version": "4.0.5",
"source": {
"type": "git",
"url": "https://github.com/apimatic/unirest-php.git",
"reference": "e16754010c16be5473289470f129d87a0f41b55e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/apimatic/unirest-php/zipball/e16754010c16be5473289470f129d87a0f41b55e",
"reference": "e16754010c16be5473289470f129d87a0f41b55e",
"shasum": ""
},
"require": {
"apimatic/core-interfaces": "^0.1.0",
"ext-curl": "*",
"ext-json": "*",
"php": "^7.2 || ^8.0"
},
"require-dev": {
"phan/phan": "5.4.2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Unirest\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Mashape",
"email": "opensource@mashape.com",
"homepage": "https://www.mashape.com",
"role": "Developer"
},
{
"name": "APIMATIC",
"email": "opensource@apimatic.io",
"homepage": "https://www.apimatic.io",
"role": "Developer"
}
],
"description": "Unirest PHP",
"homepage": "https://github.com/apimatic/unirest-php",
"keywords": [
"client",
"curl",
"http",
"https",
"rest"
],
"support": {
"email": "opensource@apimatic.io",
"issues": "https://github.com/apimatic/unirest-php/issues",
"source": "https://github.com/apimatic/unirest-php/tree/4.0.5"
},
"time": "2023-04-25T14:19:45+00:00"
},
{
"name": "aws/aws-crt-php",
"version": "v1.2.1",
@@ -3246,6 +3461,62 @@
},
"time": "2022-12-09T13:57:05+00:00"
},
{
"name": "php-jsonpointer/php-jsonpointer",
"version": "v3.0.2",
"source": {
"type": "git",
"url": "https://github.com/raphaelstolt/php-jsonpointer.git",
"reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/raphaelstolt/php-jsonpointer/zipball/4428f86c6f23846e9faa5a420c4ef14e485b3afb",
"reference": "4428f86c6f23846e9faa5a420c4ef14e485b3afb",
"shasum": ""
},
"require": {
"php": ">=5.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^1.11",
"phpunit/phpunit": "4.6.*"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"autoload": {
"psr-0": {
"Rs\\Json": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Raphael Stolt",
"email": "raphael.stolt@gmail.com",
"homepage": "http://raphaelstolt.blogspot.com/"
}
],
"description": "Implementation of JSON Pointer (http://tools.ietf.org/html/rfc6901)",
"homepage": "https://github.com/raphaelstolt/php-jsonpointer",
"keywords": [
"json",
"json pointer",
"json traversal"
],
"support": {
"issues": "https://github.com/raphaelstolt/php-jsonpointer/issues",
"source": "https://github.com/raphaelstolt/php-jsonpointer/tree/master"
},
"time": "2016-08-29T08:51:01+00:00"
},
{
"name": "phpoption/phpoption",
"version": "1.9.1",
@@ -4096,6 +4367,62 @@
],
"time": "2023-04-28T07:47:42+00:00"
},
{
"name": "square/square",
"version": "28.0.1.20230608",
"source": {
"type": "git",
"url": "https://github.com/square/square-php-sdk.git",
"reference": "42bec211bef27a384b39afbbb977fe3342cb1216"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/square/square-php-sdk/zipball/42bec211bef27a384b39afbbb977fe3342cb1216",
"reference": "42bec211bef27a384b39afbbb977fe3342cb1216",
"shasum": ""
},
"require": {
"apimatic/core": "~0.3.0",
"apimatic/core-interfaces": "~0.1.0",
"apimatic/unirest-php": "^4.0.0",
"ext-json": "*",
"php": "^7.2 || ^8.0"
},
"require-dev": {
"phan/phan": "5.4.2",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"squizlabs/php_codesniffer": "^3.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Square\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Square Developer Platform",
"email": "developers@squareup.com",
"homepage": "https://squareup.com/developers"
}
],
"description": "Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.",
"homepage": "https://squareup.com/developers",
"keywords": [
"api",
"sdk",
"square"
],
"support": {
"issues": "https://github.com/square/square-php-sdk/issues",
"source": "https://github.com/square/square-php-sdk/tree/28.0.1.20230608"
},
"time": "2023-06-14T21:35:50+00:00"
},
{
"name": "sunspikes/clamav-validator",
"version": "v2.7.0",

897
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -32,18 +32,12 @@
},
"dependencies": {
"@vitejs/plugin-vue": "^4.0.0",
"@vuepic/vue-datepicker": "^5.1.2",
"dompurify": "^3.0.0",
"dotenv": "^16.0.3",
"md-editor-v3": "^4.2.0",
"pinia": "^2.0.28",
"pinia-plugin-persistedstate": "^3.0.1",
"sass": "^1.63.1",
"vue": "^3.2.36",
"vue-dompurify-html": "^4.1.4",
"vue-final-modal": "^4.4.2",
"vue-loader": "^17.2.2",
"vue-router": "^4.2.2",
"vue3-easy-data-table": "^1.5.24"
"vue-router": "^4.2.2"
}
}

View File

@@ -37,7 +37,6 @@ watch(
* Handle the user submitting the form.
*/
const handleSubmit = async function () {
console.log("form-submit");
inputs = Array.from(document.querySelectorAll(`#${id} input`));
for (let i = inputs.length - 1; i >= 0; i--) {

View File

@@ -1,56 +0,0 @@
<template>
<div class="group-buttons">
<div
:class="['group-button', { active: props.active == button.name }]"
v-for="button in props.buttons"
:key="button.name">
<ion-icon :name="button.icon" @click="handleClick(button.name)" />
</div>
</div>
</template>
<script setup lang="ts">
interface Button {
name: string;
icon: string;
}
const props = defineProps({
buttons: {
type: Array as () => Button[],
required: true,
},
active: {
type: String,
default: "",
required: false,
},
});
const emits = defineEmits(["click"]);
const handleClick = (name: string) => {
emits("click", name);
};
</script>
<style lang="scss">
.group-buttons {
display: flex;
border: 1px solid var(--base-color-darker);
border-radius: 8px;
margin-bottom: 16px;
.group-button {
padding: 8px 12px 5px 12px;
&:not(:last-of-type) {
border-right: 1px solid var(--base-color-darker);
}
&.active ion-icon {
color: var(--primary-color);
}
}
}
</style>

View File

@@ -1,74 +0,0 @@
<template>
<component :is="computedContent"></component>
</template>
<script setup lang="ts">
import DOMPurify from "dompurify";
import { computed } from "vue";
import { ImportMetaExtras } from "../../../import-meta";
import SMImageGallery from "./SMImageGallery.vue";
const props = defineProps({
html: {
type: String,
default: "",
required: true,
},
});
/**
* Return the html as a component, relative links as router-link and sanitized.
*/
const computedContent = computed(() => {
let html = "";
// Sanitize HTML
html = DOMPurify.sanitize(html);
// Convert local links to router-links
const regexHref = new RegExp(
`<a ([^>]*?)href="${
(import.meta as ImportMetaExtras).env.APP_URL
}(.*?>.*?)</a>`,
"ig"
);
html = props.html.replace(regexHref, '<router-link $1to="$2</router-link>');
// Convert image galleries to SMImageGallery component
const regexGallery =
/<div.*?class="tinymce-gallery".*?>\s*((?:<div class="tinymce-gallery-item" style="background-image: url\('.*?'\);">.*?<\/div>\s*)*)<\/div>/gi;
const matches = [...html.matchAll(regexGallery)];
for (const match of matches) {
const images = match[1]; // Extract the captured group from the match
const imageSrcs = images
.match(/style="background-image: url\('(.*?)'\)/gi)
.map((m) => m.match(/background-image: url\('(.*?)'\)/i)[1]);
const smImageGallery = `<SMImageGallery :images='${JSON.stringify(
imageSrcs
)}' />`;
html = html.replace(images, smImageGallery);
}
// Update local images to use at most the large size
const regexImg = new RegExp(
`<img ([^>]*?)src="${
(import.meta as ImportMetaExtras).env.APP_URL
}/storage/([^"]*?)"`,
"ig"
);
html = html.replace(
regexImg,
`<img $1src="${
(import.meta as ImportMetaExtras).env.APP_URL
}/storage/$2?size=large"`
);
return {
template: `<div class="html">${html}</div>`,
components: {
SMImageGallery,
},
};
});
</script>

View File

@@ -250,14 +250,31 @@
<svg
xmlns="http://www.w3.org/2000/svg"
class="w-6 h-6"
viewBox="0 0 20 20"
fill="currentColor">
viewBox="0 0 20 20">
<path
fill-rule="evenodd"
d="M3 5a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 5a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1zm0 5a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H4a1 1 0 0 1-1-1z"
clip-rule="evenodd"></path>
clip-rule="evenodd"
fill="currentColor" />
</svg>
</button>
<router-link
:to="{ name: 'cart' }"
id="navbar-cart"
class="block cursor-pointer select-none relative"
><svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 -960 960 960"
class="w-6 h-6 pointer-events-none">
<path
d="M220-80q-24 0-42-18t-18-42v-520q0-24 18-42t42-18h110v-10q0-63 43.5-106.5T480-880q63 0 106.5 43.5T630-730v10h110q24 0 42 18t18 42v520q0 24-18 42t-42 18H220Zm0-60h520v-520H630v90q0 12.75-8.675 21.375-8.676 8.625-21.5 8.625-12.825 0-21.325-8.625T570-570v-90H390v90q0 12.75-8.675 21.375-8.676 8.625-21.5 8.625-12.825 0-21.325-8.625T330-570v-90H220v520Zm170-580h180v-10q0-38-26-64t-64-26q-38 0-64 26t-26 64v10ZM220-140v-520 520Z"
fill="currentColor" />
</svg>
<div
class="absolute flex items-center flex-justify-center -top-2 -right-4 bg-red text-3 p-1 w-5 h-5 rounded-9 text-white">
14
</div>
</router-link>
</div>
</div>
<div
@@ -361,13 +378,15 @@ onUnmounted(() => {
background-color: #fff;
#navbar-logo,
#navbar-toggle {
#navbar-toggle,
#navbar-cart {
color: #000 !important;
}
}
#navbar-logo,
#navbar-toggle {
#navbar-toggle,
#navbar-cart {
color: #000;
}
@@ -388,7 +407,8 @@ onUnmounted(() => {
box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
#navbar-logo,
#navbar-toggle {
#navbar-toggle,
#navbar-cart {
color: #fff;
}
}

View File

@@ -1,7 +1,7 @@
<template>
<div
ref="toast"
class="border-1 border-gray-2 bg-white rounded-md p-4 mt-4 mb-4"
class="border-1 border-gray-2 bg-white rounded-md p-4 mt-4 mb-4 pointer-events-auto"
:style="styles">
<div :class="['max-w-48', 'border-l-5', 'pl-4', 'relative', colour]">
<svg
@@ -107,54 +107,3 @@ onMounted(() => {
}, 200);
});
</script>
<!-- <style lang="scss">
.toast {
position: relative;
font-size: 80%;
background-color: var(--base-color-light);
padding: 16px;
border-radius: 12px;
border: 1px solid var(--base-color-border);
box-shadow: var(--base-shadow);
margin-bottom: 32px;
transition: opacity 0.2s ease-in, margin 0.2s ease-in;
.toast-inner {
border-left: 6px solid var(--primary-color);
padding: 8px 32px 8px 16px;
max-width: 250px;
}
.title {
margin-top: 0 !important;
}
p {
margin-bottom: 0;
word-wrap: break-word;
}
ion-icon {
font-size: 150%;
position: absolute;
top: 15px;
right: 15px;
color: var(--base-color-text);
cursor: pointer;
transition: color 0.1s linear;
&:hover {
color: var(--danger-color);
}
}
&.success .toast-inner {
border-left-color: var(--success-color);
}
&.danger .toast-inner {
border-left-color: var(--danger-color);
}
}
</style> -->

View File

@@ -1,5 +1,7 @@
<template>
<div class="toast-container" v-if="toastStore.toasts">
<div
class="fixed top-1 right-1 z-10 overflow-hidden pointer-events-none"
v-if="toastStore.toasts">
<SMToast
v-for="toast of toastStore.toasts"
:id="toast.id"
@@ -16,14 +18,3 @@ import SMToast from "./SMToast.vue";
const toastStore = useToastStore();
</script>
<style lang="scss">
.toast-container {
position: fixed;
top: 16px;
right: 16px;
z-index: 3000;
padding: 10px;
overflow: hidden;
}
</style>

View File

@@ -5,7 +5,7 @@
<div
class="max-w-2xl mx-auto border-1 bg-white rounded-xl mt-7xl text-gray-5 px-12 py-8">
<h1 class="mb-4">{{ props.title }}</h1>
<p class="mb-4" v-html="computedSanitizedText"></p>
<p class="mb-4" v-html="props.text"></p>
<div class="flex flex-justify-between pt-4">
<button
class="font-medium px-6 py-1.5 rounded-md hover:shadow-md transition text-sm bg-sky-600 hover:bg-sky-500 text-white cursor-pointer"
@@ -23,8 +23,7 @@
</template>
<script setup lang="ts">
import DOMPurify from "dompurify";
import { computed, onMounted, onUnmounted } from "vue";
import { onMounted, onUnmounted } from "vue";
import { closeDialog } from "../SMDialog";
import { useApplicationStore } from "../../store/ApplicationStore";
@@ -73,13 +72,6 @@ const handleClickConfirm = () => {
closeDialog(true);
};
/**
* Sanitize the text property from XSS attacks.
*/
const computedSanitizedText = computed(() => {
return DOMPurify.sanitize(props.text);
});
/**
* Handle a keyboard event in this component.
* @param {KeyboardEvent} event The keyboard event.

View File

@@ -10,7 +10,7 @@
<SMTabGroup v-model="selectedTab">
<SMTab id="tab-browser" label="Media Browser">
<div class="flex mb-4">
<SMGroupButtons
<div
:buttons="[
{
name: 'grid',
@@ -22,7 +22,7 @@
},
]"
:active="listActive"
@click="handleClickLayout" />
@click="handleClickLayout"></div>
<SMInput
v-model="itemSearch"
label="Search"
@@ -170,7 +170,6 @@ import { Media, MediaCollection, MediaResponse } from "../../helpers/api.types";
import { useApplicationStore } from "../../store/ApplicationStore";
import { mediaGetVariantUrl } from "../../helpers/media";
import SMInput from "../SMInput.vue";
import SMGroupButtons from "../SMGroupButtons.vue";
import SMPagination from "../SMPagination.vue";
import SMLoading from "../SMLoading.vue";
import SMTabGroup from "../SMTabGroup.vue";

View File

@@ -0,0 +1,36 @@
const appId = "sandbox-sq0idb-FYI93DDPJk0wJvaU0ye4MQ";
const locationId = "LQ0C6GMZEWVQ0";
const square = null;
export const initCard = (): Object => {
const scriptSrc = "https://sandbox.web.squarecdn.com/v1/square.js";
if (!document.querySelector(`script[src="${scriptSrc}"]`)) {
const script = document.createElement("script");
script.type = "text/javascript";
script.src = scriptSrc;
script.onload = async () => {
if (!window.Square) {
console.log("Square failed to load properly");
}
let payments;
try {
payments = window.Square.payments(appId, locationId);
} catch (e) {
console.log("Square: Missing credentials", e);
return;
}
let card;
try {
card = await payments.card();
await card.attach("#card-container");
} catch (e) {
console.error("Initializing Card failed", e);
return;
}
};
document.head.appendChild(script);
}
};

View File

@@ -426,6 +426,14 @@ export const routes = [
},
component: () => import("@/views/ForgotPassword.vue"),
},
{
path: "/cart",
name: "cart",
meta: {
title: "Cart",
},
component: () => import("@/views/Cart.vue"),
},
{
path: "/:catchAll(.*)",
name: "not-found",
@@ -589,7 +597,6 @@ router.afterEach((to, from) => {
}
applicationStore.hydrated = true;
console.log("hydrated");
});
export default router;

View File

@@ -48,7 +48,6 @@
import { ref, Ref } from "vue";
import { useRoute } from "vue-router";
import SMAttachments from "../components/SMAttachments.vue";
import SMHTML from "../components/SMHTML.vue";
import { api } from "../helpers/api";
import { Article, ArticleCollection, User } from "../helpers/api.types";
import { SMDate } from "../helpers/datetime";
@@ -58,7 +57,6 @@ import { userHasPermission } from "../helpers/utils";
import SMLoading from "../components/SMLoading.vue";
import SMPageStatus from "../components/SMPageStatus.vue";
import { MdPreview } from "md-editor-v3";
// import "md-editor-v3/lib/preview.css";
const applicationStore = useApplicationStore();

View File

@@ -0,0 +1,3 @@
<template>
<div>CART</div>
</template>

View File

@@ -23,7 +23,9 @@
class="max-w-4xl mx-auto px-4 flex flex-col-reverse sm:flex-row">
<div class="sm:pr-8 mt-4 sm:mt-0">
<h1 class="pb-6">{{ event.title }}</h1>
<SMHTML :html="event.content" class="workshop-content" />
<MdPreview
:model-value="event.content"
class="workshop-content" />
<SMAttachments :attachments="event.attachments || []" />
</div>
<div class="sm:min-w-68">
@@ -169,7 +171,6 @@
<script setup lang="ts">
import { computed, Ref, ref } from "vue";
import { useRoute } from "vue-router";
import SMHTML from "../components/SMHTML.vue";
import SMAttachments from "../components/SMAttachments.vue";
import { api } from "../helpers/api";
import { Event, EventResponse } from "../helpers/api.types";
@@ -180,6 +181,7 @@ import { mediaGetVariantUrl } from "../helpers/media";
import { userHasPermission } from "../helpers/utils";
import SMLoading from "../components/SMLoading.vue";
import SMPageStatus from "../components/SMPageStatus.vue";
import { MdPreview } from "md-editor-v3";
const applicationStore = useApplicationStore();

View File

@@ -99,7 +99,6 @@ let form = reactive(
);
const handleSubmit = async () => {
console.log("here");
form.loading(true);
try {

View File

@@ -161,7 +161,6 @@ const handleLoad = async () => {
itemsTotal.value = data.total;
} catch (error) {
console.log(error);
if (error.status != 404) {
toastStore.addToast({
title: "Server Error",

View File

@@ -173,7 +173,6 @@ const loadData = async () => {
};
const handleSubmit = async () => {
console.log("handle.-submit");
try {
let data = {
title: form.controls.title.value,

View File

@@ -363,7 +363,6 @@ const handleDeleteSelected = async () => {
await Promise.all(
deleteItems.map(async ([key, value]) => {
// Perform actions for each item that is true
console.log(key, value);
// Perform asynchronous operation
try {

View File

@@ -56,6 +56,7 @@
</div>
</SMForm>
</div>
<div id="card-container"></div>
</template>
</template>
@@ -77,6 +78,7 @@ import { userHasPermission } from "../../helpers/utils";
import SMLoading from "../../components/SMLoading.vue";
import SMPageStatus from "../../components/SMPageStatus.vue";
import SMCheckbox from "../../components/SMCheckbox.vue";
import { initCard } from "../../helpers/square";
const route = useRoute();
const router = useRouter();
@@ -253,14 +255,8 @@ const computedSubmitLabel = computed(() => {
return isCreating ? "Create" : "Update";
});
loadData();
</script>
const refPaymentForm = ref(null);
<style lang="scss">
.page-dashboard-account-details {
h3 {
margin-top: 0;
margin-bottom: 16px;
}
}
</style>
loadData();
initCard();
</script>

View File

@@ -205,7 +205,6 @@ const handleEdit = (user: User) => {
};
const handleDelete = async (user: User) => {
console.log("here");
let result = await openDialog(DialogConfirm, {
title: "Delete User?",
text: `Are you sure you want to delete the user <strong>${user.display_name}</strong>?`,