-
Notifications
You must be signed in to change notification settings - Fork 0
/
FormLayout.js
48 lines (47 loc) · 1.02 KB
/
FormLayout.js
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
module.exports = class Form {
chara = false;
costume = false;
price = false;
event = false;
schara = false;
scost = false;
disbled = false;
error = false;
success = false;
displayChara() {
this.chara = true;
}
displayCostume() {
this.costume = true;
}
displayPrice() {
this.price = true;
}
displayEvent() {
this.event = true;
}
selectChara() {
this.schara = true;
}
selectCostume() {
this.scost = true;
}
//fields are disabled as event is not required
disableFields() {
this.disbled = true;
}
// error = true means data to be displayed is required
// its better to keep both as a single method
// to avoid forgetting either
setError(res) {
this.error = true;
this.res = res;
}
setSuccess(res) {
this.success = true;
this.res = res;
}
setData(data) {
this.data = data;
}
}