Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View oxavibes's full-sized avatar
🏠
Working from home

Stefano Bozzi oxavibes

🏠
Working from home
  • Curotec
  • Buenos Aires, Argentina
  • 06:09 (UTC -03:00)
View GitHub Profile
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')
@oxavibes
oxavibes / .js
Created September 11, 2023 17:25
Download file via js
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)
<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>
@oxavibes
oxavibes / index.js
Created March 20, 2020 00:45
Bank Module
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';