-
Notifications
You must be signed in to change notification settings - Fork 1
/
client.html
230 lines (230 loc) · 15.4 KB
/
client.html
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html>
<title>St. Vincent de Paul (St. Charles Borromeo Conference) Client</title>
{{ template "scripts" }}
<body class="main">
{{ template "header" . }}
<p id="status" class="hidden">Empty status</p>
<div class="box">
<h4>Client</h4>
<label class="contained">First Name:<input type="text" id="fname" value="{{ .Clientrec.Clt.Firstname }}" name="FirstName" disabled="true"></label>
<label>Last Name:<input type="text" id="lname" value="{{ .Clientrec.Clt.Lastname }}" name="LastName" disabled="true"></label>
<label>DOB:<input type="date" id="dob" value="{{ .Clientrec.Clt.DOB }}" name="dob" disabled="true"></label>
<br>
<label class="contained">Address:<input type="text" id="address" value="{{ .Clientrec.Clt.Address }}" name="Address" disabled="true"></label>
<label>Cross-street:<input type="text" id="crossstreet" value="{{ .Clientrec.Clt.CrossStreet }}" name="CrossStreet" disabled="true"></label>
<label>Apt:<input type="text" id="apt" value="{{ .Clientrec.Clt.Apt }}" name="apt" disabled="true"></label>
<br>
<label class="contained">Phone:<input type="text" id="phnum" value="{{ .Clientrec.Clt.Phonenum }}" name="phnum" disabled="true"></label>
<label>Alt Phone:<input type="text" id="aphnum" value="{{ .Clientrec.Clt.Altphonenum }}" name="aphnum" disabled="true"></label>
<label>Alt Phone Description:<input type="text" id="aphdesc" value="{{ .Clientrec.Clt.Altphonedesc }}" name="aphdesc" disabled="true"></label>
<br>
<label class="contained">Referred By:<select id="referred" name="referred" disabled="true">
<option value="districtofc" {{ if eq "districtofc" .Clientrec.Clt.ReferredBy }} selected{{end}}>District Office</option>
<option value="parish" {{ if eq "parish" .Clientrec.Clt.ReferredBy }} selected{{end}}>Parish</option>
<option value="other" {{ if eq "other" .Clientrec.Clt.ReferredBy }} selected{{end}}>Other</option>
</select>
</label>
<br>
<label class="contained">Notes:<textarea rows="4" cols="40" id="notes" disabled="true">{{ .Clientrec.Clt.Notes }}</textarea></label>
</div>
<br>
<br>
<div class="box">
<h4>Household</h4>
<label class="contained">Ethnicity:<select id="ethnicity" name="ethnicity" disabled="true">
<option value="UNK" {{ if eq "UNK" .Clientrec.Clt.Ethnicity }} selected{{end}}>Unknown</option>
<option value="W" {{ if eq "W" .Clientrec.Clt.Ethnicity }} selected{{end}}>Caucasian</option>
<option value="B" {{ if eq "B" .Clientrec.Clt.Ethnicity }} selected{{end}}>Black</option>
<option value="A" {{ if eq "A" .Clientrec.Clt.Ethnicity }} selected{{end}}>Asian</option>
<option value="PI" {{ if eq "PI" .Clientrec.Clt.Ethnicity }} selected{{end}}>Pacific Islander</option>
<option value="H" {{ if eq "H" .Clientrec.Clt.Ethnicity }} selected{{end}}>Hispanic or Latino</option>
<option value="O" {{ if eq "O" .Clientrec.Clt.Ethnicity }} selected{{end}}>Mixed/Other</option>
</select></label>
<br>
<label class="contained">Adults - Male:<input type="text" size="2" id="adultmales" value="{{ .Clientrec.Clt.Adultmales }}" name="adultmales" disabled="true"></label>
<label>Adults - Female:<input type="text" size="2" id="adultfemales" value="{{ .Clientrec.Clt.Adultfemales }}" name="adultfemales" disabled="true"></label>
<label>Girls:<input type="text" size="2" id="girls" value="{{ .Clientrec.Clt.Fammbrs | girls }}" name="girls" disabled="true"></label>
<label>Boys:<input type="text" size="2" id="boys" value="{{ .Clientrec.Clt.Fammbrs | boys }}" name="boys" disabled="true"></label>
<label class="contained">Total:<input type="text" size="2" id="famsize" value="{{ .Clientrec.Clt | famSize }}" name="famsize" disabled="true"></label>
<br>
<br>
<table id="fammbrs" class="contained">
<thead>
<th colspan="4">Children</th>
</thead>
<thead>
<th>Name</th><th>DOB</th><th>Age</th><th>Gender</th>
</thead>
{{ range $i, $fammbr := .Clientrec.Clt.Fammbrs }}
<tr>
<td><input type="text" id="fammbrnm{{ $i }}" name="fammbrnm{{ $i }}" value="{{ .Name }}" disabled="true"></td>
<td><input type="text" id="fammbrdob{{ $i }}" name="fammbrdob{{ $i }}" value="{{ .DOB }}" disabled="true"></td>
<td><input type="text" id="fammbrage{{ $i }}" name="fammbrage{{ $i }}" value="{{ .DOB | ages }}" disabled="true"></td>
<td><label>Male<input type="radio" name="fammbrgender{{ $i }}" id="fammbrmale{{ $i }}" value="Male" {{if not .Female }}checked="checked"{{end}} disabled="true"></label><label>Female<input type="radio" id="fammbrfemale{{ $i }}" name="fammbrgender{{ $i }}" value="Female" {{ if .Female }}checked="checked"{{end}} disabled="true"></label></td>
</tr>
{{ end }}
</table>
</div>
<br>
<div class="box">
<h4>Visits</h4>
<table class="contained" id="Visits">
<thead>
<th></th>
<th>Date</th>
<th>Vincentians</th>
<th>Assistance Requested</th>
<th>Gift Cards Amt</th>
<th>Num Food Boxes/Bags</th>
<th>Rent Assistance</th>
<th>Utilities Assistance</th>
<th>Water Bill Assistance</th>
<th>Other Assistance - Type</th>
<th>Other Assistance - Amt</th>
<th>Vouchers - Clothing</th>
<th>Vouchers - Furniture</th>
<th>Vouchers - Other</th>
<th>Comment</th>
</thead>
{{ range $i, $visit := .Visitrecs }}
<tr>
<td>
<a href="/editvisit/{{ $.Clientrec.Id }}/{{ .Id }}/edit">(edit)</a>
</td>
<td><input type="date" id="visit{{ $i }}.visitdate" name="visit{{ $i }}.visitdate" value="{{ .Visit.Visitdate }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.vincentians" name="visit{{ $i }}.vincentians" value="{{ .Visit.Vincentians }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.assistancerequested" name="visit{{ $i }}.assistancerequested" value="{{ .Visit.Assistancerequested }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.giftcardamt" name="visit{{ $i }}.giftcardamt" value="{{ .Visit.Giftcardamt }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.numfoodboxes" name="visit{{ $i }}.numfoodboxes" value="{{ .Visit.Numfoodboxes }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.rentassistance" name="visit{{ $i }}.rentassistance" value="{{ .Visit.Rentassistance }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.utilitiesassistance" name="visit{{ $i }}.utilitiesassistance" value="{{ .Visit.Utilitiesassistance }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.waterbillassistance" name="visit{{ $i }}.waterbillassistance" value="{{ .Visit.Waterbillassistance }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.otherassistancetype" name="visit{{ $i }}.otherassistancetype" value="{{ .Visit.Otherassistancetype }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.otherassistanceamt" name="visit{{ $i }}.otherassistanceamt" value="{{ .Visit.Otherassistanceamt }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.vouchersclothing" name="visit{{ $i }}.vouchersclothing" value="{{ .Visit.Vouchersclothing }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.vouchersfurniture" name="visit{{ $i }}.vouchersfurniture" value="{{ .Visit.Vouchersfurniture }}" disabled="true"></td>
<td><input type="text" id="visit{{ $i }}.vouchersother" name="visit{{ $i }}.vouchersother" value="{{ .Visit.Vouchersother }}" disabled="true"></td>
<td><textarea id="visit{{ $i }}.comment" name="visit.comment" disabled="true">{{ .Visit.Comment }}</textarea></td>
</tr>
{{ end }}
</table>
</div>
<br>
<div class="box">
<table class="contained">
<thead>
<th colspan="2">Monthly Income</th>
<th colspan="2">Monthly Expenses</th>
</thead>
<tr>
<td><input disabled="true" type="number" class="number" id="incfather" name="incfather" value="{{ .Clientrec.Clt.Financials.FatherIncome }}"></td>
<td>Father's Income</td>
<td><input disabled="true" type="number" class="number" id="exprent" name="exprent" value="{{ .Clientrec.Clt.Financials.RentExpense }}"></td>
<td>Rent (Section 8? <input disabled="true" type="checkbox" id="section8" name="section8"{{ if .Clientrec.Clt.Financials.Section8Voucher }} checked="checked"{{ end }}>)</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incmother" name="incmother" value="{{ .Clientrec.Clt.Financials.MotherIncome }}"></td>
<td>Mother's Income</td>
<td><input disabled="true" type="number" class="number" id="exputilities" name="exputilities" value="{{ .Clientrec.Clt.Financials.UtilitiesExpense }}"></td>
<td>Electricity/Gas</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incafdc" name="incafdc" value="{{ .Clientrec.Clt.Financials.AFDCIncome }}"></td>
<td>AFDC</td>
<td><input disabled="true" type="number" class="number" id="expwater" name="expwater" value="{{ .Clientrec.Clt.Financials.WaterExpense }}"></td>
<td>Water</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incga" name="incga" value="{{ .Clientrec.Clt.Financials.GAIncome }}"></td>
<td>GA</td>
<td><input disabled="true" type="number" class="number" id="expphone" name="expphone" value="{{ .Clientrec.Clt.Financials.PhoneExpense }}"></td>
<td>Phone</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incssi" name="incssi" value="{{ .Clientrec.Clt.Financials.SSIIncome }}"></td>
<td>SSI</td>
<td><input disabled="true" type="number" class="number" id="expfood" name="expfood" value="{{ .Clientrec.Clt.Financials.FoodExpense }}"></td>
<td>Food</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incui" name="incui" value="{{ .Clientrec.Clt.Financials.UnemploymentInsIncome }}"></td>
<td>Unemployment Insurance</td>
<td><input disabled="true" type="number" class="number" id="expgas" name="expgas" value="{{ .Clientrec.Clt.Financials.GasExpense }}"></td>
<td>Car Gas/Insurance</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incsocsec" name="incsocsec" value="{{ .Clientrec.Clt.Financials.SocialSecurityIncome }}"></td>
<td>Social Security</td>
<td><input disabled="true" type="number" class="number" id="expcarpmt" name="expcarpmt" value="{{ .Clientrec.Clt.Financials.CarPaymentExpense }}"></td>
<td>Car Payment</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incalimony" name="incalimony" value="{{ .Clientrec.Clt.Financials.AlimonyIncome }}"></td>
<td>Alimony</td>
<td><input disabled="true" type="number" class="number" id="exptvi" name="exptvi" value="{{ .Clientrec.Clt.Financials.TVInternetExpense }}"></td>
<td>Cable TV/Internet</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incsupport" name="incsupport" value="{{ .Clientrec.Clt.Financials.ChildSupportIncome }}"></td>
<td>Child Support</td>
<td><input disabled="true" type="number" class="number" id="expgarbage" name="expgarbage" value="{{ .Clientrec.Clt.Financials.GarbageExpense }}"></td>
<td>Garbage</td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incother1" name="incother1" value="{{ .Clientrec.Clt.Financials.Other1Income }}"></td>
<td><input disabled="true" type="text" id="otherinctype1" name="otherinctype1" value="{{ .Clientrec.Clt.Financials.Other1IncomeType }}"></td>
<td><input disabled="true" type="number" class="number" id="expother1" name="expother1" value="{{ .Clientrec.Clt.Financials.Other1Expense }}"></td>
<td><input disabled="true" type="text" id="otherexptype1" name="otherexptype1" value="{{ .Clientrec.Clt.Financials.Other1ExpenseType }}"></td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incother2" name="incother2" value="{{ .Clientrec.Clt.Financials.Other2Income }}"></td>
<td><input disabled="true" type="text" id="otherinctype2" name="otherinctype2" value="{{ .Clientrec.Clt.Financials.Other2IncomeType }}"></td>
<td><input disabled="true" type="number" class="number" id="expother2" name="expother2" value="{{ .Clientrec.Clt.Financials.Other2Expense }}"></td>
<td><input disabled="true" type="text" id="otherexptype2" name="otherexptype2" value="{{ .Clientrec.Clt.Financials.Other2ExpenseType }}"></td>
</tr>
<tr>
<td><input disabled="true" type="number" class="number" id="incother3" name="incother3" value="{{ .Clientrec.Clt.Financials.Other3Income }}"></td>
<td><input disabled="true" type="text" id="otherinctype3" name="otherinctype3" value="{{ .Clientrec.Clt.Financials.Other3IncomeType }}"></td>
<td><input disabled="true" type="number" class="number" id="expother3" name="expother3" value="{{ .Clientrec.Clt.Financials.Other3Expense }}"></td>
<td><input disabled="true" type="text" id="otherexptype3" name="otherexptype3" value="{{ .Clientrec.Clt.Financials.Other3ExpenseType }}"></td>
</tr>
<tr>
<td><input type="number" class="number" id="totalinc" name="inctotal" disabled="true" value="{{ .Clientrec.Clt.Financials.TotalIncome }}"></td>
<td>Total Income</td>
<td><input type="number" class="number" id="totalexp" name="exptotal" disabled="true" value="{{ .Clientrec.Clt.Financials.TotalExpense }}"></td>
<td>Total Expenses</td>
</tr>
</table>
</div>
<br>
<br>
<div class="box">
<h4>Updates</h4>
<table id="updates" class="contained">
<thead>
<th>User</th><th>When</th>
</thead>
{{ range $i, $update := .Updates }}
<tr>
<td>{{ .User }}</td>
<td>{{ .When }}</td>
</tr>
{{ end }}
</table>
</div>
<a href="/editclient/{{ .Clientrec.Id }}">(edit)</a>
<a href="/recordvisit/{{ .Clientrec.Id }}">(record visit)</a>
<script>
$( document ).ready(function() {
console.log( 'ready!' );
$( 'textarea[name="visit.comment"]' ).each(function() {
len = this.value.length;
console.log("len of " + this.value + " is " + len);
this.rows = len > 0 ? Math.ceil(len / this.cols) : 1;
console.log("rows=" + this.rows + ", cols=" + this.cols);
});
});
</script>
</body>
</html>