feat: color adjustment
This commit is contained in:
parent
ada27e777d
commit
f5c9e7d901
2 changed files with 15 additions and 14 deletions
|
|
@ -3,6 +3,7 @@ defineProps<{
|
||||||
data: {
|
data: {
|
||||||
id: string;
|
id: string;
|
||||||
hq: boolean;
|
hq: boolean;
|
||||||
|
status: string;
|
||||||
branchLabelCode: string;
|
branchLabelCode: string;
|
||||||
branchLabelName: string;
|
branchLabelName: string;
|
||||||
branchLabelTel: string;
|
branchLabelTel: string;
|
||||||
|
|
@ -28,7 +29,7 @@ defineProps<{
|
||||||
class="branch-card__row"
|
class="branch-card__row"
|
||||||
:class="{ 'branch-card__header': i === 0 }"
|
:class="{ 'branch-card__header': i === 0 }"
|
||||||
v-for="([k, v], i) in Object.entries(data)
|
v-for="([k, v], i) in Object.entries(data)
|
||||||
.slice(2)
|
.slice(3)
|
||||||
.filter(
|
.filter(
|
||||||
([key], idx) =>
|
([key], idx) =>
|
||||||
idx === 0 || (fieldSelected ? fieldSelected.includes(key) : true),
|
idx === 0 || (fieldSelected ? fieldSelected.includes(key) : true),
|
||||||
|
|
@ -63,6 +64,8 @@ defineProps<{
|
||||||
.branch-card {
|
.branch-card {
|
||||||
--_branch-card-row-fg: 0 0% 100%;
|
--_branch-card-row-fg: 0 0% 100%;
|
||||||
--_branch-card-row-bg: var(--blue-5-hsl);
|
--_branch-card-row-bg: var(--blue-5-hsl);
|
||||||
|
--_branch-badge-fg: var(--green-8-hsl);
|
||||||
|
--_branch-badge-bg: var(--green-6-hsl);
|
||||||
|
|
||||||
&.branch-card__hq {
|
&.branch-card__hq {
|
||||||
--_branch-card-row-bg: var(--pink-6-hsl);
|
--_branch-card-row-bg: var(--pink-6-hsl);
|
||||||
|
|
@ -73,6 +76,8 @@ defineProps<{
|
||||||
}
|
}
|
||||||
|
|
||||||
&.branch-card__inactive {
|
&.branch-card__inactive {
|
||||||
|
--_branch-badge-fg: var(--red-4-hsl);
|
||||||
|
--_branch-badge-bg: var(--red-4-hsl);
|
||||||
filter: grayscale(40%);
|
filter: grayscale(40%);
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
@ -123,13 +128,8 @@ defineProps<{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 999rem;
|
border-radius: 999rem;
|
||||||
padding-inline: var(--size-2);
|
padding-inline: var(--size-2);
|
||||||
text-transform: lowercase;
|
color: hsl(var(--_branch-badge-fg));
|
||||||
color: hsl(var(--green-8-hsl));
|
background-color: hsla(var(--_branch-badge-bg) / 0.1);
|
||||||
background-color: hsl(var(--green-1-hsl));
|
|
||||||
|
|
||||||
&::first-letter {
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ watch(locale, () => {
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="row" style="flex-grow: 1; flex-wrap: nowrap">
|
<div class="row" style="flex-grow: 1; flex-wrap: nowrap">
|
||||||
<div class="tree-container q-pa-md bordered-r">
|
<div class="tree-container q-pa-md bordered-r surface-2">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<Icon
|
<Icon
|
||||||
icon="ep:arrow-left-bold"
|
icon="ep:arrow-left-bold"
|
||||||
|
|
@ -369,9 +369,9 @@ watch(locale, () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bordered rounded q-mt-md">
|
<div class="bordered rounded q-mt-md surface-1">
|
||||||
<div
|
<div
|
||||||
class="bordered-b q-pl-sm text-weight-bold surface-0"
|
class="bordered-b q-pl-sm text-weight-bold surface-3"
|
||||||
style="height: 50px; display: flex; align-items: center"
|
style="height: 50px; display: flex; align-items: center"
|
||||||
>
|
>
|
||||||
<Icon icon="flowbite:home-solid" width="24px" class="q-mr-md" />
|
<Icon icon="flowbite:home-solid" width="24px" class="q-mr-md" />
|
||||||
|
|
@ -547,7 +547,7 @@ watch(locale, () => {
|
||||||
:options="
|
:options="
|
||||||
fieldDisplay.map((v) => ({ label: $t(v), value: v }))
|
fieldDisplay.map((v) => ({ label: $t(v), value: v }))
|
||||||
"
|
"
|
||||||
:display-value="$t('Fields')"
|
:display-value="$t('displayField')"
|
||||||
v-model="fieldSelected"
|
v-model="fieldSelected"
|
||||||
option-label="label"
|
option-label="label"
|
||||||
option-value="value"
|
option-value="value"
|
||||||
|
|
@ -580,6 +580,7 @@ watch(locale, () => {
|
||||||
.map((v) => ({
|
.map((v) => ({
|
||||||
id: v.id,
|
id: v.id,
|
||||||
hq: v.isHeadOffice,
|
hq: v.isHeadOffice,
|
||||||
|
status: v.status,
|
||||||
branchLabelCode: v.code,
|
branchLabelCode: v.code,
|
||||||
branchLabelName:
|
branchLabelName:
|
||||||
$i18n.locale === 'en-US' ? v.nameEN : v.name,
|
$i18n.locale === 'en-US' ? v.nameEN : v.name,
|
||||||
|
|
@ -593,7 +594,7 @@ watch(locale, () => {
|
||||||
branchLabelType: $t(
|
branchLabelType: $t(
|
||||||
v.isHeadOffice ? 'branchHQLabel' : 'branchLabel',
|
v.isHeadOffice ? 'branchHQLabel' : 'branchLabel',
|
||||||
),
|
),
|
||||||
branchLabelStatus: v.status,
|
branchLabelStatus: $t(`status${v.status}`),
|
||||||
}))"
|
}))"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
|
|
@ -614,7 +615,7 @@ watch(locale, () => {
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:data="item"
|
:data="item"
|
||||||
:field-selected="fieldSelected"
|
:field-selected="fieldSelected"
|
||||||
:inactive="item.branchLabelStatus === 'INACTIVE'"
|
:inactive="item.status === 'INACTIVE'"
|
||||||
@view-detail="(b) => console.log(b)"
|
@view-detail="(b) => console.log(b)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue