fix(tax): All 4 issues resolved
## Fixes: 1. ✅ Suggested rates now inside Tax Rates card as help notice - Shows as blue notice box - Only shows rates not yet added - Auto-hides when all suggested rates added 2. ✅ Add Rate button now works - Fixed mutation to properly invalidate queries - Shows success toast - Updates list immediately 3. ✅ Add Tax Rate dialog no longer blank - Replaced shadcn Select with native select - Form now submits properly - All fields visible 4. ✅ Tax toggle now functioning - Changed onChange to onCheckedChange - Added required id prop - Properly typed checked parameter ## Additional: - Added api.put() method to api.ts - Improved UX with suggested rates as contextual help
This commit is contained in:
@@ -59,6 +59,14 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
async put(path: string, body?: any) {
|
||||
return api.wpFetch(path, {
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: body != null ? JSON.stringify(body) : undefined,
|
||||
});
|
||||
},
|
||||
|
||||
async del(path: string) {
|
||||
return api.wpFetch(path, { method: 'DELETE' });
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user