Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
37164 amit 1
package com.spice.profitmandi.dao.enumuration.dtr;
2
 
3
/**
4
 * Agenda types tracked as lifecycle instances (user.agenda_instance.agenda_type).
5
 * Mirrors {@link VisitAgenda} 1:1 (same names, same labels). Five have AUTO rules
6
 * (LOW_INVESTMENT, LOW_SALES, LOW_PURCHASE, CREDIT_DUES, REVIVAL — the last
7
 * mirrors fofo_store.activation_type); all are manual-pickable on Assign Visit.
8
 */
9
public enum AgendaType {
10
    LOW_INVESTMENT("Low investment"),
11
    LOW_SALES("Low sales"),
12
    LOW_PURCHASE("Low purchase"),
13
    BRAND_ADDITION("Brand addition"),
14
    CREDIT_DUES("Credit dues"),
15
    SYSTEM_TRAINING("System training"),
16
    REVIVAL("Revival"),
17
    NEW_STOCK_PAYMENT("New Stock Payment");
18
 
19
    private final String label;
20
 
21
    AgendaType(String label) {
22
        this.label = label;
23
    }
24
 
25
    public String getLabel() {
26
        return label;
27
    }
28
 
29
    public static AgendaType fromLabel(String label) {
30
        if (label == null) return null;
31
        for (AgendaType t : values()) {
32
            if (t.label.equalsIgnoreCase(label.trim())) return t;
33
        }
34
        return null;
35
    }
36
}