diff --git a/Mermaid_Selector.html b/Mermaid_Selector.html index 87a9e05..28a67c6 100644 --- a/Mermaid_Selector.html +++ b/Mermaid_Selector.html @@ -226,8 +226,9 @@ } .zoom-btn { - width: 45px; + min-width: 45px; height: 45px; + padding: 0 12px; border: none; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; @@ -240,6 +241,7 @@ display: flex; align-items: center; justify-content: center; + white-space: nowrap; } .zoom-btn:hover { @@ -353,6 +355,9 @@ graph TD + + + @@ -363,7 +368,15 @@ graph TD mermaid.initialize({ startOnLoad: false, theme: 'default', - securityLevel: 'loose' + securityLevel: 'loose', + themeVariables: { + fontFamily: 'Arial, Helvetica, Verdana, sans-serif', + fontSize: '16px' + }, + flowchart: { + htmlLabels: true, + curve: 'basis' + } }); let currentTab = 'paste'; @@ -497,6 +510,187 @@ graph TD } } + function exportDiagram(format) { + const output = document.getElementById('diagramOutput'); + const svg = output.querySelector('svg'); + + if (!svg) { + showMessage('❌ No diagram to export', 'error'); + return; + } + + try { + // Clone the SVG to avoid modifying the original + const clonedSvg = svg.cloneNode(true); + + // Remove any transform applied by zoom/pan + clonedSvg.style.transform = ''; + + // Get SVG dimensions + const bbox = svg.getBBox(); + const width = bbox.width || svg.clientWidth || 800; + const height = bbox.height || svg.clientHeight || 600; + + // Add proper dimensions to the cloned SVG + clonedSvg.setAttribute('width', width); + clonedSvg.setAttribute('height', height); + + // Set viewBox if not already set + if (!clonedSvg.getAttribute('viewBox')) { + clonedSvg.setAttribute('viewBox', `${bbox.x} ${bbox.y} ${width} ${height}`); + } + + // Ensure xmlns attribute is present for proper rendering + clonedSvg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + clonedSvg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + + // Serialize SVG to string + const serializer = new XMLSerializer(); + let svgString = serializer.serializeToString(clonedSvg); + + // Encode SVG as data URI + const svgDataUri = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svgString))); + + // Create an image element + const img = new Image(); + + img.onload = function() { + // Create canvas with proper dimensions + const canvas = document.createElement('canvas'); + const scale = 3; // Higher scale for better quality in Word documents + canvas.width = width * scale; + canvas.height = height * scale; + + const ctx = canvas.getContext('2d'); + + // Enable high-quality rendering + ctx.imageSmoothingEnabled = true; + ctx.imageSmoothingQuality = 'high'; + + // Scale context for high quality + ctx.scale(scale, scale); + + // For JPEG, fill with white background + if (format === 'jpeg') { + ctx.fillStyle = 'white'; + ctx.fillRect(0, 0, width, height); + } + + // Draw image on canvas + ctx.drawImage(img, 0, 0, width, height); + + // Convert canvas to data URL + try { + const dataUrl = canvas.toDataURL(`image/${format}`, 0.95); + + // Create download link + const link = document.createElement('a'); + link.download = `mermaid-diagram-${Date.now()}.${format}`; + link.href = dataUrl; + link.click(); + + showMessage(`✅ Diagram exported as ${format.toUpperCase()}`, 'success'); + } catch (error) { + showMessage('❌ Error creating image: ' + error.message, 'error'); + console.error('Canvas export error:', error); + } + }; + + img.onerror = function(error) { + showMessage('❌ Error loading SVG for export', 'error'); + console.error('Image load error:', error); + }; + + // Set the source to the data URI + img.src = svgDataUri; + + } catch (error) { + showMessage('❌ Error: ' + error.message, 'error'); + console.error('Export error:', error); + } + } + + function exportAsPNG() { + exportDiagram('png'); + } + + function exportAsJPEG() { + exportDiagram('jpeg'); + } + + function exportAsSVG() { + const output = document.getElementById('diagramOutput'); + const svg = output.querySelector('svg'); + + if (!svg) { + showMessage('❌ No diagram to export', 'error'); + return; + } + + try { + // Clone the SVG to avoid modifying the original + const clonedSvg = svg.cloneNode(true); + + // Remove any transform applied by zoom/pan + clonedSvg.style.transform = ''; + + // Ensure xmlns attributes are present for proper rendering + clonedSvg.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + clonedSvg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + + // Add embedded style for standard fonts + const styleElement = document.createElementNS('http://www.w3.org/2000/svg', 'style'); + styleElement.textContent = ` + text { + font-family: Arial, Helvetica, Verdana, sans-serif !important; + font-size: 14px !important; + } + .nodeLabel, .edgeLabel { + font-family: Arial, Helvetica, Verdana, sans-serif !important; + } + `; + clonedSvg.insertBefore(styleElement, clonedSvg.firstChild); + + // Get SVG dimensions + const bbox = svg.getBBox(); + const width = bbox.width || svg.clientWidth || 800; + const height = bbox.height || svg.clientHeight || 600; + + // Set proper dimensions + clonedSvg.setAttribute('width', width); + clonedSvg.setAttribute('height', height); + + // Set viewBox if not already set + if (!clonedSvg.getAttribute('viewBox')) { + clonedSvg.setAttribute('viewBox', `${bbox.x} ${bbox.y} ${width} ${height}`); + } + + // Serialize SVG to string + const serializer = new XMLSerializer(); + let svgString = serializer.serializeToString(clonedSvg); + + // Add XML declaration for standalone SVG file + svgString = '\n' + svgString; + + // Create blob and download + const blob = new Blob([svgString], { type: 'image/svg+xml;charset=utf-8' }); + const url = URL.createObjectURL(blob); + + const link = document.createElement('a'); + link.download = `mermaid-diagram-${Date.now()}.svg`; + link.href = url; + link.click(); + + // Cleanup + URL.revokeObjectURL(url); + + showMessage('✅ Diagram exported as SVG', 'success'); + } catch (error) { + showMessage('❌ Error: ' + error.message, 'error'); + console.error('SVG export error:', error); + } + } + function setupPanAndZoom() { const output = document.getElementById('diagramOutput'); if (!output) return; diff --git a/RE_Abbrevations.txt b/RE_Abbrevations.txt index 616fab0..30fc5c9 100644 --- a/RE_Abbrevations.txt +++ b/RE_Abbrevations.txt @@ -88,6 +88,64 @@ GDPR : General Data Protection Regulation HIPAA : Health Insurance Portability and Accountability Act OWASP : Open Web Application Security Project +Approval Hierarchy + ┌────────────────────┐ + │ DD Team │ + │ (First point of │ + │ contact, initial │ + │ processing) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ ZM │ + │ (Evaluates & │ + │ approves/rejects) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ RBM │ + │ (Reviews ZM- │ + │ approved apps, │ + │ final decisions) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ DDL │ + │ (Evaluates RBM- │ + │ approved apps & │ + │ forwards to Finance)│ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ FDD Team │ + │ (Financial due │ + │ diligence & docs) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ NBH │ + │ (Final review & │ + │ approval) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ Legal │ + │ (Documentation & │ + │ compliance after │ + │ final approval) │ + └────────┬───────────┘ + │ + ▼ + ┌────────────────────┐ + │ Super Admin │ + │ (Full oversight & │ + │ management) │ + └────────────────────┘ - - +How created custom workflow and the targeted region will connect each other \ No newline at end of file diff --git a/Royal Enfield Documentation.docx b/Royal Enfield Documentation.docx new file mode 100644 index 0000000..f85504a Binary files /dev/null and b/Royal Enfield Documentation.docx differ diff --git a/approval_hierarchy.mermaid b/approval_hierarchy.mermaid new file mode 100644 index 0000000..1e16da5 --- /dev/null +++ b/approval_hierarchy.mermaid @@ -0,0 +1,9 @@ +graph TD + +DDT[DD Team
First point of contact,
Initial processing] --> ZM[ZM
Evaluates and Approves/Rejects] +ZM --> RBM[RBM
Reviews ZM-approved applications,
Makes final decisions] +RBM --> DDL[DDL
Evaluates RBM-approved applications
and Forwards to Finance] +DDL --> FDD[FDD Team
Financial Due Diligence
and Document Submission] +FDD --> NBH[NBH
Final Review and Approval] +NBH --> Legal[Legal
Handles Legal Documentation
and Compliance] +Legal --> SuperAdmin[Super Admin
Full Oversight and Management] diff --git a/dealer_offboard.mermaid b/dealer_offboard.mermaid new file mode 100644 index 0000000..dc2fad1 --- /dev/null +++ b/dealer_offboard.mermaid @@ -0,0 +1,97 @@ +graph TB + ActiveDealer([Active Dealer]) --> DealerOps{Dealer Operations} + + %% Resignation Path + DealerOps -->|Resignation Request| ResignStart[Dealer Sends Email to ZBH] + ResignStart --> ResignRecord[ZBH Records in System] + ResignRecord --> ResignZBH{ZBH Approval} + + ResignZBH -->|Rejected| ResignRejectZBH[Return to Previous Level & Notify] + ResignZBH -->|Approved| ResignDDL{DD Lead Approval} + + ResignDDL -->|Rejected| ResignRejectDDL[Return to ZBH & Notify] + ResignDDL -->|Approved| ResignNBH{NBH Approval} + + ResignNBH -->|Rejected| ResignRejectNBH[Return to DD Lead & Notify] + ResignNBH -->|Approved| GenResignLetter[Generate Resignation Acceptance Letter] + GenResignLetter --> SendResignLetter[NBH Approves & Shares Letter] + SendResignLetter --> StartFF1[Start F&F Process] + + %% Termination Path + DealerOps -->|Termination Initiated| TermStart[Identify Termination Reason] + TermStart --> TermType{Termination Type} + TermType -->|Immediate| TermDocs1[ASM Collects Documentation] + TermType -->|By Convenience| TermDocs2[ASM Collects Documentation] + + TermDocs1 --> PrepNotes[Generate Termination Notes PDF] + TermDocs2 --> PrepNotes + + PrepNotes --> TermZBH{ZBH Approval} + TermZBH -->|Rejected| TermRejectZBH[Return & Notify] + TermZBH -->|Approved| TermDDL{DD Lead Approval} + + TermDDL -->|Rejected| TermRejectDDL[Return to ZBH & Notify] + TermDDL -->|Approved| TermNBH{NBH Approval} + + TermNBH -->|Rejected| TermRejectNBH[Return to DD Lead & Notify] + TermNBH -->|Approved| TermCCO{CCO Approval} + + TermCCO -->|Rejected| TermRejectCCO[Return to NBH & Notify] + TermCCO -->|Approved| TermCEO{CEO Approval} + + TermCEO -->|Rejected| TermRejectCEO[Return to CCO & Notify] + TermCEO -->|Approved| IssueNotice[Generate Show Cause Notice] + + IssueNotice --> Send15Day[Send Notice with 15-Day Deadline] + Send15Day --> WaitDealer{Dealer Response?} + + WaitDealer -->|Response Received| ReviewResponse[Review Response] + WaitDealer -->|No Response| UploadTermLetter[DD Lead Uploads Signed Termination Letter] + ReviewResponse --> FinalDecision{Final Decision} + + FinalDecision -->|Proceed| UploadTermLetter + FinalDecision -->|Withdraw| TermWithdraw[Termination Withdrawn] + + UploadTermLetter --> StartFF2[Start F&F Process] + + %% Common F&F + StartFF1 --> FFNotify[Send F&F Notification to All Stakeholders] + StartFF2 --> FFNotify + + FFNotify --> FFTrack[F&F Tracking System Activated] + FFTrack --> FFStakeholders[Each Stakeholder Receives Task] + + FFStakeholders --> FFFinance[Finance: Settlement Forms] + FFStakeholders --> FFLegal[Legal: Clearance Forms] + FFStakeholders --> FFOthers[Other Stakeholders: Respective Forms] + + FFFinance --> FFUpdate1[Update Status in System] + FFLegal --> FFUpdate2[Update Status in System] + FFOthers --> FFUpdate3[Update Status in System] + + FFUpdate1 --> FFCheck{All Tasks Complete?} + FFUpdate2 --> FFCheck + FFUpdate3 --> FFCheck + + FFCheck -->|No| FFReminder[Send Reminder if TAT Exceeded] + FFReminder --> FFCheck + + FFCheck -->|Yes| BlockDealer[Block Dealer from System] + BlockDealer --> FFComplete[Send Completion Email to All Stakeholders] + + FFComplete --> End([Offboarding Complete]) + ResignRejectZBH --> End + ResignRejectDDL --> End + ResignRejectNBH --> End + TermRejectZBH --> End + TermRejectDDL --> End + TermRejectNBH --> End + TermRejectCCO --> End + TermRejectCEO --> End + TermWithdraw --> End + + style ActiveDealer fill:#87CEEB + style End fill:#FFB6C1 + style ResignNBH fill:#FFD700 + style TermCEO fill:#FFD700 + style BlockDealer fill:#FF6B6B diff --git a/dealer_onboard.mermaid b/dealer_onboard.mermaid new file mode 100644 index 0000000..0118f0f --- /dev/null +++ b/dealer_onboard.mermaid @@ -0,0 +1,59 @@ +graph TB + Start([Dealer Inquiry Received]) --> CaptureForm[Capture 'Become a Dealer' Form] + CaptureForm --> StoreData[Store in Database & Show Listing] + StoreData --> CheckLocation{Location Has Vacancy?} + + CheckLocation -->|No| RejectEmail[Send Non-Opportunity Email] + CheckLocation -->|Yes| AckEmail[Send Acknowledgement Email] + + AckEmail --> SendQuestionnaire[Send Opportunity Email with Questionnaire Link] + SendQuestionnaire --> WaitResponse{Response Received?} + + WaitResponse -->|No - D+2| Reminder1[Send Reminder Email] + Reminder1 --> WaitResponse2{Response Received?} + WaitResponse2 -->|No - D+5| Reminder2[Send Final Reminder] + Reminder2 --> WaitResponse3{Response Received?} + WaitResponse3 -->|No - D+20| ExpireLink[Close Questionnaire - Expired] + + WaitResponse -->|Yes| ProcessResponse[Calculate Weighted Rank] + WaitResponse2 -->|Yes| ProcessResponse + WaitResponse3 -->|Yes| ProcessResponse + + ProcessResponse --> DDShortlist[DD Team Reviews & Shortlists Top 10] + DDShortlist --> AssignZM[Assign to Zonal Manager ZM-DD] + + AssignZM --> ZMEval{ZM-DD KT Evaluation} + ZMEval -->|Rejected| ZMReject[Store Rejection Reason] + ZMEval -->|Shortlisted| AssignRBM[Auto-Assign to RBM] + + AssignRBM --> RBMEval{RBM Evaluation} + RBMEval -->|Rejected| RBMReject[Store Rejection Reason] + RBMEval -->|Approved| AssignDDL[Auto-Assign to DDL Team] + + AssignDDL --> FDD[Send OTP-Protected Link for Financial Due Diligence] + FDD --> UploadFDD[External Agency Uploads FDD Report L1/L2] + UploadFDD --> SubmitNBH[DD Team Submits to NBH] + + SubmitNBH --> NBHApproval{NBH Approval} + NBHApproval -->|Rejected| NBHReject[Store Rejection & Notify] + NBHApproval -->|Approved| IssueLOI[Generate & Send LOI] + + IssueLOI --> UploadLOI[Upload LOI to System] + UploadLOI --> IssueLOA[Generate & Send LOA] + IssueLOA --> UploadLOA[Upload LOA to System] + + UploadLOA --> ScheduleEOR[Regional DD Schedules EOR Audit] + ScheduleEOR --> UploadEOR[Upload EOR Audit Report] + UploadEOR --> EORApproval{NBH EOR Approval} + + EORApproval -->|Rejected| EORReject[Store Rejection & Notify] + EORApproval -->|Approved| UpdateDealer[Update Dealer Info: Inauguration Date, Codes] + + UpdateDealer --> ActiveDealer[Active Dealer] + ActiveDealer --> End[Onboarding Complete] + + style Start fill:#90EE90 + style End fill:#FFB6C1 + style ActiveDealer fill:#87CEEB + style NBHApproval fill:#FFD700 + style EORApproval fill:#FFD700 diff --git a/settlment_diagram.mermaid b/settlment_diagram.mermaid index 714b3ac..e14105c 100644 --- a/settlment_diagram.mermaid +++ b/settlment_diagram.mermaid @@ -1,80 +1,54 @@ graph TD - Start([Start: Dealer Claim Process]) --> RI[1.Request Initiation] - - RI --> RI1[Requestor Submits Request] - RI1 --> RI2[Activity Type] - RI1 --> RI3[Dealer Info] - RI1 --> RI4[Date/Location] - RI1 --> RI5[Activity Details & Period] - - RI2 --> PS[2.Proposal Submission] - RI3 --> PS - RI4 --> PS - RI5 --> PS - - PS --> PS1[Dealer Submits Proposal] - PS1 --> PS2[Cost Breakup] - PS1 --> PS3[Timeline for Closure] - PS1 --> PS4[Supporting Documents] - - PS2 --> RE[3.Request Evaluation] - PS3 --> RE - PS4 --> RE - - RE --> RE1{Requestor Reviews} - RE1 -->|Needs Clarification| RE2[Request More Info] - RE2 --> PS1 - RE1 -->|Approved| RE3[Confirm to Proceed] - - RE3 --> DLA[4.Dept.Lead Approval] - - DLA --> DLA1{Lead Reviews Request} - DLA1 -->|Needs Clarification| DLA2[Request Clarification] - DLA2 --> RE - DLA1 -->|Approved| DLA3[Approve Request] - - DLA3 --> BUD[5.Budgeting] - - BUD --> BUD1[Block Budget] - BUD1 --> BUD2[Assign to IO
Internal Order] - - BUD2 --> AC[6.Activity Creation] - - AC --> AC1[System Creates Activity] - AC1 --> AC2[Auto-Email Confirmation] - AC2 --> AC3[Notify Requestor] - AC2 --> AC4[Notify Dealer] - AC2 --> AC5[Notify Lead] - - AC3 --> AE[7.Activity Execution] - AC4 --> AE - AC5 --> AE - - AE --> AE1[Dealer Executes Activity] - AE1 --> AE2[Submit Required Documents] - - AE2 --> CA[8.Claim Approval] - - CA --> CA1{Requestor Reviews
Documents} - CA1 -->|More Info Needed| CA2[Request Additional Info] - CA2 --> AE2 - CA1 -->|Approved| CA3{Approval Type} - - CA3 -->|Full Approval| EI[9.E-Invoicing] - CA3 -->|Partial Approval| EI - - EI --> EI1[Generate E-Invoice] - EI1 --> EI2[Issue Credit Note] - EI2 --> End([Claim Settled]) - - style RI fill:#e3f2fd - style PS fill:#f3e5f5 - style RE fill:#fff3e0 - style DLA fill:#ffebee - style BUD fill:#e8f5e9 - style AC fill:#fce4ec - style AE fill:#e0f2f1 - style CA fill:#fff9c4 - style EI fill:#e1bee7 - style Start fill:#90EE90 - style End fill:#90EE90 \ No newline at end of file + + %% ===== Start ===== + Start([🟢 Start: Dealer Claim Process]) --> RI[1️⃣ Request Initiation
Requestor
Submits activity request
with dealer info, type, date, location, and details] + + %% ===== Proposal Submission ===== + RI --> PS[2️⃣ Proposal Submission
Dealer
Submits proposal with
cost breakup, timeline,
and supporting documents] + + %% ===== Request Evaluation ===== + PS --> RE[3️⃣ Request Evaluation
Requestor
Reviews dealer proposal
and adds comments] + + RE --> RE_Decision{Proposal Satisfactory?} + RE_Decision -->|❌ Needs Clarification| RE_Clarify[Requestor Requests Clarification] + RE_Clarify --> PS + RE_Decision -->|✅ Confirmed to Proceed| DLA + + %% ===== Department Lead Approval ===== + DLA[4️⃣ Department Lead Approval
Dept. Lead
Reviews and Approves Request] --> DLA_Decision{Lead Decision} + DLA_Decision -->|❌ Needs Clarification| DLA_Clarify[Lead Requests Clarification] + DLA_Clarify --> RE + DLA_Decision -->|✅ Approved| BUD + + %% ===== Budgeting ===== + BUD[5️⃣ Budgeting
Finance or System
Blocks budget under IO Internal Order] --> AC + + %% ===== Activity Creation ===== + AC[6️⃣ Activity Creation
System
Creates Activity and Sends Notifications
to Requestor, Dealer and Lead] --> AE + + %% ===== Activity Execution ===== + AE[7️⃣ Activity Execution
Dealer
Executes Activity
and Uploads Proof Documents] --> CA + + %% ===== Claim Approval ===== + CA[8️⃣ Claim Approval
Requestor
Reviews submitted documents] --> CA_Decision{Documents OK?} + CA_Decision -->|❌ Needs More Info| CA_Clarify[Requestor Requests Additional Information] + CA_Clarify --> AE + CA_Decision -->|✅ Approved| CA_Type{Approval Type} + CA_Type -->|Full Approval| EI + CA_Type -->|Partial Approval| EI + + %% ===== E-Invoicing ===== + EI[9️⃣ E-Invoicing
Finance or System
Generates E-Invoice
and Issues Credit Note] --> End([✅ Claim Settled
Process Completed]) + + %% ===== Styles ===== + style RI fill:#e3f2fd,stroke:#2196f3,stroke-width:2px,color:#000 + style PS fill:#f3e5f5,stroke:#9c27b0,stroke-width:2px,color:#000 + style RE fill:#fff3e0,stroke:#ff9800,stroke-width:2px,color:#000 + style DLA fill:#ffebee,stroke:#f44336,stroke-width:2px,color:#000 + style BUD fill:#e8f5e9,stroke:#4caf50,stroke-width:2px,color:#000 + style AC fill:#fce4ec,stroke:#e91e63,stroke-width:2px,color:#000 + style AE fill:#e0f2f1,stroke:#009688,stroke-width:2px,color:#000 + style CA fill:#fff9c4,stroke:#fbc02d,stroke-width:2px,color:#000 + style EI fill:#ede7f6,stroke:#673ab7,stroke-width:2px,color:#000 + style Start fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000 + style End fill:#c8e6c9,stroke:#388e3c,stroke-width:2px,color:#000 diff --git a/~$yal Enfield Documentation.docx b/~$yal Enfield Documentation.docx new file mode 100644 index 0000000..7b7556b Binary files /dev/null and b/~$yal Enfield Documentation.docx differ diff --git a/~WRL1115.tmp b/~WRL1115.tmp new file mode 100644 index 0000000..237be1a Binary files /dev/null and b/~WRL1115.tmp differ