changes
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
// Tooltip Styles
|
// Tooltip Styles
|
||||||
.tooltiptext {
|
.tooltiptext {
|
||||||
visibility: hidden;
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
background-color: var(--bulma-primary-95);
|
background-color: var(--bulma-primary-95);
|
||||||
color: var(--bulma-primary-bold);
|
color: var(--bulma-primary-bold);
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
bottom: 110%;
|
bottom: 110%;
|
||||||
transition: opacity 0.3s;
|
transition: opacity 0.2s;
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@@ -28,7 +27,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin tooltipshow() {
|
@mixin tooltipshow() {
|
||||||
visibility: visible;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="field has-addons is-justify-content-center">
|
<div class="field has-addons is-justify-content-center">
|
||||||
<!-- <p class="control">
|
<!-- <div class="control">
|
||||||
<button
|
<button
|
||||||
class="button is-light is-primary"
|
class="button is-light is-primary"
|
||||||
@click="checkFilter() ? false : $emit('modalevent', { name: 'dosort', data: 'az' })"
|
@click="checkFilter() ? false : $emit('modalevent', { name: 'dosort', data: 'az' })"
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
||||||
>Sắp xếp tăng dần</span
|
>Sắp xếp tăng dần</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button is-light is-primary"
|
class="button is-light is-primary"
|
||||||
@click="checkFilter() ? false : $emit('modalevent', { name: 'dosort', data: 'za' })"
|
@click="checkFilter() ? false : $emit('modalevent', { name: 'dosort', data: 'za' })"
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
||||||
>Sắp xếp giảm dần</span
|
>Sắp xếp giảm dần</span
|
||||||
>
|
>
|
||||||
</p> -->
|
</div> -->
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="moveLeft()"
|
@click="moveLeft()"
|
||||||
@@ -52,11 +52,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Chuyển cột sang trái</span
|
>Chuyển cột sang trái</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="moveRight()"
|
@click="moveRight()"
|
||||||
@@ -70,11 +70,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Chuyển cột sang phải</span
|
>Chuyển cột sang phải</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="resizeWidth()"
|
@click="resizeWidth()"
|
||||||
@@ -88,11 +88,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Tăng độ rộng cột</span
|
>Tăng độ rộng cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="resizeWidth(true)"
|
@click="resizeWidth(true)"
|
||||||
@@ -106,11 +106,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Giảm độ rộng cột</span
|
>Giảm độ rộng cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="hideField()"
|
@click="hideField()"
|
||||||
@@ -124,11 +124,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Ẩn cột</span
|
>Ẩn cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="!currentField.mandatory && doRemove()"
|
@click="!currentField.mandatory && doRemove()"
|
||||||
@@ -142,11 +142,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Xóa cột</span
|
>Xóa cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="$copyToClipboard(currentField.name)"
|
@click="$copyToClipboard(currentField.name)"
|
||||||
@@ -160,11 +160,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Sao chép cột</span
|
>Sao chép cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="fieldList()"
|
@click="fieldList()"
|
||||||
@@ -178,11 +178,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Danh sách cột</span
|
>Danh sách cột</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="createField()"
|
@click="createField()"
|
||||||
@@ -196,11 +196,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: 25px"
|
style="top: 110%; bottom: unset; min-width: max-content; left: 0"
|
||||||
>Tạo cột mới</span
|
>Tạo cột mới</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button"
|
class="button"
|
||||||
@click="tableOption()"
|
@click="tableOption()"
|
||||||
@@ -214,11 +214,11 @@
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
class="tooltiptext"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: -45px"
|
style="top: 110%; bottom: unset; min-width: max-content; right: 0"
|
||||||
>Tùy chọn bảng</span
|
>Tùy chọn bảng</span
|
||||||
>
|
>
|
||||||
</p>
|
</div>
|
||||||
<p class="control">
|
<div class="control">
|
||||||
<button
|
<button
|
||||||
class="button is-primary"
|
class="button is-primary"
|
||||||
@click="saveSetting()"
|
@click="saveSetting()"
|
||||||
@@ -230,12 +230,14 @@
|
|||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<span
|
<p
|
||||||
class="tooltiptext has-background-primary has-text-white"
|
class="tooltiptext"
|
||||||
style="top: 110%; bottom: unset; min-width: max-content; left: -45px"
|
style="top: 110%; bottom: unset; min-width: max-content; right: 0"
|
||||||
>Lưu thiết lập</span
|
|
||||||
>
|
>
|
||||||
</p>
|
<span class="is-block">Lưu thiết lập: </span>
|
||||||
|
<span class="is-block fs-12 is-family-monospace">{{ pagedata.setting.name }}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tabs is-centered">
|
<div class="tabs is-centered">
|
||||||
<ul>
|
<ul>
|
||||||
@@ -642,7 +644,7 @@ function resizeWidth(minus) {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
p.control {
|
.control {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
> button {
|
> button {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function displayModal() {
|
|||||||
|
|
||||||
const refreshData = inject("refreshData");
|
const refreshData = inject("refreshData");
|
||||||
async function deleteProduct() {
|
async function deleteProduct() {
|
||||||
const res = await $deleteapi("product", props.product.id);
|
const res = await $deleteapi("Product", props.product.id);
|
||||||
if (res !== "error") {
|
if (res !== "error") {
|
||||||
if (refreshData) refreshData();
|
if (refreshData) refreshData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ const refreshData = inject("refreshData");
|
|||||||
async function submit() {
|
async function submit() {
|
||||||
isPending.value = true;
|
isPending.value = true;
|
||||||
const res = props.variantId
|
const res = props.variantId
|
||||||
? await $patchapi("product", {
|
? await $patchapi("Product", {
|
||||||
id: productVariant.value.product,
|
id: productVariant.value.product,
|
||||||
...body.value,
|
...body.value,
|
||||||
})
|
})
|
||||||
: await $insertapi("product", { data: body.value });
|
: await $insertapi("Product", { data: body.value });
|
||||||
if (res !== "error") {
|
if (res !== "error") {
|
||||||
if (refreshData) refreshData();
|
if (refreshData) refreshData();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ const project = await $getdata("project", { filter: { id: props.projectId }, fir
|
|||||||
const images = ref([]);
|
const images = ref([]);
|
||||||
const isForProduct = computed(() => props.productId !== undefined);
|
const isForProduct = computed(() => props.productId !== undefined);
|
||||||
const product = isForProduct.value
|
const product = isForProduct.value
|
||||||
? await $getdata("product", { filter: { id: props.productId }, first: true })
|
? await $getdata("Product", { filter: { id: props.productId }, first: true })
|
||||||
: undefined;
|
: undefined;
|
||||||
const showmodal = ref();
|
const showmodal = ref();
|
||||||
const imgshow = ref([]);
|
const imgshow = ref([]);
|
||||||
|
|||||||
@@ -235,8 +235,7 @@ export default /** @type {const} */ ([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "product",
|
name: "Product",
|
||||||
commit: "product",
|
|
||||||
url: "data/Product/",
|
url: "data/Product/",
|
||||||
url_detail: "data-detail/Product/",
|
url_detail: "data-detail/Product/",
|
||||||
params: {
|
params: {
|
||||||
|
|||||||
Reference in New Issue
Block a user