|
@@ -81,9 +81,7 @@
|
|
|
<DefaultInputDatePicker
|
|
<DefaultInputDatePicker
|
|
|
v-model:untreated-date="form.date"
|
|
v-model:untreated-date="form.date"
|
|
|
:label="$t('common.terms.date')"
|
|
:label="$t('common.terms.date')"
|
|
|
- :rules="[inputRules.required, inputRules.exactAdvanceDays(ADVANCE_DAYS)]"
|
|
|
|
|
- :hint="$t('agendamento.data_disponivel', { date: allowedDateLabel })"
|
|
|
|
|
- :date-options="allowedDateOptions"
|
|
|
|
|
|
|
+ :rules="[inputRules.required]"
|
|
|
placeholder="dd/mm/aaaa"
|
|
placeholder="dd/mm/aaaa"
|
|
|
lazy-rules
|
|
lazy-rules
|
|
|
class="col-12 col-md-6"
|
|
class="col-12 col-md-6"
|
|
@@ -110,7 +108,6 @@
|
|
|
<DefaultInputDatePicker
|
|
<DefaultInputDatePicker
|
|
|
v-model:untreated-date="form.date"
|
|
v-model:untreated-date="form.date"
|
|
|
:label="$t('agendamento.data_opcional')"
|
|
:label="$t('agendamento.data_opcional')"
|
|
|
- :date-options="allowedDateOptions"
|
|
|
|
|
placeholder="dd/mm/aaaa"
|
|
placeholder="dd/mm/aaaa"
|
|
|
class="col-12 col-md-6"
|
|
class="col-12 col-md-6"
|
|
|
/>
|
|
/>
|
|
@@ -334,7 +331,7 @@ import { ref, computed, onMounted, useTemplateRef, nextTick, watch } from "vue";
|
|
|
import { useQuasar } from "quasar";
|
|
import { useQuasar } from "quasar";
|
|
|
import { useI18n } from "vue-i18n";
|
|
import { useI18n } from "vue-i18n";
|
|
|
import { useInputRules } from "src/composables/useInputRules";
|
|
import { useInputRules } from "src/composables/useInputRules";
|
|
|
-import { excerpt, addDaysToToday, formatDateBR } from "src/helpers/utils";
|
|
|
|
|
|
|
+import { excerpt } from "src/helpers/utils";
|
|
|
|
|
|
|
|
import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
|
|
import DefaultHeaderPage from "src/components/layout/DefaultHeaderPage.vue";
|
|
|
import DefaultTableServerSide from "src/components/defaults/DefaultTableServerSide.vue";
|
|
import DefaultTableServerSide from "src/components/defaults/DefaultTableServerSide.vue";
|
|
@@ -375,8 +372,6 @@ const counters = ref({
|
|
|
recusados: undefined,
|
|
recusados: undefined,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-const ADVANCE_DAYS = 2;
|
|
|
|
|
-
|
|
|
|
|
const form = ref({
|
|
const form = ref({
|
|
|
type: "consulta",
|
|
type: "consulta",
|
|
|
associado: null,
|
|
associado: null,
|
|
@@ -392,15 +387,6 @@ const form = ref({
|
|
|
|
|
|
|
|
const isConsulta = computed(() => form.value.type === "consulta");
|
|
const isConsulta = computed(() => form.value.type === "consulta");
|
|
|
|
|
|
|
|
-const allowedDateLabel = computed(() => formatDateBR(addDaysToToday(ADVANCE_DAYS)));
|
|
|
|
|
-
|
|
|
|
|
-const allowedDateOptions = computed(() => {
|
|
|
|
|
- const date = addDaysToToday(ADVANCE_DAYS);
|
|
|
|
|
- const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
|
|
|
- const day = String(date.getDate()).padStart(2, "0");
|
|
|
|
|
- return [`${date.getFullYear()}/${month}/${day}`];
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
watch(
|
|
watch(
|
|
|
() => form.value.forDependent,
|
|
() => form.value.forDependent,
|
|
|
(forDependent) => {
|
|
(forDependent) => {
|