fix(captain): pricing modal null reference crash
This commit is contained in:
parent
0adc7e763b
commit
739e042406
@ -15,7 +15,7 @@ const route = useRoute();
|
|||||||
const accountId = route.params.accountId;
|
const accountId = route.params.accountId;
|
||||||
|
|
||||||
const openAddModal = () => {
|
const openAddModal = () => {
|
||||||
selectedPricing.value = null;
|
selectedPricing.value = {};
|
||||||
showModal.value = true;
|
showModal.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ const parseDays = rangeString => {
|
|||||||
.filter(s => daysOptions.includes(s));
|
.filter(s => daysOptions.includes(s));
|
||||||
};
|
};
|
||||||
|
|
||||||
const isEditing = computed(() => !!props.pricing.id); // Changed to check for pricing.id to correctly identify editing mode
|
const isEditing = computed(() => !!props.pricing?.id); // Changed to check for pricing.id to correctly identify editing mode
|
||||||
|
|
||||||
const selectedBrand = computed(() => {
|
const selectedBrand = computed(() => {
|
||||||
return props.brands.find(b => b.id === formData.value.captain_brand_id);
|
return props.brands.find(b => b.id === formData.value.captain_brand_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user