Subversion Repositories SmartDukaan

Rev

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

Filtering Options

Rev Age Author Path Log message Diff
37337 10 h 10 m amit /trunk/profitmandi-fofo/ Move offer-circular ingest out of cron and into the portal

The parse now runs in profitmandi-fofo, on a background thread, triggered by the
upload that produced the document.

Why: splitting one feature across two artifacts with independent deploy cadences
cost a full day. fofo shipped, cron did not, and a valid upload sat in DRAFT with
nothing on the server able to parse it - the deployed cron jar contained none of the
ingest classes. One 9-page PDF a month never justified a batch tier, and the portal
already ships two PDF stacks, so the isolation argument for keeping PDFBox out was
weaker than it looked.

- 13 parser classes move verbatim from com.smartdukaan.cron.offercircular to
com.spice.profitmandi.web.offercircular. No logic changed.
- CircularIngestScheduler becomes CircularIngestRunner: the @Scheduled(every 5 min)
entry point and the offer.circular.ingest.enabled flag are gone, replaced by a
single-threaded daemon executor. All claim, ingest and notification logic is
unchanged.
- Upload hands the document id to the runner AFTER COMMIT, not inline. The DRAFT row
is written inside the request transaction; a worker starting immediately would race
that commit, find nothing to claim and silently do nothing - which is precisely the
stuck-on-DRAFT symptom this change removes.
- The guarded claim is KEPT even though there is now one trigger. It still stops a
double-submit, a second portal node, and a re-ingest racing an in-flight parse.
- Re-ingest parses immediately instead of queueing for a scheduler.
- The stall reaper runs when the review screen loads. There is no timer here any
more, and a document stranded by a redeploy mid-parse only matters when somebody
looks for it - which matters more now the parse lives in the web application.
- tabula moves to this module with its exclusions intact, as does the
dumpCircularClasspath helper the local ingest harness depends on.
- Screen no longer claims "the ingest job runs every 5 minutes", which was untrue the
moment cron stopped being the route; poll interval 15s -> 3s to match a parse that
takes seconds. jsVersion 404 -> 405.
- offer.circular.review.url added here, since the runner sends that email now.

Verified: full ingest of the Aug'26 circular through the relocated code is identical
to the reference - 239 offers, 663 products, 279 AUTO_EXACT, 361 benefits, 511
tenures, 911 bank links. ProductNamesTest 11/11 in its new home.
 
37335 11 h 36 m amit /trunk/profitmandi-fofo/src/main/ Show offer circular ingest state on the review screen

Upload and parsing run in different processes - the portal stores the PDF as DRAFT
and the cron job claims it minutes later - so the screen looked identical before and
after a successful ingest. A reviewer had no way to tell "not parsed yet" from
"parsed and produced nothing", and a FAILED circular showed nothing at all.

- the selected circular's state is shown as queued / parsing / parsed / failed,
with the recorded reason on failure and the ingest summary on success
- while it is DRAFT or PROCESSING the screen polls every 15s and pulls in the rows
the moment the parse lands. Polling stops as soon as the state settles, so it
cannot spin forever, and a transient error keeps waiting rather than giving up
- jsVersion 403 -> 404, since offer-circular-review.js is already being served and
this is a modification rather than a new file

Pairs with the stall reaper: a circular abandoned mid-parse is now both recovered
and explained on screen instead of sitting silently in PROCESSING.
 
37327 1 d 6 h ranu /trunk/ super retailer club 5 live  
37270 8 d 13 h amit /trunk/profitmandi-fofo/src/main/ Hot deals admin: activated -> fresh (labels, params, row editors); manual Push to Solr for selected models (checkbox selection + /hotDeals/pushSolr calling FofoSolr.updateSingleCatalog directly, bypasses prod-gated event so Category team curation is searchable immediately); jsVersion 395  
37256 12 d 8 h amit /trunk/profitmandi-fofo/src/main/ feat: hot-deals admin — all-brands searchable/paginated table

- /hotDeals/all replaces per-brand /hotDeals table: server-side search (model/
brand), 20/page with prev/next, Brand column, newest window first
- /hotDeals/slots: active-slot usage per brand (n / 15) for the add form
- jsVersion 394
 
37246 12 d 12 h amit /trunk/profitmandi-fofo/src/main/ Hot deals admin: five mandatory attribute inputs (no defaults) on add + inline row edit, table columns, updateDeal params; jsVersion 393  
37222 14 d 7 h amit /trunk/profitmandi-fofo/src/main/ external api v2: Technology > External API Clients admin screen (read-only client/store/category mappings), jsVersion 392  
37212 14 d 10 h amit /trunk/profitmandi-fofo/src/main/ Hot Deals: Category-team page under Catalog menu - brand-wise hot deal models with inline date editing (manage-hot-deals)  
37194 18 d 6 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.
 
37187 19 d 6 h amit /trunk/profitmandi-fofo/src/main/ PJP agenda config: sidebar action_class handler in Sales PJP menu; jsVersion 389  
37171 19 d 11 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  
37169 19 d 11 h amit /trunk/profitmandi-fofo/src/main/ Remove 'Additional outlet for same GST' checkbox (guard simplified to limbo-store rule; parallel outlets pass automatically); jsVersion 387  
37161 20 d 4 h ranu /trunk/profitmandi-fofo/src/main/java/com/spice/profitmandi/web/config/ level l1 to l9 commited  
37158 20 d 7 h amit /trunk/profitmandi-fofo/src/main/ Retailer-details form: 'Additional outlet for same GST' checkbox feeding allowAdditionalOutlet onboarding-guard override; jsVersion 385  
37151 22 d 6 h aman /trunk/ Fix 'Mobile already exist' on retailer save + store code not linking to onboarding panel. (1) RetailerServiceImpl: extract linkStoreCodeToOnboardingPanel and call it for EXISTING stores too, so re-saving Retailer Details heals a panel missing its code (never overwrites, requires verification YES, best-effort). (2) retailer-details form now identifies the partner by the server-rendered loadedUserEmail hidden field instead of the editable email input, so editing email/mobile updates the loaded account instead of tripping the duplicate-mobile check. Bump js version to 384. Case: onboarding 1929 / UKDH1623.  
37135 26 d 7 h amit /trunk/profitmandi-fofo/src/main/ Price hike manual processing UI for finance: hike rows (amount<0) on incomplete price-drop screen show single Process Hike button wired to GET /priceHike/process/{id} (idempotent recovery sweep); drop-payout buttons and payout input hidden on hike rows; jsVersion 383  
37133 26 d 10 h amit /trunk/profitmandi-fofo/src/main/ Bulk approve vendor catalog pricing requests by re-uploading the pricing file on the approval queue page: new /bulkVendorCatalogPricing/verify endpoint, upload control + JS handler on pending-requests page, single-row approve branch moved to service (approveVendorCatalogPricingLog); bump jsVersion to 381  
37105 33 d 7 h amit /trunk/profitmandi-fofo/src/main/ Add non-prod password reset page for auth users and partners (HRMS); bump jsVersion to 380  
37101 33 d 8 h amit /trunk/profitmandi-fofo/src/main/ Guard blocked-brand mapping against null brand (server + JS); bump jsVersion to 379

getBlockBrandMappping now rejects null/blank/"null"/"0" brand before delete+persist,
and retailer-block-brands.js alerts instead of submitting when no brand is selected.
Stops literal "null" rows in dtr.retailer_block_brands.
 
37072 36 d 5 h amit /trunk/profitmandi-fofo/src/main/ PO creation: alert on missing approved vendor price + JS version bump 378 (T10); POST whitespace sanitizer deserializer + VendorController search fix (T9.5)  

Show All