refactor: mail content 번역 시에도 원본 데이터 전달되도록 수정 #80
@ -139,7 +139,7 @@ export default function SurveySaleSubmitPopup() {
|
|||||||
to: submitData.receiver,
|
to: submitData.receiver,
|
||||||
cc: submitData.reference ?? '',
|
cc: submitData.reference ?? '',
|
||||||
subject: submitData.title,
|
subject: submitData.title,
|
||||||
content: contentsRef.current?.innerHTML ?? '',
|
content: generateEmailContent(),
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (!isSubmittingSurvey) {
|
if (!isSubmittingSurvey) {
|
||||||
@ -160,7 +160,38 @@ export default function SurveySaleSubmitPopup() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const contentsRef = useRef<HTMLDivElement>(null)
|
const generateEmailContent = () => `
|
||||||
|
<div>
|
||||||
|
<p style="font-size: 13px; font-weight: 400; color: #2e3a59; margin-bottom: 15px;">
|
||||||
|
HANASYS現地調査アプリを使用した現地調査結果が送信されました。
|
||||||
|
</p>
|
||||||
|
<p style="font-size: 13px; font-weight: 400; color: #2e3a59; margin-bottom: 3px;">
|
||||||
|
-担当者名: <span style="color: #417DDC;">${surveyDetail?.representative}</span>
|
||||||
|
</p>
|
||||||
|
<p style="font-size: 13px; font-weight: 400; color: #2e3a59; margin-bottom: 3px;">
|
||||||
|
-販売店名:
|
||||||
|
<span style="color: #417DDC;">
|
||||||
|
${surveyDetail?.store} (${surveyDetail?.storeId})
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
<p style="font-size: 13px; font-weight: 400; color: #2e3a59; margin-bottom: 15px;">
|
||||||
|
-施工店名:
|
||||||
|
<span style="color: #417DDC;">${surveyDetail?.constructionPoint}</span>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<a
|
||||||
|
style="font-size: 13px; font-weight: 400; color: #1259CB; margin-bottom: 5px; text-decoration: underline;"
|
||||||
|
href="${process.env.NEXT_PUBLIC_API_URL}/pdf/survey-sale/${surveyDetail?.id}"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
現地調査結果PDFダウンロード
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
<p style="font-size: 13px; font-weight: 400; color: #2e3a59;">
|
||||||
|
※リンクをクリックしてローカル調査結果PDFをダウンロードできます。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
`
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
popupController.setSurveySaleSubmitPopup(false)
|
popupController.setSurveySaleSubmitPopup(false)
|
||||||
@ -185,36 +216,7 @@ export default function SurveySaleSubmitPopup() {
|
|||||||
<div className="data-input">
|
<div className="data-input">
|
||||||
{field.id === 'contents' ? (
|
{field.id === 'contents' ? (
|
||||||
<div className="submit-content" id={field.id}>
|
<div className="submit-content" id={field.id}>
|
||||||
<div ref={contentsRef}>
|
<div dangerouslySetInnerHTML={{ __html: generateEmailContent() }} />
|
||||||
<p style={{ fontSize: '13px', fontWeight: '400', color: '#2e3a59', marginBottom: '15px' }}>
|
|
||||||
HANASYS現地調査アプリを使用した現地調査結果が送信されました。
|
|
||||||
</p>
|
|
||||||
<p style={{ fontSize: '13px', fontWeight: '400', color: '#2e3a59', marginBottom: '3px' }}>
|
|
||||||
-担当者名: <span style={{ color: '#417DDC' }}>{surveyDetail?.representative}</span>
|
|
||||||
</p>
|
|
||||||
<p style={{ fontSize: '13px', fontWeight: '400', color: '#2e3a59', marginBottom: '3px' }}>
|
|
||||||
-販売店名:
|
|
||||||
<span style={{ color: '#417DDC' }}>
|
|
||||||
{surveyDetail?.store} ({surveyDetail?.storeId})
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p style={{ fontSize: '13px', fontWeight: '400', color: '#2e3a59', marginBottom: '15px' }}>
|
|
||||||
-施工店名:
|
|
||||||
<span style={{ color: '#417DDC' }}>{surveyDetail?.constructionPoint}</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a
|
|
||||||
style={{ fontSize: '13px', fontWeight: '400', color: '#1259CB', marginBottom: '5px', textDecoration: 'underline' }}
|
|
||||||
href={`${process.env.NEXT_PUBLIC_API_URL}/pdf/survey-sale/${surveyDetail?.id}`}
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
現地調査結果PDFダウンロード
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
<p style={{ fontSize: '13px', fontWeight: '400', color: '#2e3a59' }}>
|
|
||||||
※リンクをクリックしてローカル調査結果PDFをダウンロードできます。
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -492,7 +492,6 @@ export default function RoofForm(props: {
|
|||||||
className="textarea-form"
|
className="textarea-form"
|
||||||
name="memo"
|
name="memo"
|
||||||
id="memo"
|
id="memo"
|
||||||
placeholder="TextArea Filed"
|
|
||||||
value={roofInfo?.memo ?? ''}
|
value={roofInfo?.memo ?? ''}
|
||||||
disabled={mode === 'READ'}
|
disabled={mode === 'READ'}
|
||||||
onChange={(e) => setRoofInfo({ ...roofInfo, memo: e.target.value })}
|
onChange={(e) => setRoofInfo({ ...roofInfo, memo: e.target.value })}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user