feat: implement requisition approval and rejection functionality in 'Almoxarifado', including stock verification, modal confirmations, and improved error handling for better inventory management

This commit is contained in:
2025-12-22 13:47:05 -03:00
parent b1db926ab4
commit 7ccca5c233
8 changed files with 783 additions and 23 deletions

View File

@@ -72,6 +72,11 @@
}
function resizeImage(dataUrl: string, maxWidth: number, maxHeight: number): Promise<string> {
// Verificar se estamos no browser (não durante SSR)
if (typeof window === 'undefined') {
return Promise.reject(new Error('resizeImage não pode ser executada durante SSR'));
}
return new Promise((resolve, reject) => {
const img = new window.Image();
img.onload = () => {

View File

@@ -1,6 +1,8 @@
<script lang="ts">
import { api } from '@sgse-app/backend/convex/_generated/api';
import type { Id } from '@sgse-app/backend/convex/_generated/dataModel';
import { useConvexClient, useQuery } from 'convex-svelte';
import { toast } from 'svelte-sonner';
import { Check, Zap, Clock, Info, AlertTriangle, Calendar, X, Plus, ChevronLeft, ChevronRight, Trash2, CheckCircle } from 'lucide-svelte';
interface Props {