refactor: add btn canceled
This commit is contained in:
parent
b2357f5d00
commit
e44dee0f83
1 changed files with 14 additions and 2 deletions
|
|
@ -9,6 +9,8 @@ import { RequestData } from 'src/stores/request-list/types';
|
||||||
import { RequestDataStatus } from 'src/stores/request-list/types';
|
import { RequestDataStatus } from 'src/stores/request-list/types';
|
||||||
import useOptionStore from 'src/stores/options';
|
import useOptionStore from 'src/stores/options';
|
||||||
|
|
||||||
|
import KebabAction from 'src/components/shared/KebabAction.vue';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
rows: QTableProps['rows'];
|
rows: QTableProps['rows'];
|
||||||
|
|
@ -26,6 +28,7 @@ const props = withDefaults(
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
(e: 'view', data: RequestData): void;
|
(e: 'view', data: RequestData): void;
|
||||||
|
(e: 'delete', data: RequestData): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
function getCustomerName(
|
function getCustomerName(
|
||||||
|
|
@ -135,7 +138,7 @@ function getEmployeeName(
|
||||||
? '--blue-6-hsl'
|
? '--blue-6-hsl'
|
||||||
: props.row.requestDataStatus === RequestDataStatus.Completed
|
: props.row.requestDataStatus === RequestDataStatus.Completed
|
||||||
? '--green-8-hsl'
|
? '--green-8-hsl'
|
||||||
: '--orange-5-hsl'
|
: '--red-5-hsl'
|
||||||
"
|
"
|
||||||
:title="
|
:title="
|
||||||
$t(`requestList.status.${props.row.requestDataStatus}`) || '-'
|
$t(`requestList.status.${props.row.requestDataStatus}`) || '-'
|
||||||
|
|
@ -152,6 +155,13 @@ function getEmployeeName(
|
||||||
flat
|
flat
|
||||||
@click.stop="$emit('view', props.row)"
|
@click.stop="$emit('view', props.row)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<KebabAction
|
||||||
|
hide-edit
|
||||||
|
hide-toggle
|
||||||
|
hide-view
|
||||||
|
@delete="$emit('delete', props.row)"
|
||||||
|
/>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -163,6 +173,9 @@ function getEmployeeName(
|
||||||
>
|
>
|
||||||
<div class="col-md-4 col-sm-6 col-12">
|
<div class="col-md-4 col-sm-6 col-12">
|
||||||
<QuotationCard
|
<QuotationCard
|
||||||
|
hide-preview
|
||||||
|
hide-kebab-view
|
||||||
|
hide-kebab-edit
|
||||||
:badge-color="
|
:badge-color="
|
||||||
props.row.requestDataStatus === RequestDataStatus.Pending
|
props.row.requestDataStatus === RequestDataStatus.Pending
|
||||||
? '--orange-5-hsl'
|
? '--orange-5-hsl'
|
||||||
|
|
@ -172,7 +185,6 @@ function getEmployeeName(
|
||||||
? '--green-8-hsl'
|
? '--green-8-hsl'
|
||||||
: '--orange-5-hsl'
|
: '--orange-5-hsl'
|
||||||
"
|
"
|
||||||
hidePreview
|
|
||||||
:urgent="props.row.quotation.urgent"
|
:urgent="props.row.quotation.urgent"
|
||||||
:code="props.row.code"
|
:code="props.row.code"
|
||||||
:title="props.row.quotation.workName"
|
:title="props.row.quotation.workName"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue