Compare commits
No commits in common. "c9eea4be03122903a96022bd8e4bc3c8e8a0dcb6" and "88a550764c7ec7f8ef716257b296e24a5bf99de0" have entirely different histories.
c9eea4be03
...
88a550764c
@ -20,7 +20,7 @@ model SD_SURVEY_SALES_BASIC_INFO {
|
||||
ADDRESS String? @db.NVarChar(200)
|
||||
ADDRESS_DETAIL String? @db.NVarChar(300)
|
||||
SUBMISSION_STATUS Boolean @default(false)
|
||||
SUBMISSION_DATE DateTime?
|
||||
SUBMISSION_DATE DateTime? @db.Date
|
||||
SUBMISSION_TARGET_ID String? @db.NVarChar(200)
|
||||
REG_DT DateTime @default(now())
|
||||
UPT_DT DateTime @updatedAt
|
||||
@ -85,11 +85,11 @@ model BC_COMM_H {
|
||||
REF_CHR3 String? @db.NVarChar(100)
|
||||
REF_CHR4 String? @db.NVarChar(100)
|
||||
REF_CHR5 String? @db.NVarChar(100)
|
||||
REF_NUM1 Decimal? @db.Decimal(22, 5)
|
||||
REF_NUM2 Decimal? @db.Decimal(22, 5)
|
||||
REF_NUM3 Decimal? @db.Decimal(22, 5)
|
||||
REF_NUM4 Decimal? @db.Decimal(22, 5)
|
||||
REF_NUM5 Decimal? @db.Decimal(22, 5)
|
||||
REF_NUM1 String? @db.NVarChar(100)
|
||||
REF_NUM2 String? @db.NVarChar(100)
|
||||
REF_NUM3 String? @db.NVarChar(100)
|
||||
REF_NUM4 String? @db.NVarChar(100)
|
||||
REF_NUM5 String? @db.NVarChar(100)
|
||||
REMARKS String? @db.NVarChar(200)
|
||||
SAP_YN String? @db.NVarChar(1)
|
||||
STAT_CD String? @db.NVarChar(1)
|
||||
@ -98,7 +98,7 @@ model BC_COMM_H {
|
||||
REG_ID String? @db.NVarChar(50)
|
||||
UPT_DT DateTime? @db.DateTime
|
||||
UPT_ID String? @db.NVarChar(50)
|
||||
QC_COMM_YN String? @default("N", map: "DF__BC_COMM_H__QC_CO__498EEC8D") @db.NVarChar(1)
|
||||
QC_COMM_YN String? @default("N", map: "DF__BC_COMM_H__QC_CO__48CFD27E") @db.NVarChar(1)
|
||||
BC_COMM_L BC_COMM_L[]
|
||||
|
||||
@@index([HEAD_ID], map: "BC_COMM_H_HEAD_ID_IDX")
|
||||
|
||||
@ -54,7 +54,7 @@ export default function MemberInformationPopup() {
|
||||
</div>
|
||||
<div className="data-input-form-bx">
|
||||
<div className="data-input-form-tit">建設ID</div>
|
||||
<input type="text" className="input-frame" defaultValue={session.builderId ?? ''} disabled />
|
||||
<input type="text" className="input-frame" defaultValue={session.builderNo ?? ''} disabled />
|
||||
</div>
|
||||
</div>
|
||||
{session.role !== 'Partner' && (
|
||||
|
||||
@ -2,14 +2,13 @@ import Image from 'next/image'
|
||||
import { usePopupController } from '@/store/popupController'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { useSurvey } from '@/hooks/useSurvey'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { useSessionStore } from '@/store/session'
|
||||
import { useCommCode } from '@/hooks/useCommCode'
|
||||
import { CommCode } from '@/types/CommCode'
|
||||
import { sendEmail } from '@/libs/mailer'
|
||||
import { useSpinnerStore } from '@/store/spinnerStore'
|
||||
import { CONFIRM_MESSAGE, SUCCESS_MESSAGE, ERROR_MESSAGE, useAlertMsg, WARNING_MESSAGE } from '@/hooks/useAlertMsg'
|
||||
import { ADMIN_SUBMIT_TARGET_NM } from '@/types/Survey'
|
||||
|
||||
interface SubmitFormData {
|
||||
saleBase: string | null
|
||||
@ -66,7 +65,6 @@ export default function SurveySaleSubmitPopup() {
|
||||
setSubmitData((prev) => ({
|
||||
...prev,
|
||||
...baseUpdate,
|
||||
targetNm: ADMIN_SUBMIT_TARGET_NM,
|
||||
}))
|
||||
/** Builder, Admin_Sub 제출 폼 데이터 삽입 - 2차 판매점, 2차 판매점 시공권한*/
|
||||
} else if (session?.role === 'Builder' || session?.role === 'Admin_Sub') {
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
'use client'
|
||||
|
||||
import type { Mode, SurveyBasicRequest, SurveyDetailInfo, SurveyDetailRequest } from '@/types/Survey'
|
||||
import { CONFIRM_MESSAGE, SUCCESS_MESSAGE, useAlertMsg, WARNING_MESSAGE } from '@/hooks/useAlertMsg'
|
||||
import { ADMIN_SUBMIT_TARGET_NM } from '@/types/Survey'
|
||||
import { useSessionStore } from '@/store/session'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { usePopupController } from '@/store/popupController'
|
||||
import { useParams, useRouter } from 'next/navigation'
|
||||
import { requiredFields, useSurvey } from '@/hooks/useSurvey'
|
||||
import { usePopupController } from '@/store/popupController'
|
||||
import { CONFIRM_MESSAGE, SUCCESS_MESSAGE, useAlertMsg, WARNING_MESSAGE } from '@/hooks/useAlertMsg'
|
||||
|
||||
interface ButtonFormProps {
|
||||
mode: Mode
|
||||
@ -69,10 +68,7 @@ export default function ButtonForm({ mode, setMode, data }: ButtonFormProps) {
|
||||
const calculatePermissions = (session: any, basicData: SurveyBasicRequest): PermissionState => {
|
||||
const isSubmiter = calculateSubmitPermission(session, basicData)
|
||||
const isWriter = session.userId === basicData.representativeId
|
||||
const isReceiver =
|
||||
session?.storeId === basicData.submissionTargetId ||
|
||||
session?.storeNm === basicData.submissionTargetNm ||
|
||||
(session?.role === 'T01' && basicData.submissionTargetNm === ADMIN_SUBMIT_TARGET_NM)
|
||||
const isReceiver = session?.storeId === basicData.submissionTargetId || session?.storeNm === basicData.submissionTargetNm
|
||||
|
||||
return { isSubmiter, isWriter, isReceiver }
|
||||
}
|
||||
|
||||
@ -1,19 +1,21 @@
|
||||
'use client'
|
||||
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { SurveyBasicInfo } from '@/types/Survey'
|
||||
import { useSurvey } from '@/hooks/useSurvey'
|
||||
|
||||
export default function DataTable({ surveyDetail }: { surveyDetail: SurveyBasicInfo }) {
|
||||
const router = useRouter()
|
||||
|
||||
/** 제출 상태 처리 */
|
||||
const submitStatus = () => {
|
||||
const { submissionTargetNm, submissionTargetId } = surveyDetail ?? {}
|
||||
if (!submissionTargetId && !submissionTargetNm) {
|
||||
return <div>( Hanwha Japan )</div>
|
||||
}
|
||||
if (!submissionTargetId && submissionTargetNm) {
|
||||
return <div>( {submissionTargetNm} )</div>
|
||||
}
|
||||
if (!submissionTargetId && !submissionTargetNm) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
({submissionTargetNm} - {submissionTargetId})
|
||||
|
||||
@ -253,6 +253,7 @@ export function useSurvey(
|
||||
false,
|
||||
true,
|
||||
)
|
||||
console.log(resp)
|
||||
const blob = await resp.blob()
|
||||
|
||||
if (!blob || blob.size === 0) {
|
||||
@ -263,7 +264,7 @@ export function useSurvey(
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const a = document.createElement('a')
|
||||
a.href = url
|
||||
a.download = `${filename}`
|
||||
a.download = `${filename}.pdf`
|
||||
a.click()
|
||||
window.URL.revokeObjectURL(url)
|
||||
|
||||
|
||||
@ -324,7 +324,6 @@ export type SurveySearchParams = {
|
||||
builderId?: string | null
|
||||
}
|
||||
|
||||
export const ADMIN_SUBMIT_TARGET_NM = 'Hanwha Japan'
|
||||
|
||||
type RadioEtcKeys =
|
||||
| 'structureOrder'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user