OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 77 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 77 Rev 140
Line 1... Line 1...
1
package org.openconcerto.modules.customerrelationship.lead;
1
package org.openconcerto.modules.customerrelationship.lead;
2
 
2
 
-
 
3
import org.openconcerto.sql.users.UserManager;
-
 
4
import org.openconcerto.sql.users.rights.UserRights;
3
import org.openconcerto.ui.group.Group;
5
import org.openconcerto.ui.group.Group;
4
import org.openconcerto.ui.group.LayoutHints;
6
import org.openconcerto.ui.group.LayoutHints;
5
 
7
 
6
public class LeadGroup extends Group {
8
public class LeadGroup extends Group {
7
 
9
 
Line 14... Line 16...
14
        this.add(g);
16
        this.add(g);
15
 
17
 
16
        final Group gContact = new Group("customerrelationship.lead.person", LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
18
        final Group gContact = new Group("customerrelationship.lead.person", LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
17
        gContact.addItem("NAME");
19
        gContact.addItem("NAME");
18
        gContact.addItem("FIRSTNAME");
20
        gContact.addItem("FIRSTNAME");
-
 
21
        gContact.addItem("ID_TITRE_PERSONNEL");
19
        this.add(gContact);
22
        this.add(gContact);
20
 
23
 
21
        final Group gCustomer = new Group("customerrelationship.lead.contact", LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
24
        final Group gCustomer = new Group("customerrelationship.lead.contact", LayoutHints.DEFAULT_SEPARATED_GROUP_HINTS);
-
 
25
        gCustomer.addItem("ROLE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
22
        gCustomer.addItem("PHONE");
26
        gCustomer.addItem("PHONE");
23
        gCustomer.addItem("MOBILE");
27
        gCustomer.addItem("MOBILE");
24
        gCustomer.addItem("FAX");
28
        gCustomer.addItem("FAX");
25
        gCustomer.addItem("EMAIL", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
29
        gCustomer.addItem("EMAIL", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
26
        gCustomer.addItem("WEBSITE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
30
        gCustomer.addItem("WEBSITE", LayoutHints.DEFAULT_LARGE_FIELD_HINTS);
Line 33... Line 37...
33
        final Group gInfos = new Group("customerrelationship.lead.info");
37
        final Group gInfos = new Group("customerrelationship.lead.info");
34
        gInfos.addItem("INFORMATION", new LayoutHints(true, true, true, true, true, true));
38
        gInfos.addItem("INFORMATION", new LayoutHints(true, true, true, true, true, true));
35
        gInfos.addItem("INDUSTRY");
39
        gInfos.addItem("INDUSTRY");
36
        gInfos.addItem("REVENUE");
40
        gInfos.addItem("REVENUE");
37
        gInfos.addItem("EMPLOYEES");
41
        gInfos.addItem("EMPLOYEES");
-
 
42
        gInfos.addItem("INFOS", new LayoutHints(true, true, true, true, true, true));
38
        this.add(gInfos);
43
        this.add(gInfos);
39
 
44
 
40
        final Group gState = new Group("customerrelationship.lead.state");
45
        final Group gState = new Group("customerrelationship.lead.state");
41
        gState.addItem("RATING");
46
        gState.addItem("RATING");
42
        gState.addItem("SOURCE");
47
        gState.addItem("SOURCE");
43
        gState.addItem("STATUS");
48
        gState.addItem("STATUS");
44
        gState.addItem("ID_COMMERCIAL");
49
        gState.addItem("ID_COMMERCIAL");
-
 
50
        gState.addItem("REMIND_DATE");
-
 
51
        UserRights rights = UserManager.getInstance().getCurrentUser().getRights();
-
 
52
        if (rights.haveRight("CLIENT_PROSPECT")) {
-
 
53
            gState.addItem("ID_CLIENT");
-
 
54
        }
-
 
55
        gState.addItem("DISPO");
-
 
56
        
45
        this.add(gState);
57
        this.add(gState);
46
 
58
 
47
    }
59
    }
48
 
60
 
49
    public static void main(String[] args) {
61
    public static void main(String[] args) {