Ports "تکمیل پروفایل" end to end (D22). API - POST customer/me/complete-profile — three required document ids, the customer taken from the token, verification step set to the reference's LIVE value (approved outright; its `= 1` line is commented out at :83 in favour of `= 2` at :85). Both SMS messages byte-identical and non-blocking per D20. - POST customer/me/documents — the reference let the app upload through the same file/create the admin used, inside its auth:api-customer group (routes/api.php:95); the target's copy is admin-guarded, so the page could not have uploaded at all. Reuses AdminUploadsService unchanged, so both paths share one size limit, MIME whitelist and naming scheme (UPL-01). - PROFILE_ADMIN_MOBILES replaces the reference's four hardcoded personal numbers; blank means nobody is notified and the upload still succeeds. Three reference behaviours deliberately NOT ported, all in ISSUES.md: - SEC-14: `$customer->update($request->all())` mass-assigned the whole request body, letting the app write its own credit limit, making charge, gold debt, active flag or mobile. Replaced with a three-field whitelist. - SEC-15: four real personal mobiles hardcoded in the source. - APP-03: refresh()'s unterminated setInterval page reload. Apps (both, template+script byte-identical, per-app styling only) - CompleteProfileView + SingleImageUploader - route /complete_profile, redirecting home once the documents are in, as the reference's guard did (router/index.ts:266) - the entry point on the profile screen, shown only while they are missing (profile.vue:96-102) Also (D23): JWT_CUSTOMER_SECRET now warns loudly at boot when unset. It falls back to JWT_SECRET, which signs app and admin tokens with the same key and leaves the `typ` check as the only barrier — and an expert's app token carries their AdminUser id in `sub`. Warn rather than refuse to boot (D19, lowest risk); DELIVERY.md lists it as the first pre-release step (REL-03). Verified: build 5/5 · jest 45/45 · complete-profile 38/38 (new) · expert login 36/36 · apps smoke 43/43 · admin smoke 43/43 · B2B scan 34 ok/0 broken · typecheck clean on all four apps. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2 lines
1.8 KiB
CSS
2 lines
1.8 KiB
CSS
.prof[data-v-bde55e2f]{background:#fff;min-height:100vh}.prof__body[data-v-bde55e2f]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-bde55e2f]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-bde55e2f]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-bde55e2f]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-bde55e2f]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-bde55e2f]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-bde55e2f]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-bde55e2f]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-bde55e2f]{margin-top:26px}.prof__specs[data-v-bde55e2f]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-bde55e2f]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-bde55e2f]:last-child{border-bottom:0}.prof__spec dt[data-v-bde55e2f]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-bde55e2f]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-bde55e2f]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-bde55e2f]{margin:0;font-size:12.5px}.prof__complete[data-v-bde55e2f]{margin-top:20px;width:100%;padding:14px;border:none;border-radius:14px;background:#14161a;color:#fff;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer}
|