Skip to content

Commit

Permalink
fix(client): upload in ticket form flow
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo930021 committed Apr 9, 2024
1 parent 8e5b05d commit 695ace2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/src/components/system/ticket/TicketFlowModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<template v-if="current.schema.module.type === 'Form' && current.flow?.module.type === 'Form'">
<TicketFormFlow
:id="id"
:ticket-schema-id="current.schema.ticket_schema_id"
:schema="current.schema.module"
:form-value="current.flow?.module"
:isReview="isReview"
Expand All @@ -21,6 +22,7 @@
<template v-else-if="current.schema.module.type === 'Form'">
<TicketFormFlow
:id="id"
:ticket-schema-id="current.schema.ticket_schema_id"
:schema="current.schema.module"
:form-value="null"
:isReview="isReview"
Expand Down
5 changes: 3 additions & 2 deletions client/src/components/system/ticket/module/TicketFormFlow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<template v-else-if="field.define.type === 'Image'">
<NUpload
v-model:file-list="formData[field.key]"
:action="`/api/project/ticket/schemas/${id}/form/${schema.form.id}/field/${field.id}/upload`"
:action="`/api/project/ticket/schemas/${ticketSchemaId}/form/${schema.form.id}/field/${field.id}/upload`"
with-credentials
response-type="json"
:max="1"
Expand Down Expand Up @@ -113,7 +113,7 @@
<template v-else-if="field.define.type === 'File'">
<NUpload
v-model:file-list="formData[field.key]"
:action="`/api/project/ticket/schemas/${id}/form/${schema.form.id}/field/${field.id}/upload`"
:action="`/api/project/ticket/schemas/${ticketSchemaId}/form/${schema.form.id}/field/${field.id}/upload`"
with-credentials
response-type="json"
:max="1"
Expand Down Expand Up @@ -164,6 +164,7 @@ import { useLocale } from '@/i18n'
const props = defineProps<{
id: number
ticketSchemaId: number
schema: TicketFormSchema,
formValue: TicketFormValue | null,
isReview?: boolean
Expand Down

0 comments on commit 695ace2

Please sign in to comment.