-
Notifications
You must be signed in to change notification settings - Fork 0
/
forms.py
147 lines (133 loc) · 3.8 KB
/
forms.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
from flask_wtf import FlaskForm
from wtforms import (
BooleanField,
DateField,
IntegerField,
PasswordField,
SelectField,
StringField,
TextAreaField,
)
from wtforms.validators import DataRequired, NumberRange, Optional
class PaymentEditForm(FlaskForm):
customer = StringField("Customer name:", validators=[DataRequired()])
date = DateField(
"Date:",
validators=[
Optional(),
],
)
amount = StringField(
"Amount:",
validators=[
DataRequired(),
],
)
mode_list = ["", "NEFT", "Cheque", "Cash", "Others"]
mode = SelectField("Mode of payment:", choices=mode_list)
modeentry_list = ["", "CD", "Regular", "Scroll", "BG", "Others"]
rel_manager_list = ["", "Kannan", "Ravikumar", "Varinder", "Anand Kumar"]
nature_list = [
"",
"Fresh",
"Renewal",
"Endorsement",
"Installment",
"Extension",
"Incoming coinsurance",
"Others",
]
underwriter_list = [
"",
"Anand Kumar",
"Kesavi",
"Pradeep",
"Swatee Barik",
"Vijaya",
"Naval Jacob",
"Others",
]
status_list = [
"To be receipted",
"To be underwritten",
"Work in progress",
"Awaiting further details from brokers/insured",
"Approval pending",
"GC Core issue - Ticket raised",
"Completed",
"To be refunded",
"Waiting for payment",
"Others1",
"Others2",
]
modeentry = SelectField("Mode of entry:", choices=modeentry_list)
customerid = StringField(
"Customer ID:",
validators=[
Optional(),
],
)
rel_manager = SelectField("Relationship manager:", choices=rel_manager_list)
broker = StringField(
"Broker:",
validators=[
Optional(),
],
)
nature = SelectField(
"Nature of proposal:",
choices=nature_list,
validators=[
Optional(),
],
)
underwriter = SelectField(
"Underwriter:",
choices=underwriter_list,
validators=[
Optional(),
],
)
status = SelectField(
"Status:",
choices=status_list,
validators=[
Optional(),
],
)
ticket = StringField(
"Ticket:",
validators=[
Optional(),
],
)
remarks = TextAreaField(
"Remarks:",
validators=[
Optional(),
],
)
voucher = StringField("Voucher number:")
created = StringField("Created on:")
history = StringField("Status updates:")
proposal = StringField("Proposal number: ")
policyno = StringField("Policy number: ")
instrumentno = StringField("Instrument number: ")
class SignupForm(FlaskForm):
username = StringField("Username", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
emp_number = IntegerField(
"Employee number",
validators=[NumberRange(min=10000, max=99999), DataRequired()],
)
class LoginForm(FlaskForm):
username = StringField("Username", validators=[DataRequired()])
password = PasswordField("Password", validators=[DataRequired()])
class UpdateUserForm(FlaskForm):
is_admin = BooleanField("Make the user admin: ")
reset_password_page = BooleanField("Enable password reset page: ")
class ResetPasswordForm(FlaskForm):
username = StringField("Enter username:", validators=[DataRequired()])
emp_number = IntegerField("Enter employee number: ", validators=[DataRequired()])
# reset_code = IntegerField("Enter reset code received from admin: ", validators=[DataRequired()])
password = PasswordField("Enter new password: ", validators=[DataRequired()])