feat(inout): 발주 메일(발주 담당 본인 Gmail) · 공장 이메일 · 입고증 사진
- inout_db 003: 공장 이메일, 사람별 Gmail 연결(갱신 토큰 암호문만), 발주 메일 기록, 입고증 사진(bytea). init 에도 같게.
- 발주 메일: 새 발주서 저장 → 미리보기 팝업(받는 사람 = 공장 이메일, 요약 표 HTML + 글 본문) → 사람이 [메일 발송]을
눌러야 Gmail API(gmail.send)로 본인 Gmail 에서 발송. [Gmail 연결]은 사람마다 1회 — 고른 구글 계정 = ERP 계정 확인,
APP_ENCRYPTION_KEY(AES-GCM, AAD inout:gmail:{email})로 암호화 저장. 보낸 기록, 재발송은 확인 후(resend),
연결 끊김(invalid_grant)은 토큰 삭제 후 재연결 안내.
- 입고증 사진: 입고 저장 때 첨부(브라우저가 긴 변 2000px JPEG 로 줄임 — 7.9MB → 0.8MB), 10장·10MB, 파일 머리로 형식 검사,
입고와 한 트랜잭션. 썸네일·크게 보기(←/→)·나중에 더하기·지우기, 보기는 nosniff·CSP sandbox. 초과 확인은 브라우저가 먼저(사진 유지).
- 테스트: 메일 본문·escape·받는 주소·Gmail 연결 검사·토큰 갱신/발송(가짜 구글)·암호화, 사진 검사, 실제 PostgreSQL 저장,
실제 앱 흐름(사진 업로드·보기 헤더·권한, 메일 미리보기·연결·발송·재발송·끊김). 실제 브라우저로 팝업·사진·축소 확인.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+70
-4
@@ -124,7 +124,7 @@
|
||||
.io-factory-who { display: block; font-size: 12px; color: var(--color-midtone-gray); margin-top: 2px; }
|
||||
|
||||
/* 옵션 팝업 */
|
||||
.io-dlg { width: min(1040px, calc(100vw - 40px)); max-height: min(760px, calc(100vh - 40px)); padding: 0; border: 1px solid var(--color-subtle-ash);
|
||||
.io-dlg { width: min(1180px, calc(100vw - 40px)); max-height: min(760px, calc(100vh - 40px)); padding: 0; border: 1px solid var(--color-subtle-ash);
|
||||
border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); color: var(--color-rich-black); overflow: hidden; }
|
||||
.io-dlg[open] { display: flex; flex-direction: column; }
|
||||
.io-dlg:focus { outline: none; }
|
||||
@@ -158,9 +158,9 @@
|
||||
color: var(--color-rich-black); background: #fff; }
|
||||
.io-in:focus { outline: none; border-color: var(--color-rich-black); box-shadow: 0 0 0 3px rgba(0, 0, 0, .06); }
|
||||
.io-in-num { text-align: right; }
|
||||
.io-factory-table col.w-name { width: 18%; }
|
||||
.io-factory-table col.w-man { width: 12%; }
|
||||
.io-factory-table col.w-tel { width: 18%; }
|
||||
.io-factory-table col.w-name { width: 15%; }
|
||||
.io-factory-table col.w-man { width: 10%; }
|
||||
.io-factory-table col.w-tel { width: 14%; }
|
||||
.io-factory-table col.w-memo { width: auto; }
|
||||
.io-factory-table col.w-sort { width: 64px; }
|
||||
.io-factory-table col.w-use { width: 48px; }
|
||||
@@ -180,3 +180,69 @@
|
||||
.io-dlg-body { overflow-x: auto; }
|
||||
.io-factory-table { min-width: 860px; }
|
||||
}
|
||||
|
||||
/* ── 발주 메일(003) ── */
|
||||
.io-mail-btn { display: inline-flex; align-items: center; gap: 6px; }
|
||||
.io-mail-sent { color: #1e7a34; font-weight: 600; }
|
||||
.io-mail-dlg { width: min(860px, calc(100vw - 40px)); }
|
||||
.io-mail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 12px; }
|
||||
.io-mail-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--color-midtone-gray); }
|
||||
.io-mail-fields input[readonly] { background: var(--color-ghost-gray); color: #3d3f42; }
|
||||
.io-mail-sentlist { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #f3fbf5; border: 1px solid #cdeed6; font-size: 12.5px; }
|
||||
.io-mail-sentlist ul { margin: 4px 0 0; padding-left: 18px; }
|
||||
.io-mail-preview { width: 100%; height: 380px; border: 1px solid var(--color-subtle-ash); border-radius: 8px; background: #fff; }
|
||||
.io-mail-connect { padding: 8px 2px 4px; font-size: 13.5px; line-height: 1.7; }
|
||||
.io-mail-connect .erp-btn { margin-top: 6px; }
|
||||
.io-hint { margin: -4px 0 12px; font-size: 12.5px; color: #9a5b00; }
|
||||
.io-dlg-footbar { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--color-subtle-ash); background: #fafbfc; }
|
||||
.io-link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--color-midtone-gray); text-decoration: underline; cursor: pointer; }
|
||||
.io-link-btn:hover { color: var(--color-rich-black); }
|
||||
|
||||
/* ── 입고증 사진(003) ── */
|
||||
.io-photo-field { min-width: 180px; }
|
||||
.io-photo-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px dashed #b7bcc4;
|
||||
border-radius: 8px; background: #fff; color: var(--color-rich-black); font-size: 13px; cursor: pointer; white-space: nowrap; }
|
||||
.io-photo-pick:hover { border-color: var(--color-rich-black); background: var(--color-ghost-gray); }
|
||||
.io-photo-pick:focus-within { outline: 2px solid var(--color-rich-black); outline-offset: 2px; }
|
||||
.io-photo-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
|
||||
.io-photo-previews { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.io-photo-previews:empty { display: none; }
|
||||
.io-photo-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 1px solid var(--color-subtle-ash);
|
||||
border-radius: 8px; background: #fff; font-size: 12px; color: #3d3f42; max-width: 280px; }
|
||||
.io-photo-chip img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--color-ghost-gray); }
|
||||
.io-photo-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.io-photo-chip button { border: 0; background: none; color: #6d6e6f; cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 4px; }
|
||||
.io-photo-chip button:hover { background: var(--color-ghost-gray); color: #c5221f; }
|
||||
.io-photo-lost { margin: 0 0 8px; font-size: 12.5px; color: #7a1d14; font-weight: 600; }
|
||||
.io-photos-cell { white-space: normal !important; min-width: 120px; }
|
||||
.io-photos-cell .io-add-photo-form { display: inline-block; margin: 0; vertical-align: middle; }
|
||||
.io-thumb { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 2px 4px 2px 0;
|
||||
padding: 0; overflow: hidden; border: 1px solid var(--color-subtle-ash); border-radius: 6px; background: var(--color-ghost-gray); cursor: zoom-in; vertical-align: middle; }
|
||||
.io-thumb img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.io-thumb:hover { border-color: var(--color-rich-black); }
|
||||
.io-thumb-heic { font-size: 10px; font-weight: 700; color: #6d6e6f; }
|
||||
.io-thumb-add { cursor: pointer; border-style: dashed; background: #fff; color: #6d6e6f; font-size: 20px; }
|
||||
.io-thumb-add:hover { color: var(--color-rich-black); }
|
||||
.io-viewer { width: min(1100px, calc(100vw - 40px)); height: min(860px, calc(100vh - 40px)); padding: 0; border: 0; border-radius: 12px;
|
||||
background: #111; color: #fff; overflow: hidden; }
|
||||
.io-viewer[open] { display: flex; align-items: center; justify-content: center; }
|
||||
.io-viewer:focus { outline: none; }
|
||||
.io-viewer::backdrop { background: rgba(0, 0, 0, .7); }
|
||||
.io-viewer-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
|
||||
background: linear-gradient(rgba(0, 0, 0, .6), rgba(0, 0, 0, 0)); z-index: 1; }
|
||||
.io-viewer-bar form { margin: 0; }
|
||||
.io-viewer-title { flex: 1 1 auto; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.io-viewer-btn { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff;
|
||||
font: inherit; font-size: 12.5px; text-decoration: none; cursor: pointer; }
|
||||
.io-viewer-btn:hover { background: rgba(255, 255, 255, .15); }
|
||||
.io-viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; }
|
||||
.io-viewer-heic { padding: 24px; text-align: center; }
|
||||
.io-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; border-radius: 8px;
|
||||
background: rgba(0, 0, 0, .45); color: #fff; font-size: 30px; cursor: pointer; z-index: 1; }
|
||||
.io-viewer-nav:hover { background: rgba(255, 255, 255, .2); }
|
||||
.io-viewer-nav.is-prev { left: 10px; }
|
||||
.io-viewer-nav.is-next { right: 10px; }
|
||||
.io-factory-table col.w-mail { width: 17%; }
|
||||
@media (max-width: 900px) {
|
||||
.io-mail-fields { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user