This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const searchEntities = ref('') | |
const searchActions = ref('') | |
const loadingTable = ref(false) | |
const loadingRegister = ref(false) | |
const singleTable = ref(null) | |
const newEntity = ref(false) | |
const entityName = ref('') | |
const newAction = ref(false) | |
const actionName = ref('') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// comparing by id | |
const output = yourFirstArray.filter((item1) => !yourSecondArray.some((item2) => item1.id == item2.id)) | |
console.log(output) | |
// or | |
// attention: "id" is a variable of yourFirstArray filter method | |
const output = yourFirstArray.filter(({ id }) => !yourSecondArray.find(item => item.id == id)); | |
console.log(output); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p class="mb-1 text-brand-mainDark"> | |
Select state | {{selectedState}} | |
</p> | |
<Multiselect | |
placeholder="Select state" | |
:minChars="1" | |
:required="true" | |
autocomplete="undefined" | |
v-model="selectedState" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// It's just a piece of code. | |
const token = VueCookieNext.getCookie('token') | |
let formData = new FormData() | |
const state = reactive({ | |
photo: null, | |
}) | |
formData.append('name', fullName.value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<input type="file" @change="handleFileUpload($event)"/> | |
</template> | |
<script> | |
import axios from 'axios' | |
import { reactive, toRefs } from 'vue' | |
export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Making post request using axios (with headers too) | |
axios | |
.post('localhost', payload, { | |
headers: { | |
'Content-Type': 'application/json', | |
Authorization: 'Bearer ' + token, | |
}, | |
}) | |
.then(function (response) { | |
console.log(response) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div class="date-examples"> | |
<div> | |
<DatePicker | |
v-model="date" | |
:is-range="isRange" | |
:model-config="modelConfig" | |
is-required | |
> |
NewerOlder