fix: reactivity issues
This commit is contained in:
parent
4e5c2f5426
commit
49b2c66299
@ -55,6 +55,16 @@
|
|||||||
</template>
|
</template>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|
||||||
|
|
||||||
|
<FormControl
|
||||||
|
v-if="fieldsMap.background_sync_frequency"
|
||||||
|
type="select"
|
||||||
|
required="true"
|
||||||
|
:options="fieldsMap.background_sync_frequency.options"
|
||||||
|
v-model="syncSource.background_sync_frequency"
|
||||||
|
:label="__('Background Sync Frequency')"
|
||||||
|
/>
|
||||||
|
|
||||||
<FormControl
|
<FormControl
|
||||||
type="password"
|
type="password"
|
||||||
required="true"
|
required="true"
|
||||||
@ -79,15 +89,6 @@
|
|||||||
'page': syncSource.facebook_page
|
'page': syncSource.facebook_page
|
||||||
}"
|
}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<FormControl
|
|
||||||
v-if="fieldsMap.background_sync_frequency"
|
|
||||||
type="select"
|
|
||||||
required="true"
|
|
||||||
:options="fieldsMap.background_sync_frequency.options"
|
|
||||||
v-model="syncSource.background_sync_frequency"
|
|
||||||
:label="__('Background Sync Frequency')"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Mapping Grid -->
|
<!-- Mapping Grid -->
|
||||||
@ -176,13 +177,6 @@ const syncSource = ref({
|
|||||||
const isLocal = ref(true);
|
const isLocal = ref(true);
|
||||||
|
|
||||||
function updateSource(data) {
|
function updateSource(data) {
|
||||||
let showSuccessToast = true;
|
|
||||||
if (mappingFormDocResource.value ?? mappingFormDocResource.value.document.isDirty)
|
|
||||||
{
|
|
||||||
mappingFormDocResource.value.document.save.submit();
|
|
||||||
showSuccessToast = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
sources.setValue.submit(
|
sources.setValue.submit(
|
||||||
{
|
{
|
||||||
name: syncSource.value.name,
|
name: syncSource.value.name,
|
||||||
@ -194,9 +188,7 @@ function updateSource(data) {
|
|||||||
docResource.value.document.reload();
|
docResource.value.document.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSuccessToast) {
|
mappingFormDocResource.value.document.save.submit();
|
||||||
toast.success(__("Lead Sync Source updated successfully"));
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
onError(e) {
|
onError(e) {
|
||||||
toast.error(e.messages[0] || __("Error updating Lead Sync Source"));
|
toast.error(e.messages[0] || __("Error updating Lead Sync Source"));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user