forked from parth-r-patel/outpost-polymer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
auto-form.html
148 lines (127 loc) · 5.66 KB
/
auto-form.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
<link rel="import" href="bower_components/paper-slider/paper-slider.html">
<link rel="import" href="bower_components/paper-button/paper-button.html">
<link rel="import" href="bower_components/paper-radio-button/paper-radio-button.html">
<link rel="import" href="bower_components/core-label/core-label.html">
<link rel="import" href="bower_components/paper-radio-group/paper-radio-group.html">
<link rel="import" href="bower_components/paper-toggle-button/paper-toggle-button.html">
<polymer-element name="auto-form">
<template>
<bs-container>
<bs-row>
<bs-col xs="12"><h4>Mobility</h4></bs-col>
</bs-row>
<bs-row>
<bs-col xs="1">
<l> Mobility</l>
</bs-col>
<bs-col xs="1">
<paper-toggle-button id="mobility" checked="{{auto}}" style="height: 50px; padding-top: 25px">Auto Mobility</paper-toggle-button>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs="4"><h4>Recycle Bin from Staging zone</h4></bs-col>
<bs-col xs="4"><h4>Totes from from Staging zone</h4></bs-col>
</bs-row>
<bs-row>
<bs-col xs="1" style="padding-top: 30px">
<l>Moved</l>
</bs-col>
<bs-col xs="3">
<paper-slider id="BinStagingMoved" pin snaps max="3" step="1" value="{{binsMoved}}"
style=" padding-top:25px"></paper-slider>
</bs-col>
<bs-col xs="1">
<l>Moved</l>
</bs-col>
<bs-col xs="3">
<paper-slider id="TotesStagingMoved" pin snaps max="3" step="1" value="{{totesMoved}}"
style=" padding-top:25px"></paper-slider>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs=1>
<l>Scored</l>
</bs-col>
<bs-col xs="3">
<paper-slider id="BinStagingScored" pin snaps max="{{binsMoved}}" step="1" value="0"
style=" padding-top:25px"></paper-slider>
</bs-col>
<bs-col xs=1>
<l>Scored</l>
</bs-col>
<bs-col xs="4">
<paper-slider id="TotesStagingScored" pin snaps max="{{totesMoved}}" step="1" value="0"
style=" padding-top:25px"></paper-slider>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs="4"></bs-col>
<bs-col xs="1"> <l>Stack Scored</l>
</bs-col>
<bs-col xs="2">
<paper-toggle-button id="stackScored" checked="{{StackScored}}" style="height: 50px; padding-top: 25px">Auto Mobility</paper-toggle-button>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs="4"><h4>Recycle Bins from Step</h4></bs-col>
<bs-col xs="4"><h4>Totes from Step</h4></bs-col>
</bs-row>
<bs-row>
<bs-col xs="4">
<l>Acquired</l>
</bs-col>
<bs-col xs="4">
<l>Acquired</l>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs="1">
<paper-toggle-button id="binsStep" checked="{{BinsStep}}" style="height: 50px; padding-top: 25px">Auto Mobility</paper-toggle-button>
</bs-col>
<bs-col xs="3"></bs-col>
<bs-col xs="1">
<paper-toggle-button id="totesStep" checked="{{TotesStep}}" style="height: 50px; padding-top: 25px">Auto Mobility</paper-toggle-button>
</bs-col>
</bs-row>
<bs-row>
<bs-col xs="4"><h4>Totes from Landfill</h4></bs-col>
</bs-row>
<bs-row>
<bs-col xs="1">
<l>Acquired</l>
</bs-col>
<bs-col xs="1">
<paper-toggle-button id="totesLandfill" checked="{{TotesLandfill}}" style="height: 50px; padding-top: 25px"></paper-toggle-button>
</bs-col>
</bs-row>
<bs-col xs="4">
<paper-button raised on-click="{{submitData}}">Submit that Data Doe</paper-button>
</bs-col>
</bs-container>
</template>
<script>
Polymer({
binsMoved: 0,
totesMoved: 0,
auto: false,
BinsStep: false,
TotesStep: false,
TotesLandfill: false,
StackScored: false,
submitData: function () {
var AutoForm = {};
AutoForm["AutoMobility"] = this.auto? 1 : 0;
AutoForm["AutoBinsMoved"] = this.$.BinStagingMoved.value;
AutoForm["AutoBinsScored"] = this.$.BinStagingScored.value;
AutoForm["AutoTotesMoved"] = this.$.TotesStagingMoved.value;
AutoForm["AutoTotesStacked"] = this.StackScored? 1: 0;
AutoForm["AutoTotesScored"] = this.$.TotesStagingScored.value;
AutoForm["LandfillTotesAcquired"] = this.TotesLandfill? 1: 0;
AutoForm["StepTotesAcquired"] = this.TotesStep? 1:0;
AutoForm["StepBinsAcquired"] = this.BinsStep? 1: 0;
window.sessionStorage.setItem("autoForm", JSON.stringify(AutoForm));
document.querySelector('outpost-header /deep/ paper-tabs').selected++;
}
});
</script>
</polymer-element>