fix(config): phase 7 follow-up — fix remaining /ims/ occurrences in sw.js, notifications, components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,7 @@ export function SiteZoneManager({ sites }: Props) {
|
||||
const post = async (payload: Record<string, unknown>) => {
|
||||
setBusy(true)
|
||||
setError(null)
|
||||
const res = await fetch('/ims/api/admin/sites', {
|
||||
const res = await fetch('/api/admin/sites', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload),
|
||||
@@ -46,7 +46,7 @@ export function SiteZoneManager({ sites }: Props) {
|
||||
const id = payload.id as string
|
||||
setBusyId(id)
|
||||
setError(null)
|
||||
const res = await fetch('/ims/api/admin/sites', {
|
||||
const res = await fetch('/api/admin/sites', {
|
||||
method,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload),
|
||||
|
||||
@@ -28,7 +28,7 @@ export function TruckManager({ trucks }: Props) {
|
||||
setSubmitting(true)
|
||||
setError(null)
|
||||
try {
|
||||
const res = await fetch('/ims/api/admin/trucks', {
|
||||
const res = await fetch('/api/admin/trucks', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ truck_no: no, carrier: carrier.trim() || null }),
|
||||
@@ -53,7 +53,7 @@ export function TruckManager({ trucks }: Props) {
|
||||
setBusyId(id)
|
||||
setError(null)
|
||||
try {
|
||||
const res = await fetch('/ims/api/admin/trucks', {
|
||||
const res = await fetch('/api/admin/trucks', {
|
||||
method,
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload),
|
||||
|
||||
@@ -34,7 +34,7 @@ export function UserManager({ users, sites }: Props) {
|
||||
const patchUser = async (id: string, update: Record<string, unknown>) => {
|
||||
setBusyId(id)
|
||||
setError(null)
|
||||
const res = await fetch('/ims/api/admin/users', {
|
||||
const res = await fetch('/api/admin/users', {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ id, ...update }),
|
||||
@@ -66,7 +66,7 @@ export function UserManager({ users, sites }: Props) {
|
||||
e.preventDefault()
|
||||
setSubmitting(true)
|
||||
setError(null)
|
||||
const res = await fetch('/ims/api/admin/users', {
|
||||
const res = await fetch('/api/admin/users', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
|
||||
Reference in New Issue
Block a user