add: tracking load & clean code save load
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
<script setup>
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { useCompanyStore } from '../stores/company';
|
||||
import Spiner from '../components/ui/Spiner.vue';
|
||||
import CardLoad from '../components/CardLoad.vue';
|
||||
import AttachmentsModal from '../components/AttachmentsModal.vue';
|
||||
import { useLoadsStore } from '../stores/loads';
|
||||
import FormLoadModal from '../components/FormLoadModal.vue';
|
||||
import ProposalsModal from '../components/ProposalsModal.vue';
|
||||
import CardEmpty from '../components/CardEmpty.vue';
|
||||
|
||||
const companyStore = useCompanyStore();
|
||||
const loadStore = useLoadsStore();
|
||||
const loading = ref(false);
|
||||
const query = ref('');
|
||||
@@ -92,12 +91,15 @@ import ProposalsModal from '../components/ProposalsModal.vue';
|
||||
><i class="fa-solid fa-plus"></i> <span class="clear-sm"> Crear</span><span class="clear-md"> carga</span></button>
|
||||
</div>
|
||||
<Spiner v-if="loading"/>
|
||||
<CardLoad
|
||||
v-else
|
||||
v-for="load in loadStore.loads"
|
||||
:key="load._id"
|
||||
:load="load"
|
||||
/>
|
||||
<div v-else>
|
||||
<CardLoad
|
||||
v-if="loadStore.loads.length > 0"
|
||||
v-for="load in loadStore.loads"
|
||||
:key="load._id"
|
||||
:load="load"
|
||||
/>
|
||||
<CardEmpty v-else text="No hay cargas agregadas"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user