This repository has been archived by the owner on Feb 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
coupon.html
92 lines (91 loc) · 3.2 KB
/
coupon.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
<!-- Create Coupon -->
<script type="text/javascript">
RED.nodes.registerType('create coupon',{
category: 'yaas',
color: '#1b91e2',
defaults: {
name: {value: "Create Coupon"},
yaasCredentials: {type:"yaas-credentials", required:true},
couponType: {value: "PERCENT", required: true},
tenantId: {value: ""},
currency: {value: "USD", required: true}
},
inputs: 1,
outputs: 1,
icon: "yaas.png",
paletteLabel: 'coupon create',
label: function() {
return this.name || ('create coupon');
}
});
</script>
<script type="text/x-red" data-template-name="create coupon">
<div class="form-row">
<label for="node-input-yaasCredentials"><i class="fa"></i>YaaS Credentials</label>
<input type="text" id="node-input-yaasCredentials">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i>Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-couponType"><i class="fa"></i>Type</label>
<select id="node-input-couponType" style="width: 73%">
<option value="PERCENT" selected>Percentage</option>
<option value="ABSOLUTE">Absolute</option>
</select>
</div>
<div class="form-row">
<label for="node-input-currency"><i class="fa fa-money"></i> Currency</label>
<input type="text" id="node-input-currency">
</div>
<div class="form-row">
<label for="node-input-tenantId"><i class="fa fa-comments-o"></i>Tenant ID</label>
<input type="text" id="node-input-tenantId" placeholder="Tenant ID (optional)">
</div>
</script>
<script type="text/x-red" data-help-name="create coupon">
<p>
Create Coupon
</p>
<p>
If the <i>Tenant ID</i> is empty, the tenant Id from the Application Id (YaaS Credentials) is used.
</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('get',{
category: 'yaas',
color: '#1b91e2',
defaults: {
name: {value: "Get Coupon"},
yaasCredentials: {type:"yaas-credentials", required:true},
tenantId: {value: ""},
},
inputs: 1,
outputs: 1,
icon: "yaas.png",
paletteLabel: 'coupon get',
label: function() {
return this.name || ('get coupon');
}
});
</script>
<script type="text/x-red" data-template-name="get">
<div class="form-row">
<label for="node-input-yaasCredentials"><i class="fa"></i>YaaS Credentials</label>
<input type="text" id="node-input-yaasCredentials">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i>Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-tenantId"><i class="fa fa-comments-o"></i>Tenant ID</label>
<input type="text" id="node-input-tenantId" placeholder="Tenant ID (optional)">
</div>
</script>
<script type="text/x-red" data-help-name="get">
<p>
Get Coupon
</p>
</script>