This file contains 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
Example component | |
I had to use vanilla js to init the datepicker and pass some options. | |
<script setup> | |
function onChangeDate(e) { | |
weightTrackingForm.date = e.target.value | |
} | |
onMounted(() => { | |
const datepickerEl = document.getElementById('weight-datepicker') |
This file contains 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
async function downloadPDF() { | |
if (props.attachment) { | |
try { | |
// Extract the filename from the attachment URL. | |
const filename = props.attachment.substring(props.attachment.lastIndexOf('/') + 1) | |
// Send a GET request to the PDF URL. | |
const response = await fetch(props.attachment) | |
if (!response.ok) |
This file contains 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> | |
<page-title-bar></page-title-bar> | |
<v-container fluid grid-list-xl pt-0> | |
<v-layout row wrap> | |
<app-card | |
:fullBlock="true" | |
colClasses="xs12"> | |
<v-card-title> | |
<v-btn @click.stop="onAdd" color="primary" dark medium> |
This file contains 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
import Vue from 'vue' | |
import Nprogress from 'nprogress' | |
import api from '../../../api/apibackend' | |
import { | |
SET_BANKS, | |
FETCH_BANKS_START, | |
FETCH_BANKS_END | |
} from './mutations.type' | |
import { GET_BANKS, DELETE_BANK, UPDATE_BANK, CREATE_BANK } from './actions.type'; |