before update auth
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
rounded color="primary"
|
||||
class="w100 q-mt-md q-mb-xs fix-disabled-btn"
|
||||
:disable="!isFormValid"
|
||||
@click = "emit('update')"
|
||||
@click = "onSubmit"
|
||||
>
|
||||
{{ $t(btnText) }}
|
||||
</q-btn>
|
||||
@@ -45,15 +45,6 @@
|
||||
class="w100 q-pt-sm"
|
||||
:label="$t('project_block__project_description')"
|
||||
/>
|
||||
|
||||
<!-- <q-checkbox
|
||||
v-if="modelValue.logo"
|
||||
v-model="modelValue.is_logo_bg"
|
||||
class="w100"
|
||||
dense
|
||||
>
|
||||
{{ $t('project_block__image_use_as_background_chats') }}
|
||||
</q-checkbox> -->
|
||||
</div>
|
||||
</div>
|
||||
</pn-scroll-list>
|
||||
@@ -62,9 +53,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, computed, ref } from 'vue'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { ProjectParams } from 'types/Project'
|
||||
import { convertEmptyStringsToNull } from 'helpers/helpers'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -95,11 +87,10 @@
|
||||
return Object.values(validations).every(Boolean)
|
||||
})
|
||||
|
||||
const initialProject = ref({} as ProjectParams)
|
||||
|
||||
onMounted(() => {
|
||||
initialProject.value = { ...modelValue.value }
|
||||
})
|
||||
function onSubmit() {
|
||||
const cleanedData = convertEmptyStringsToNull(modelValue.value)
|
||||
emit('update', cleanedData)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user