Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
37823 4 d 19 h amit /trunk/profitmandi-fofo/src/main/ feat(seller): rebuild Sellers & Warehouses screen; PO supplier filter by warehouse; internal warehouse from active sellerwarehouse

Needs dao r37822 and the warehouseaddressmaster.active migration (applied on hadb1).

- Sellers & Warehouses (menu 113): SellerController is now a thin layer over
WarehouseSetupService. Seller list; per-seller physical warehouses with internal
store / supplier / Dummy / sequences, Active toggle and Change address (internal
stores follow); address list with Active toggle; New Address with city, pin,
contact and invoice preview; New Seller with GSTIN checks; New Warehouse creates
the OURS/BAD vendor 40 + Dummy shape. JSON posts; refusals come back as 400 text.
- PO create screen: vendor search takes the selected warehouse and lists only
suppliers mapped to it (/vendors?warehouseId); changing warehouse clears the vendor.
- Supplier create/edit: internal warehouse defaults to 0 and is picked from active
physical warehouses (transaction.sellerwarehouse.is_active), not WAREHOUSE_MAP;
validated on save. Fixes the edit form ticking "Internal Warehouse" for a stored 0
and saving the first option (7720), and the create form never sending it.
- jsVersion 441.
 
37564 26 d 13 h amit /trunk/profitmandi-fofo/src/main/ Creation screens request only live listings from the item typeahead

/item takes an activeOnly flag (default false, preserving current behaviour)
and passes it to getAllPartnerItemStringDescription. getItemAheadOptions takes
an optional 4th argument, so existing 3-argument callers are unaffected.

Sent true from the two creation entry points:
- warehouse purchase (PO) invoice line picker
- the new-price-drop modal (#typeaheaditem)

Left false where the screen works on records that already exist and may since
have been delisted: the price-drop pause/manage picker (#typeaheaditem1),
catalog-item, combo and prebooking.

jsVersion 419 -> 420 to cache-bust common.js / warehouse-purchase.js (419 was
already taken by another change).
 
37458 38 d 2 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.
 
37282 56 d 23 h amit /trunk/profitmandi-fofo/src/main/ hot deals: remove legacy tag_listing hot-deals endpoints and catalog-item UI (replaced by model_hot_deal admin flow)  
37194 66 d 22 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.
 
37171 68 d 3 h amit /trunk/profitmandi-fofo/src/main/ Wallet page: show sanctioned credit limit tile alongside utilization/total due; format amounts via currency class + formatCurrency on load; jsVersion 388  
36922 103 d 22 h amit /trunk/profitmandi-fofo/src/main/ Remove unused Digify retailer integration and fix slim-jQuery clobber on partner-performance/today_po/today_target pages

- Delete Digify controller, views and Buyback asset; drop dead .digify-retailer-login handler and buyback links/buttons
- Load full jQuery (3.5.1) instead of jquery slim on partner-performance/today_po/today_target so injected pages no longer overwrite the dashboard jQuery (restores $.ajax / slideUp)
- Bump jsVersion to 365
 
36819 118 d 0 h amit /trunk/profitmandi-fofo/src/main/ Fix idempotency dedup to be server-authoritative (content + partner scoped)

PostInterceptor now keys duplicates on sha256(fofoId|method|uri|bodyHash) for
mutating methods only, instead of the client-supplied IdempotencyKey header.
The header was rotated per-request by the frontend (and old/sticky clients),
so identical submissions produced distinct keys and were never deduped - e.g.
a create-offer burst created 147 duplicate rows. Keying on the request body
makes dedup independent of client behaviour; partner scoping prevents cross-
partner collisions; distinct payloads (one-offer-per-partner) are unaffected.
GET/HEAD are now never deduped (removes spurious GET 400s).

common.js: attach IdempotencyKey only to mutating methods; stop rotating the
key on every ajaxComplete (kept reset on ajaxSuccess only). version 355.
 
36697 132 d 20 h amit /trunk/profitmandi-fofo/src/main/ fix: FY date range end date missing endOf day in account statement picker, bump version to 342  
36598 140 d 0 h amit /trunk/profitmandi-fofo/src/main/ Flagship models: catalog-level typeahead with 70K min price filter, add menu_category access  
36572 143 d 1 h amit /trunk/ fix: add debit note PDF labels, HDFC UTR duplicate lock, AJAX error handlers in common.js  
35626 248 d 22 h amit /trunk/ Ticket system: add unread tracking, pagination, search, and partner notifications  
35594 251 d 18 h amit /trunk/ Ticket system: CRM access, category filtering, UI improvements

CRM Team Access:
- CRM users can see all tickets in myticket and managerTicket views
- CRM users can assign/edit tickets from all views
- Only CRM can mark tickets as resolved

Category Filtering (hidden from CRM):
- Sales category (ID 4) and Sales Escalation subcategory (ID 84)
- RBM category (ID 18) and RBM Escalation subcategory (ID 83)

UI Improvements:
- Partner name link opens partnerPerformance in new tab (reusable via .partner-link class)
- Edit modal shows ticket ID and partner name in title
- Resolve confirm shows ticket ID and partner name
- Fixed duplicate class attributes in buttons
- Modal shows after content loads (removed data-toggle conflicts)

Version bump: JS 313, CSS 34
 
35544 268 d 22 h amit /trunk/profitmandi-fofo/src/main/webapp/resources/js/ Handle scientific notation (e.g., 1.37E7) in numberToComma() function  
35533 272 d 2 h amit /trunk/profitmandi-fofo/src/main/ Fixed AppConfig  
35510 278 d 23 h amit /trunk/profitmandi-fofo/src/main/webapp/resources/js/ Fixed method Number to comma for Cr. Values  
35459 289 d 19 h amit /trunk/ Revert non-Java file changes from r35458  
35458 289 d 19 h amit /trunk/ Revert @Transactional(readOnly=true) - keep @Transactional only at Controller level

Changes:
- profitmandi-web: Controllers use @Transactional(rollbackFor = Throwable.class) at class level, removed method-level @Transactional(readOnly = true)
- profitmandi-fofo: Controllers use @Transactional(rollbackFor = Throwable.class) at class level, removed method-level @Transactional
- profitmandi-dao: Removed @Transactional from services/repositories

Exceptions (called from interceptors, need own transaction):
- RoleManager: @Transactional(readOnly = true) - called from interceptor for auth
- PartnerTypeChangeServiceImpl.getBestPartner(): @Transactional - called from JWTUtil via interceptor

Fixed javax.transaction.Transactional to org.springframework.transaction.annotation.Transactional
Fixed rollbackOn to rollbackFor for Spring compatibility
 
35289 325 d 6 h amit /trunk/ Added trial franchisee feature  
34859 425 d 22 h vikas /trunk/ Web Pages Management  

Show All