Subversion Repositories SmartDukaan

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
37632 21 d 17 h aman /trunk/ fix(loi): don't leave an LOI half signed when the signed PDF fails to save

Confirm Sign stores the partner OTP (/validateLoiOtp) before the browser builds and uploads the
signed PDF (/saveLoiDoc). When that second step failed - html2pdf not loaded from cdnjs, upload
rejected, tab closed, server error - nothing was shown, no LOI mail went out, no onboarding was
created, and because loiOtpPresent hid Generate LOI the filler could never re-sign (LOI 734).

- pendingFormList: loiOtpPresent only when OTP AND loiDoc are both saved; new loiSignIncomplete
flag shows a red "signed LOI not saved" note on the Pending LOI list (web + V2 app).
- loi-form.js Confirm Sign: every failure after the OTP says the LOI was NOT saved and how to
retry; checks html2pdf is loaded; success alert only after /saveLoiDoc confirms; no double submit.
- /saveLoiDoc (fofo + V2): refuses a document without a verified OTP; a repeat call for an
already saved LOI is a no-op (no second mail / completion).
- /validateLoiOtp (fofo + V2): clear message when no OTP was sent in 24h; reports the real
rejection reason (e.g. OTP already used) instead of always "wrong".
- sendSignedLoiPdfToPartner: filler without a manager no longer throws and rolls back the save.
- OtpProcessor.generateOtp: never hands back an already verified OTP under the 2-minute throttle.
- AppConfig version 423 for loi-form.js.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RhJD2sc6pf3Zd7f4hyGxhH
 
37523 34 d 6 h ranu /trunk/ loi process added, revival and code changes process  
37458 38 d 17 h aman /trunk/profitmandi-fofo/src/main/ LOI payment screenshot: report upload failures instead of reporting the field as missing

Submit validated the hidden #payment-sc-docId, but a file input keeps displaying the
chosen filename regardless of what happens next - so a failed /document-upload left the
field looking attached to the operator and missing to the validator ("The following
fields are required: Payment screenshot" on a form that was in fact filled in).

The failure was silent three ways: doAjaxUploadRequestHandler had no error handler; the
global ajaxError reporter calls bootbox, which loads from cdnjs and throws if that is
blocked; and the confirm('Confirm file upload ?') gate returned false with no trace once
Chrome's "prevent this page from creating additional dialogs" box was ticked.

- common.js: optional error callback on doAjaxUploadRequestHandler (additive, opts out of
the generic global dialog via suppressGlobalError); uploadErrorMessage() extracts the
server's real reason from the JSON body or the plain-text duplicate-request body;
uploadDocument() pre-checks size/type, verifies a document_id actually came back, and
reports a message naming the file - .HEIC and .webp get specific guidance;
showAlert() falls back to native alert when bootbox is absent.
- loi-form.js: drop the confirm() gate, 'input' -> 'change', and clear the file input
whenever the id does not land so the widget can never claim an unuploaded file. Status
line under the field (Uploading... / Attached: name / Not attached). Submit now
distinguishes not-picked, still-uploading and upload-failed. Same treatment for the
OnboardingDocumentTable and mk_brand-fee-collection-details uploads, and the brand-fee
dialog names the Attachment field instead of echoing the raw form key.
- loi-form.vm, pendingForm.vm: accept="..." on both file inputs plus the status span.
- FileUploadController: reject empty files, report actual size against the actual limit,
and resolveExtension() falls back to the filename when the browser sends a generic MIME
type (Android file managers send application/octet-stream for ordinary JPG/PNG/PDF).
- AppConfig: static resource version 395 -> 396 for the JS change.
 
37194 67 d 13 h aman /trunk/ LOI OTP: report real send outcome instead of always 'OTP Sent Successfully!'

The Send OTP button showed success for any HTTP 200, including the daily-cap
failure where the controller returned 'Something went wrong..'. Ops could not
tell a working send from a broken one, so genuine failures were invisible.

- OTPResponse: add 'sent' flag. result=true did not mean anything was
dispatched - the 2-minute resend throttle returns the previous OTP without
contacting the gateway.
- OtpProcessor: set sent=true only on branches that actually dispatch.
- LoiFormController.sentLoiAcceptanceOtp: return {status, sent, message} with
the processor's real reason, wrap generateOtp in try/catch so a dispatch
exception is logged and reported instead of surfacing as a generic 500, and
log loiId/result/sent/reason.
- loi-form.js: check the payload; distinct green/amber/red states, re-enable
the button on failure instead of leaving it stuck on 'Sending...'.
- common.js: optional error callback on doAjaxRequestHandler /
doPostAjaxRequestHandler (additive; existing callers unchanged).
- AppConfig: static resource version 389 -> 390 for the JS change.
 
36851 112 d 17 h aman /trunk/profitmandi-fofo/src/main/ Fix LOI Acquired Date validation rejecting manually-typed dates; bump asset version to 359

Validate the Acquired Date range on blur instead of change so typing the
year digit-by-digit in the type=date field no longer rejects intermediate
values. Bump cache-buster version 358->359 so clients reload the updated JS.
 
36845 113 d 15 h aman /trunk/profitmandi-fofo/src/main/webapp/resources/js/ Fix Acquired Date rejecting today's date due to UTC vs local midnight comparison

new Date('YYYY-MM-DD') parses as UTC midnight while the 'today' reference is
local midnight, so in IST (UTC+5:30) today's date compared as future and was
rejected. Add parseLocalYMD() to parse the picked value at local midnight and
use it in both the change handler and submit-time validation.
 
36843 113 d 16 h aman /trunk/profitmandi-fofo/src/main/webapp/resources/js/ Enforce Acquired Date 7-day window in LOI form across all browsers

Native date input min/max only greys out out-of-range dates reliably in
Chrome; Firefox/Safari still allowed picking dates outside the last 7 days.
Added a browser-independent 'change' handler that clears an out-of-range
selection and alerts the user, instead of only catching it at submit.
 
36842 113 d 17 h aman /trunk/ LOI form: restrict Acquired Date to the last 7 days (calendar min/max + client validation + server-side guard)  
35977 210 d 12 h aman /trunk/ Fix:Full stock payment approval for kamini ma'am add threshold , Mail shootting if no loi done and some improvement  
35971 211 d 12 h aman /trunk/ Feat : Loi 2.0 Enhancement and redesigning  
35038 384 d 12 h aman /trunk/ LOI AUDIT  
34745 460 d 18 h aman.kumar /trunk/profitmandi-fofo/src/main/webapp/resources/js/ Pending loi form Image Update fix  
34739 462 d 16 h aman.kumar /trunk/ Delete option in loiFeeCollection  
34310 567 d 17 h tejus.lohani /trunk/ address enter manually if gst api not working  
34107 637 d 14 h tejus.lohani /trunk/ TECH-655,Add Two field in Onboarding form(loi form), 1.State Head , 2. SM and map these to field with Partner Onboarding panel , so that it automate in other related field  
34085 648 d 12 h tejus.lohani /trunk/ Store Potential must be greater than or equal to Wallet Value, Loi cancel button for HOD , change store type feature in pending loi form ,data table in wod-fin-mapping,expose code in wod status in wod-fin-mapping,remove xiaomi brand in dms code panel and wod-fin mapping report  
33909 700 d 19 h tejus.lohani /trunk/ add fin code field in loi-form , now if partner have finCode then sale team can collect fin code  
33885 714 d 13 h tejus.lohani /trunk/ all Active brand show in upload noc for do active/inactive and now loi -form filler can attach payment screenshot in 1st and further payment so that approver can see payment attachment  
33879 718 d 16 h tejus.lohani /trunk/ new verification process introduce and like two-step verification soft approve and then final approve and at the time of soft approval , approver need to upload required brand NOC or mark not receive/not required , In partner Acquisition option add one new panel add for NOC upload and soft approve  
33845 731 d 17 h tejus.lohani /trunk/ new flow of Onboarding process and wod-fin report ,  

Show All