merged SM code 9 Sept
This commit is contained in:
commit
2e2bf33ad5
@ -690,6 +690,7 @@ text-align: center;
|
||||
transition: color 0.3s;
|
||||
text-transform: capitalize;
|
||||
font-family: var(--font-family);
|
||||
height: 100%;
|
||||
}
|
||||
@media (hover: hover){
|
||||
:host(.active) .tab{
|
||||
@ -1933,7 +1934,8 @@ background: rgba(var(--text-color), 1);
|
||||
box-shadow: 0 0.2rem 0.2rem #00000020,
|
||||
0 0.5rem 1rem #00000040;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
transform: scale(0)
|
||||
transform: scale(0);
|
||||
z-index: 1;
|
||||
}
|
||||
.hide{
|
||||
pointer-events: none;
|
||||
@ -1950,9 +1952,10 @@ right: 1rem;
|
||||
}
|
||||
.left,.right{
|
||||
position: absolute;
|
||||
width: 2rem;
|
||||
width: 3rem;
|
||||
height: 100%;
|
||||
transition: opacity 0.3s;
|
||||
z-index: 1;
|
||||
}
|
||||
.left{
|
||||
background: linear-gradient(to left, transparent, rgba(var(--foreground-color), 0.6))
|
||||
@ -2727,6 +2730,7 @@ height: 0.15rem;
|
||||
border-radius: 1rem 1rem 0 0;
|
||||
background: var(--accent-color);
|
||||
transition: transform 0.3s, width 0.3s;
|
||||
pointer-events: none;
|
||||
}
|
||||
:host([variant="tab"]) .indicator{
|
||||
height: 100%;
|
||||
|
||||
92
css/main.css
92
css/main.css
@ -375,16 +375,16 @@ textarea {
|
||||
color: var(--accent-color);
|
||||
}
|
||||
|
||||
.container:empty ~ .empty {
|
||||
*:empty + .empty-state {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.empty {
|
||||
.empty-state {
|
||||
display: none;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.empty svg {
|
||||
.empty-state svg {
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
height: 12em;
|
||||
width: 12em;
|
||||
@ -526,7 +526,7 @@ form {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#sign_in_popup h1 {
|
||||
#sign_in_popup h3 {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
#sign_in_popup h4 {
|
||||
@ -598,15 +598,13 @@ form {
|
||||
margin: 0.3em;
|
||||
border-radius: 0.4em;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8em;
|
||||
text-transform: capitalize;
|
||||
width: 100%;
|
||||
letter-spacing: 0.08em;
|
||||
font-weight: 600;
|
||||
}
|
||||
#navbar .navbar-item h5 {
|
||||
font-size: 0.6em;
|
||||
margin-top: 0.4em;
|
||||
font-weight: 700;
|
||||
}
|
||||
#navbar .active {
|
||||
color: var(--accent-color);
|
||||
@ -631,51 +629,36 @@ form {
|
||||
#home_page p {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
#home_page .user-panel {
|
||||
margin: 0 1.5rem;
|
||||
}
|
||||
|
||||
#user_panel {
|
||||
.user-panel {
|
||||
position: relative;
|
||||
padding: 1.5rem;
|
||||
margin: 0 1.5rem;
|
||||
border-radius: 0.6rem;
|
||||
background: linear-gradient(160deg, #ffffff10 50%, #00000040 80%), linear-gradient(-120deg, #ffffff10 50%, #00000040 10%), rgba(var(--text-color), 0.8);
|
||||
box-shadow: 0 0.1rem 0.6rem #00000020;
|
||||
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44);
|
||||
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
|
||||
color: rgba(var(--foreground-color), 1);
|
||||
align-self: flex-start;
|
||||
}
|
||||
#user_panel .icon {
|
||||
.user-panel .icon {
|
||||
stroke: rgba(var(--foreground-color), 1);
|
||||
}
|
||||
#user_panel::before, #user_panel::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
height: 2rem;
|
||||
bottom: 0.8rem;
|
||||
box-shadow: 0 1rem 0.2rem #00000030;
|
||||
z-index: -1;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
#user_panel::before {
|
||||
left: 0;
|
||||
right: 50%;
|
||||
transform: rotate(-3deg);
|
||||
}
|
||||
#user_panel::after {
|
||||
left: 50%;
|
||||
right: 0;
|
||||
transform: rotate(3deg);
|
||||
}
|
||||
#user_panel .copy-row {
|
||||
.user-panel .copy-row {
|
||||
margin-bottom: 1.5rem;
|
||||
text-shadow: 0.1rem 0.1rem 0.1rem #000000;
|
||||
}
|
||||
#user_panel .grid {
|
||||
.user-panel .grid {
|
||||
margin-top: 0.5rem;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
#user_panel .grid h5 {
|
||||
.user-panel .grid h5 {
|
||||
font-weight: 500;
|
||||
color: rgba(var(--foreground-color), 0.8);
|
||||
}
|
||||
|
||||
#user_type {
|
||||
.user-type {
|
||||
font-weight: 500;
|
||||
color: rgba(var(--foreground-color), 0.9);
|
||||
}
|
||||
@ -755,7 +738,17 @@ sm-tab-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: rgba(var(--foreground-color), 1);
|
||||
z-index: 1;
|
||||
z-index: 2;
|
||||
margin-bottom: 1rem;
|
||||
border-bottom: solid 1px rgba(var(--text-color), 0.2);
|
||||
}
|
||||
|
||||
sm-tab::part(tab) {
|
||||
padding: 0.8rem 0;
|
||||
}
|
||||
|
||||
sm-panel {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.request {
|
||||
@ -968,7 +961,7 @@ sm-tab-header {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
#main_loader button {
|
||||
#main_loader sm-button {
|
||||
margin-left: 0;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
@ -993,14 +986,23 @@ sm-tab-header {
|
||||
word-spacing: 0.16em;
|
||||
}
|
||||
|
||||
#upi_txId_section .copy-row {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
#send_amount_to_deposit {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 640px) {
|
||||
#home_page {
|
||||
#home_page, #deposit {
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
grid-template-areas: "." "left";
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
align-items: flex-start;
|
||||
}
|
||||
#home_page .left {
|
||||
#home_page .left, #deposit .left {
|
||||
grid-area: left;
|
||||
}
|
||||
|
||||
@ -1047,9 +1049,6 @@ sm-tab-header {
|
||||
height: 1.4rem;
|
||||
width: 1.4rem;
|
||||
}
|
||||
#navbar .navbar-item h5 {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
#navbar .navbar-item:hover .icon {
|
||||
stroke: rgba(var(--text-color), 1);
|
||||
}
|
||||
@ -1075,14 +1074,11 @@ sm-tab-header {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
#home_page {
|
||||
#home_page, #deposit {
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
grid-template-columns: minmax(0, 1fr) 24rem;
|
||||
}
|
||||
#activity_page sm-tab-header {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 800px) {
|
||||
.complaint {
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -401,15 +401,14 @@ textarea {
|
||||
}
|
||||
}
|
||||
|
||||
.container:empty~.empty {
|
||||
*:empty + .empty-state {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.empty {
|
||||
.empty-state {
|
||||
display: none;
|
||||
place-items: center;
|
||||
width: 100%;
|
||||
|
||||
svg {
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
height: 12em;
|
||||
@ -564,7 +563,7 @@ form {
|
||||
}
|
||||
|
||||
#sign_in_popup {
|
||||
h1 {
|
||||
h3 {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
@ -643,15 +642,12 @@ form {
|
||||
margin: 0.3em;
|
||||
border-radius: 0.4em;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
font-size: 0.9em;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.8em;
|
||||
text-transform: capitalize;
|
||||
width: 100%;
|
||||
letter-spacing: 0.08em;
|
||||
|
||||
font-weight: 600;
|
||||
h5 {
|
||||
font-size: 0.6em;
|
||||
margin-top: 0.4em;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
@ -684,46 +680,27 @@ form {
|
||||
p {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
.user-panel{
|
||||
margin: 0 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
#user_panel {
|
||||
.user-panel {
|
||||
position: relative;
|
||||
padding: 1.5rem;
|
||||
margin: 0 1.5rem;
|
||||
border-radius: 0.6rem;
|
||||
background: linear-gradient(160deg, #ffffff10 50%, #00000040 80%), linear-gradient(-120deg, #ffffff10 50%, #00000040 10%), rgba(var(--text-color), 0.8);
|
||||
box-shadow: 0 0.1rem 0.6rem #00000020;
|
||||
//background: linear-gradient(160deg, #ffffff10 50%, #00000040 80%), linear-gradient(-120deg, #ffffff10 50%, #00000040 10%), midnightblue;
|
||||
background: radial-gradient(circle at top left, #EF6C00 20%, #C51162 30%, #4A148C 40%, #251f44);
|
||||
box-shadow: 0 0.1rem 0.1rem #00000020, 0 2rem 1rem -1rem #00000040;
|
||||
color: rgba(var(--foreground-color), 1);
|
||||
|
||||
align-self: flex-start;
|
||||
.icon {
|
||||
stroke: rgba(var(--foreground-color), 1);
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 2rem;
|
||||
bottom: 0.8rem;
|
||||
box-shadow: 0 1rem 0.2rem #00000030;
|
||||
z-index: -1;
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
|
||||
&::before {
|
||||
left: 0;
|
||||
right: 50%;
|
||||
transform: rotate(-3deg);
|
||||
}
|
||||
|
||||
&::after {
|
||||
left: 50%;
|
||||
right: 0;
|
||||
transform: rotate(3deg);
|
||||
}
|
||||
|
||||
.copy-row {
|
||||
margin-bottom: 1.5rem;
|
||||
text-shadow: 0.1rem 0.1rem 0.1rem #000000;
|
||||
}
|
||||
|
||||
.grid {
|
||||
@ -737,7 +714,7 @@ form {
|
||||
}
|
||||
}
|
||||
|
||||
#user_type {
|
||||
.user-type {
|
||||
font-weight: 500;
|
||||
color: rgba(var(--foreground-color), 0.9);
|
||||
}
|
||||
@ -838,7 +815,15 @@ sm-tab-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: rgba(var(--foreground-color), 1);
|
||||
z-index: 1;
|
||||
z-index: 2;
|
||||
margin-bottom: 1rem;
|
||||
border-bottom: solid 1px rgba(var(--text-color), 0.2);
|
||||
}
|
||||
sm-tab::part(tab){
|
||||
padding: 0.8rem 0;
|
||||
}
|
||||
sm-panel{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.request {
|
||||
@ -1088,7 +1073,7 @@ sm-tab-header {
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
button {
|
||||
sm-button {
|
||||
margin-left: 0;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
@ -1115,14 +1100,22 @@ sm-tab-header {
|
||||
word-spacing: 0.16em;
|
||||
}
|
||||
}
|
||||
#upi_txId_section{
|
||||
.copy-row{
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
}
|
||||
#send_amount_to_deposit{
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 640px) {
|
||||
#home_page {
|
||||
#home_page, #deposit{
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
grid-template-areas: '.''left';
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
|
||||
align-items: flex-start;
|
||||
.left {
|
||||
grid-area: left;
|
||||
}
|
||||
@ -1174,11 +1167,6 @@ sm-tab-header {
|
||||
height: 1.4rem;
|
||||
width: 1.4rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.icon {
|
||||
stroke: rgba(var(--text-color), 1);
|
||||
@ -1215,18 +1203,10 @@ sm-tab-header {
|
||||
}
|
||||
}
|
||||
|
||||
#home_page {
|
||||
#home_page, #deposit {
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
grid-template-columns: minmax(0, 1fr) 24rem;
|
||||
|
||||
.left {}
|
||||
}
|
||||
|
||||
#activity_page {
|
||||
sm-tab-header {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
414
index.html
414
index.html
@ -44,14 +44,14 @@
|
||||
<path d="M72.5,36.5c0,19.88-16.12,36-36,36s-36-16.12-36-36s16.12-36,36-36S72.5,16.62,72.5,36.5" />
|
||||
</svg>
|
||||
<h4 id="tip_container">Loading Blockchain UPI </h4>
|
||||
<button onclick="signOut()">Reset</button>
|
||||
<sm-button onclick="signOut()">Reset</sm-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Sign in popup-->
|
||||
<div class="popup-container solid-background hide">
|
||||
<div id="sign_in_popup" class="popup">
|
||||
<div class="container-header">
|
||||
<h1>Sign In</h1>
|
||||
<h3>Sign In</h3>
|
||||
</div>
|
||||
<h4 class="expand light-text">Welcome to RanchiMall Blockchain UPI.<br>Please enter your FLO private key to
|
||||
continue.</h4>
|
||||
@ -140,8 +140,8 @@
|
||||
</svg>
|
||||
</div>
|
||||
<label class="input">
|
||||
<input id="deposited_rupee_txId" required disabled>
|
||||
<div class="placeholder">UPI TxID</div>
|
||||
<input id="deposited_rupee_upi" pattern="^[a-zA-z0-9]+@[a-zA-z0-9]+" type="text" disabled required>
|
||||
<div class="placeholder">Sender's UPI address</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
@ -248,8 +248,8 @@
|
||||
<div class="placeholder">Amount</div>
|
||||
</label>
|
||||
<label class="input">
|
||||
<input id="paid_cashier_upi_txid" type="text" required>
|
||||
<div class="placeholder">UPI Txid/Ref Number</div>
|
||||
<input id="paid_cashier_upi" pattern="^[a-zA-z0-9]+@[a-zA-z0-9]+" type="text" required>
|
||||
<div class="placeholder">Sender's UPI address</div>
|
||||
</label>
|
||||
</form>
|
||||
</div>
|
||||
@ -303,44 +303,11 @@
|
||||
</div>
|
||||
<div title="See all cash deposit requests" id="deposit_page_btn"
|
||||
class="navbar-item cashier-option hide-completely" onclick="showPage(this, 'deposit')">
|
||||
<svg class="icon banking" viewBox="0 0 52 51.5">
|
||||
<line x1="4" y1="28" x2="4" y2="19.5" />
|
||||
<polyline points="4 6 4 1 51 1 51 48 4 48 4 41.5" />
|
||||
<line x1="9" y1="50" x2="18" y2="50" />
|
||||
<line x1="36" y1="50" x2="45" y2="50" />
|
||||
<circle cx="27.5" cy="30" r="9.5" />
|
||||
<circle cx="27.5" cy="30" r="3.5" />
|
||||
<rect x="1" y="6" width="6" height="13.5" rx="2.76" />
|
||||
<rect x="1" y="28" width="6" height="13.5" rx="2.76" />
|
||||
</svg>
|
||||
<h5>Deposit</h5>
|
||||
</div>
|
||||
<div title="See all cash withdraw requests" id="deposit_page_btn"
|
||||
class="navbar-item cashier-option hide-completely" onclick="showPage(this, 'withdraw')">
|
||||
<svg class="icon banking" viewBox="0 0 52 60">
|
||||
<line x1="4" y1="33.5" x2="4" y2="25" />
|
||||
<polyline points="41.52 6.5 51 6.5 51 53.5 41.69 53.5" />
|
||||
<line x1="9" y1="55.5" x2="14" y2="55.5" />
|
||||
<line x1="43" y1="55.5" x2="45" y2="55.5" />
|
||||
<rect x="1" y="11.5" width="6" height="13.5" rx="2.76" />
|
||||
<rect x="1" y="33.5" width="6" height="13.5" rx="2.76" />
|
||||
<polyline points="3.81 11.5 3.81 6.5 41.5 1 41.69 59 3.81 53.5 3.81 47" />
|
||||
<path
|
||||
d="M35.64,39.19c0,6.31-3.25,11.45-7.22,11.48s-7-4.92-7-11.07,3.13-11.29,7.05-11.48S35.64,32.88,35.64,39.19Z"
|
||||
transform="translate(-6 -2)" />
|
||||
<path
|
||||
d="M31.06,39.32c0,2.31-1.19,4.2-2.64,4.23s-2.62-1.79-2.62-4.08S27,35.3,28.42,35.24,31.06,37,31.06,39.32Z"
|
||||
transform="translate(-6 -2)" />
|
||||
</svg>
|
||||
<h5>Withdraw</h5>
|
||||
</div>
|
||||
<div title="See all pay requests" class="navbar-item cashier-option hide-completely"
|
||||
onclick="showPage(this, 'pay_cashier')">
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<path d="M32,37.75A10.19,10.19,0,1,0,21.81,27.44V46.62" />
|
||||
<rect height="64" width="64" rx="8"></rect>
|
||||
<path
|
||||
d="M24.77,44.15H40.06V63.5H53.4V36h5.66a3.38,3.38,0,0,0,2.53-5.68l-6.73-7.16V11.26H46.48v3L34.53,1.59a3.49,3.49,0,0,0-5.06,0L2.41,30.35A3.38,3.38,0,0,0,4.94,36H10.6V63.5H24.77" />
|
||||
</svg>
|
||||
<h5>pay</h5>
|
||||
<h5>Home</h5>
|
||||
</div>
|
||||
<div title="requests page" class="navbar-item user-option" onclick="showPage(this, 'request_page')">
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
@ -377,24 +344,16 @@
|
||||
<h5>Complaints</h5>
|
||||
</div>
|
||||
<div title="profile page" class="navbar-item" onclick="showPage(this, 'settings_page')">
|
||||
<svg class="icon" id="profile_pic" viewBox="0 0 49.54 61.12">
|
||||
<path
|
||||
d="M49.34,19.94c7.73,0,13.26,5.26,13.26,14S58.18,50.14,49.71,50.08,36.82,42.66,36.82,33.93s5.53-14,13.26-14"
|
||||
transform="translate(-25.23 -20)" />
|
||||
<path
|
||||
d="M43.83,52c-2.34,4.38-9.77,6.64-15.31,9.06-2.29,1-4.11,13-1.53,13a46.06,46.06,0,0,0,23.51,6,40.48,40.48,0,0,0,22.51-6c2.58,0,.76-12-1.53-13-5.54-2.42-13-4.68-15.31-9.06"
|
||||
transform="translate(-25.23 -19.44)" />
|
||||
<svg class="icon" viewBox="0 0 64 64">
|
||||
<title>settings</title>
|
||||
<path d="M41,62.92a1.7,1.7,0,0,1-1.45-.83L37,57.7a2.63,2.63,0,0,0-2.27-1.34h-.26a23.91,23.91,0,0,1-5,0h-.26A2.63,2.63,0,0,0,27,57.7l-2.54,4.39a1.67,1.67,0,0,1-1.44.83,1.72,1.72,0,0,1-.83-.22L10.33,55.86a1.67,1.67,0,0,1-.61-2.27l2.54-4.41a2.61,2.61,0,0,0-.12-2.85A23.77,23.77,0,0,1,9.65,42,2.65,2.65,0,0,0,7.24,40.5H2.17A1.67,1.67,0,0,1,.5,38.83V25.17A1.67,1.67,0,0,1,2.17,23.5H7.24A2.64,2.64,0,0,0,9.65,22a25,25,0,0,1,2.49-4.31,2.63,2.63,0,0,0,.12-2.85l-2.54-4.4a1.67,1.67,0,0,1,.61-2.27L22.17,1.3A1.72,1.72,0,0,1,23,1.08a1.67,1.67,0,0,1,1.44.83L27,6.3a2.63,2.63,0,0,0,2.27,1.34h.26a23.91,23.91,0,0,1,5,0h.26A2.63,2.63,0,0,0,37,6.3l2.53-4.39A1.7,1.7,0,0,1,41,1.08a1.72,1.72,0,0,1,.83.22L53.67,8.14a1.67,1.67,0,0,1,.61,2.27l-2.54,4.41a2.61,2.61,0,0,0,.12,2.85A24.46,24.46,0,0,1,54.35,22a2.65,2.65,0,0,0,2.41,1.52h5.07a1.67,1.67,0,0,1,1.67,1.67V38.83a1.67,1.67,0,0,1-1.67,1.67H56.76A2.63,2.63,0,0,0,54.35,42a24.63,24.63,0,0,1-2.49,4.31,2.63,2.63,0,0,0-.12,2.85l2.54,4.4a1.68,1.68,0,0,1-.61,2.27L41.83,62.7A1.72,1.72,0,0,1,41,62.92Z"/>
|
||||
<path d="M23,1.58h0a1.16,1.16,0,0,1,1,.58l2.54,4.39a3.14,3.14,0,0,0,2.7,1.59l.31,0C30.37,8,31.19,8,32,8s1.63,0,2.44.12l.31,0a3.14,3.14,0,0,0,2.7-1.59L40,2.16a1.16,1.16,0,0,1,1-.58,1.1,1.1,0,0,1,.58.16L53.42,8.57a1.16,1.16,0,0,1,.42,1.59L51.3,14.57a3.15,3.15,0,0,0,.15,3.4,23.69,23.69,0,0,1,2.45,4.21A3.12,3.12,0,0,0,56.76,24h5.07A1.17,1.17,0,0,1,63,25.17V38.83A1.17,1.17,0,0,1,61.83,40H56.76a3.11,3.11,0,0,0-2.86,1.82,24.33,24.33,0,0,1-2.44,4.23,3.11,3.11,0,0,0-.15,3.39l2.53,4.4a1.13,1.13,0,0,1,.12.88,1.17,1.17,0,0,1-.54.71L41.58,62.26a1.08,1.08,0,0,1-.58.16,1.16,1.16,0,0,1-1-.58l-2.54-4.39a3.14,3.14,0,0,0-2.7-1.59l-.31,0C33.63,56,32.81,56,32,56s-1.63,0-2.44-.12l-.31,0a3.14,3.14,0,0,0-2.7,1.59L24,61.84a1.16,1.16,0,0,1-1,.58,1.1,1.1,0,0,1-.58-.16L10.58,55.43a1.16,1.16,0,0,1-.42-1.59l2.54-4.41a3.15,3.15,0,0,0-.15-3.4,23.69,23.69,0,0,1-2.45-4.21A3.12,3.12,0,0,0,7.24,40H2.17A1.17,1.17,0,0,1,1,38.83V25.17A1.17,1.17,0,0,1,2.17,24H7.24a3.11,3.11,0,0,0,2.86-1.82A24.33,24.33,0,0,1,12.54,18a3.11,3.11,0,0,0,.15-3.39l-2.53-4.4a1.16,1.16,0,0,1,.42-1.59L22.42,1.74A1.08,1.08,0,0,1,23,1.58m0-1a2.11,2.11,0,0,0-1.08.29L10.08,7.7a2.17,2.17,0,0,0-.79,3l2.54,4.4a2.15,2.15,0,0,1-.1,2.31,24.92,24.92,0,0,0-2.54,4.4A2.13,2.13,0,0,1,7.24,23H2.17A2.17,2.17,0,0,0,0,25.17V38.83A2.17,2.17,0,0,0,2.17,41H7.24a2.13,2.13,0,0,1,1.95,1.23,25.25,25.25,0,0,0,2.55,4.39,2.13,2.13,0,0,1,.09,2.31L9.29,53.34a2.17,2.17,0,0,0,.79,3l11.84,6.83a2.11,2.11,0,0,0,1.08.29,2.17,2.17,0,0,0,1.88-1.08L27.41,58a2.14,2.14,0,0,1,1.84-1.09h.21a24.88,24.88,0,0,0,5.08,0h.21A2.14,2.14,0,0,1,36.59,58l2.53,4.39A2.17,2.17,0,0,0,41,63.42a2.11,2.11,0,0,0,1.08-.29L53.92,56.3a2.17,2.17,0,0,0,.79-3l-2.54-4.4a2.15,2.15,0,0,1,.1-2.31,24.92,24.92,0,0,0,2.54-4.4A2.13,2.13,0,0,1,56.76,41h5.07A2.17,2.17,0,0,0,64,38.83V25.17A2.17,2.17,0,0,0,61.83,23H56.76a2.13,2.13,0,0,1-1.95-1.23,25.25,25.25,0,0,0-2.55-4.39,2.13,2.13,0,0,1-.09-2.31l2.54-4.41a2.17,2.17,0,0,0-.79-3L42.08.87A2.11,2.11,0,0,0,41,.58a2.17,2.17,0,0,0-1.88,1.08L36.59,6.05a2.14,2.14,0,0,1-1.84,1.09h-.21a24.88,24.88,0,0,0-5.08,0h-.21a2.14,2.14,0,0,1-1.84-1.09L24.88,1.66A2.17,2.17,0,0,0,23,.58Z"/><circle class="a" cx="32" cy="32" r="11.5"/><path d="M32,21A11,11,0,1,1,21,32,11,11,0,0,1,32,21m0-1A12,12,0,1,0,44,32,12,12,0,0,0,32,20Z"/>
|
||||
</svg>
|
||||
<h5>Settings</h5>
|
||||
</div>
|
||||
</nav>
|
||||
<main class="hide-completely">
|
||||
<section class="page hide-completely" id="home_page">
|
||||
<!--<h1>What is Blockchain UPI?</h1>
|
||||
<p>
|
||||
Your Rupee balance is digital representation of actual cash on FLO Blockchain.
|
||||
</p>-->
|
||||
|
||||
<div class="left">
|
||||
<h4>Rupee actions</h4>
|
||||
<sm-carousel class="options-tab">
|
||||
@ -456,11 +415,10 @@
|
||||
</div>
|
||||
</sm-carousel>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div id="user_panel">
|
||||
<h4 id="user_type">User</h4>
|
||||
<div class="user-panel">
|
||||
<h4 class="user-type">User</h4>
|
||||
<div class="copy-row">
|
||||
<h4 id="user_flo_id" class="copy"></h4>
|
||||
<h4 class="user-flo-id copy"></h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
<title>Copy</title>
|
||||
<rect x="16" y="16" width="48" height="48" rx="6" />
|
||||
@ -478,31 +436,36 @@
|
||||
<div id="display_balance" class="grid grid-2">
|
||||
<div class="balance">
|
||||
<h5>Rupee</h5>
|
||||
<h3 id="token_balance">0</h3>
|
||||
</div>
|
||||
<div class="balance">
|
||||
<h3 class="token-balance">0</h3>
|
||||
</div>
|
||||
<div class="balance">
|
||||
<h5>Unconfirmed Rupee</h5>
|
||||
<h3 id="uncnf_token_balance">0</h3>
|
||||
</div>
|
||||
<div class="balance">
|
||||
<h5>FLO</h5>
|
||||
<h3 id="flo_balance">0</h3>
|
||||
<h3 class="flo-balance">0</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="deposit" class="page hide-completely">
|
||||
<div class="left">
|
||||
<h3>Transaction Requests</h3>
|
||||
<sm-tab-header target="requests_to_cashier">
|
||||
<sm-tab>Deposits</sm-tab>
|
||||
<sm-tab>Withdrawals</sm-tab>
|
||||
<sm-tab>Pay Through Cashier</sm-tab>
|
||||
</sm-tab-header>
|
||||
<sm-tab-panels id="requests_to_cashier">
|
||||
<sm-panel>
|
||||
<div class="container-header">
|
||||
<h2>Deposit Requests</h2>
|
||||
<button id="fetch_deposits" onclick="show_deposit_request()">
|
||||
<sm-button id="fetch_deposits" onclick="show_deposit_request()">
|
||||
Load pending
|
||||
</button>
|
||||
<label class="search" id="search_deposit">
|
||||
<input type="search" onkeyup="search_deposits()" placeholder="Search">
|
||||
</label>
|
||||
</sm-button>
|
||||
</div>
|
||||
<div id="pending_deposits_container" class="container"></div>
|
||||
<div id="deposit_illustration" class="empty">
|
||||
<div id="deposit_illustration" class="empty-state">
|
||||
<svg viewBox="0 0 529.94 446.5">
|
||||
<defs>
|
||||
<style>
|
||||
@ -553,21 +516,15 @@
|
||||
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
|
||||
transform="translate(-703.5 -300.22)" />
|
||||
</svg>
|
||||
<h2 class="light-text">No deposit requests.</h2>
|
||||
<h4 class="light-text">No deposit requests.</h4>
|
||||
</div>
|
||||
</section>
|
||||
<section id="withdraw" class="page hide-completely">
|
||||
</sm-panel>
|
||||
<sm-panel>
|
||||
<div class="container-header">
|
||||
<h2>Withdraw Requests</h2>
|
||||
<button id="fetch_withdraws" onclick="show_withdraw_request()">
|
||||
Load pending
|
||||
</button>
|
||||
<label class="search" id="search_withdraw">
|
||||
<input type="search" onkeyup="search_withdraws()" placeholder="Search">
|
||||
</label>
|
||||
<sm-button id="fetch_withdraws" onclick="show_withdraw_request()">Load pending</sm-button>
|
||||
</div>
|
||||
<div id="pending_withdrawals_container" class="container"></div>
|
||||
<div id="withdraw_illustration" class="empty">
|
||||
<div id="withdraw_illustration" class="empty-state">
|
||||
<svg viewBox="0 0 529.94 446.5">
|
||||
<defs>
|
||||
<style>
|
||||
@ -618,21 +575,17 @@
|
||||
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
|
||||
transform="translate(-703.5 -300.22)" />
|
||||
</svg>
|
||||
<h2 class="light-text">No withdraw requests.</h2>
|
||||
<h4 class="light-text">No withdraw requests.</h4>
|
||||
</div>
|
||||
</section>
|
||||
<section id="pay_cashier" class="page hide-completely">
|
||||
</sm-panel>
|
||||
<sm-panel>
|
||||
<div class="container-header">
|
||||
<h2>Pay through cashier Requests</h2>
|
||||
<button id="fetch_pay_requests" onclick="showPayRequests()">
|
||||
<sm-button id="fetch_pay_requests" onclick="showPayRequests()">
|
||||
Load pending
|
||||
</button>
|
||||
<label class="search" id="search_withdraw">
|
||||
<input type="search" onkeyup="search_pay_through_cashier()" placeholder="Search">
|
||||
</label>
|
||||
</sm-button>
|
||||
</div>
|
||||
<div id="pay_requests_container" class="container"></div>
|
||||
<div id="pay_illustration" class="empty">
|
||||
<div id="pay_illustration" class="empty-state">
|
||||
<svg viewBox="0 0 529.94 446.5">
|
||||
<defs>
|
||||
<style>
|
||||
@ -683,18 +636,65 @@
|
||||
d="M1197.61,302.37c.69-2.09,4.36,1.43,8.56,2.81s5.16,6.73,4.47,8.83-2.76.14-7-1.23S1196.93,304.47,1197.61,302.37Z"
|
||||
transform="translate(-703.5 -300.22)" />
|
||||
</svg>
|
||||
<h2 class="light-text">No pay requests.</h2>
|
||||
<h4 class="light-text">No pay requests.</h4>
|
||||
</div>
|
||||
</sm-panel>
|
||||
</sm-tab-panels>
|
||||
</div>
|
||||
<div class="user-panel">
|
||||
<h4 class="user-type">User</h4>
|
||||
<div class="copy-row">
|
||||
<h4 class="user-flo-id copy"></h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
<title>Copy</title>
|
||||
<rect x="16" y="16" width="48" height="48" rx="6" />
|
||||
<path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="flex align-items space-between">
|
||||
<h4>Balance</h4>
|
||||
<svg class="icon" onclick="refresh_balance(this)" viewBox="0 0 64 64">
|
||||
<title>refresh balance</title>
|
||||
<polyline points="42.99 0.16 50.25 21.23 28.78 27.7"/>
|
||||
<path d="M56.61,44.63A24.65,24.65,0,0,1,50,56.24a25.1,25.1,0,0,1-35.31,0,24.67,24.67,0,0,1,0-35,25.1,25.1,0,0,1,35.31,0"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div id="display_balance" class="grid grid-2">
|
||||
<div class="balance">
|
||||
<h5>Rupee</h5>
|
||||
<h3 class="token-balance">0</h3>
|
||||
</div>
|
||||
<div class="balance">
|
||||
<h5>FLO</h5>
|
||||
<h3 class="flo-balance">0</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="request_page" class="page hide-completely">
|
||||
<h2>Payment Requests</h2>
|
||||
<p class="bottom-margin">Your payment requests will appear here.</p>
|
||||
<div id="payment_request_container" class="container">
|
||||
<h4>You don't have any requests.</h4>
|
||||
</div>
|
||||
<h3>Payment Requests</h3>
|
||||
<sm-tab-header target="payment_request_tab">
|
||||
<sm-tab>Pending</sm-tab>
|
||||
<sm-tab>Approved</sm-tab>
|
||||
<sm-tab>Declined</sm-tab>
|
||||
</sm-tab-header>
|
||||
<sm-tab-panels id="payment_request_tab">
|
||||
<sm-panel>
|
||||
<div id="pending_payment_request_container" class="container"></div>
|
||||
<h4 class="empty-state">You don't have any requests.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel>
|
||||
<div id="approved_payment_request_container" class="container"></div>
|
||||
<h4 class="empty-state">You don't have any requests.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel>
|
||||
<div id="declined_payment_request_container" class="container"></div>
|
||||
<h4 class="empty-state">You don't have any requests.</h4>
|
||||
</sm-panel>
|
||||
</sm-tab-panels>
|
||||
</section>
|
||||
<section id="activity_page" class="page">
|
||||
<h2>Activity</h2>
|
||||
<h3>Activity</h3>
|
||||
<p class="bottom-margin">*If your request isn't completed in 12hrs, use <strong>REPORT</strong> to get
|
||||
assistance from our helpline.</p>
|
||||
<sm-tab-header target="user_activities">
|
||||
@ -704,23 +704,27 @@
|
||||
<sm-tab>System Notifications</sm-tab>
|
||||
</sm-tab-header>
|
||||
<sm-tab-panels id="user_activities">
|
||||
<sm-panel id="deposit_activity_container" class="container activity-container">
|
||||
<h4>You haven't deposited rupee yet.</h4>
|
||||
<sm-panel>
|
||||
<div id="deposit_activity_container" class="container activity-container"></div>
|
||||
<h4 class="empty-state">You haven't deposited rupee yet.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel id="withdraw_activity_container" class="container activity-container">
|
||||
<h4>You haven't withdrawn rupee yet.</h4>
|
||||
<sm-panel>
|
||||
<div id="withdraw_activity_container" class="container activity-container"></div>
|
||||
<h4 class="empty-state">You haven't withdrawn rupee yet.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel id="pay_cashier_activity_container" class="container activity-container">
|
||||
<h4>You haven't paid through cashier yet.</h4>
|
||||
<sm-panel>
|
||||
<div id="pay_cashier_activity_container" class="container activity-container"></div>
|
||||
<h4 class="empty-state">You haven't paid through cashier yet.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel id="cashier_message_container" class="container activity-container">
|
||||
<h4>No messages from cashier.</h4>
|
||||
<sm-panel>
|
||||
<div id="cashier_message_container" class="container activity-container"></div>
|
||||
<h4 class="empty-state">No messages from cashier.</h4>
|
||||
</sm-panel>
|
||||
</sm-tab-panels>
|
||||
</section>
|
||||
<section id="helpline_page" class="page hide-completely">
|
||||
<div class="container-header">
|
||||
<h2>Complaints</h2>
|
||||
<h3>Complaints</<h3>
|
||||
</div>
|
||||
<h5 class="label">Select Cashier</h5>
|
||||
<sm-strip-select name="cashier" id="select_cashier"></sm-strip-select>
|
||||
@ -730,20 +734,30 @@
|
||||
<sm-tab>Pay through cashier</sm-tab>
|
||||
</sm-tab-header>
|
||||
<sm-tab-panels id="all_complaints">
|
||||
<sm-panel id="deposit_complaints_container" class="complaints-container">
|
||||
<h4>No deposit complaints.</h4>
|
||||
<sm-panel>
|
||||
<div id="deposit_complaints_container" class="complaints-container"></div>
|
||||
<h4 class="empty-state">No deposit complaints.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel id="withdraw_complaints_container" class="complaints-container hide-completely">
|
||||
<h4>No withdraw complaints.</h4>
|
||||
<sm-panel>
|
||||
<div id="withdraw_complaints_container" class="complaints-container"></div>
|
||||
<h4 class="empty-state">No withdraw complaints.</h4>
|
||||
</sm-panel>
|
||||
<sm-panel id="pay_cashier_complaints_container" class="complaints-container hide-completely">
|
||||
<h4>No pay through cashier complaints.</h4>
|
||||
<sm-panel>
|
||||
<div id="pay_cashier_complaints_container" class="complaints-container"></div>
|
||||
<h4 class="empty-state">No pay through cashier complaints.</h4>
|
||||
</sm-panel>
|
||||
</sm-tab-panels>
|
||||
</section>
|
||||
<section id="settings_page" class="page hide-completely">
|
||||
<div class="container-header">
|
||||
<h2>Settings</h2>
|
||||
<h3 class="bottom-margin">Settings<h3>
|
||||
<h4>My FLO ID</h4>
|
||||
<div class="copy-row">
|
||||
<h4 class="user-flo-id copy"></h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
<title>Copy</title>
|
||||
<rect x="16" y="16" width="48" height="48" rx="6" />
|
||||
<path d="M.5,47.52V6.5a6,6,0,0,1,6-6h41" />
|
||||
</svg>
|
||||
</div>
|
||||
<button class="primary-btn top-margin" onclick="signOut()">Sign out</button>
|
||||
</section>
|
||||
@ -781,13 +795,14 @@
|
||||
</script>
|
||||
<script src="components.js"></script>
|
||||
<script id="onLoadStartUp">
|
||||
const userFloIdContainers = document.querySelectorAll('.user-flo-id')
|
||||
function onLoadStartUp() {
|
||||
showPopup('main_loader', 'no')
|
||||
console.log("Starting the app! Please Wait!")
|
||||
floDapps.launchStartUp().then(async result => {
|
||||
console.log(`Welcome ${myFloID}`)
|
||||
await token_app.actions.doShreeGanesh();
|
||||
document.getElementById('user_flo_id').textContent = myFloID
|
||||
userFloIdContainers.forEach(container => container.textContent = myFloID)
|
||||
refresh_balance()
|
||||
hidePopup()
|
||||
}).catch(error => console.error(error))
|
||||
@ -863,7 +878,7 @@
|
||||
'data-type': 'deposit'
|
||||
})
|
||||
card.innerHTML = ` <h5 class="time">${formatedTime(time)}</h5>
|
||||
<h5>UPI Transanction ID</h5>
|
||||
<h5>UPI Address</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${txid}</h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
@ -921,7 +936,7 @@
|
||||
'data-type': 'pay_thru_cashier'
|
||||
})
|
||||
card.innerHTML = ` <h5 class="time">${formatedTime(time)}</h5>
|
||||
<h5>UPI Transanction ID</h5>
|
||||
<h5>UPI Address</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${upiTxid}</h4>
|
||||
<svg class="icon" onclick="copyToClipboard(this.parentNode)" viewBox="0 0 64 64">
|
||||
@ -948,16 +963,17 @@
|
||||
</div>`;
|
||||
return card;
|
||||
},
|
||||
paymentRequest(time, senderAddress, amount, id) {
|
||||
paymentRequest(time, senderAddress, amount, id, enableActions) {
|
||||
let card = document.createElement('div')
|
||||
card.classList.add('request')
|
||||
card.classList.add('request'),
|
||||
markup = ``
|
||||
|
||||
setAttributes(card, {
|
||||
'data-sender-address': senderAddress,
|
||||
'data-amount': amount,
|
||||
'data-payment-request-id': id
|
||||
})
|
||||
card.innerHTML = ` <h5 class="time">${formatedTime(time)}</h5>
|
||||
markup = ` <h5 class="time">${formatedTime(time)}</h5>
|
||||
<h5>Request by</h5>
|
||||
<div class="copy-row">
|
||||
<h4 class="copy">${senderAddress}</h4>
|
||||
@ -969,6 +985,9 @@
|
||||
</div>
|
||||
<h5 class="label">amount</h5>
|
||||
<h4>₹ ${amount}</h4>
|
||||
`;
|
||||
if(enableActions)
|
||||
markup += `
|
||||
<div class="flex">
|
||||
<button class="decline-request secondary-btn">
|
||||
decline
|
||||
@ -976,7 +995,8 @@
|
||||
<button class="send-rupee">
|
||||
pay
|
||||
</button>
|
||||
</div>`;
|
||||
</div>`
|
||||
card.innerHTML = markup
|
||||
return card;
|
||||
},
|
||||
cashierMessage(message) {
|
||||
@ -1445,7 +1465,15 @@
|
||||
minutes = new Date(parseInt(time)).getMinutes(),
|
||||
hours = new Date(parseInt(time)).getHours()
|
||||
minutes = minutes < 10 ? `0${minutes}` : minutes
|
||||
let finalHours = hours > 12 ? `${hours - 12}:${minutes} PM` : `${hours}:${minutes} AM`
|
||||
let finalHours = ``;
|
||||
if(hours > 12)
|
||||
finalHours = `${hours - 12}:${minutes}`
|
||||
else if(hours === 0)
|
||||
finalHours = `12:${minutes}`
|
||||
else
|
||||
finalHours = `${hours}:${minutes}`
|
||||
|
||||
finalHours = hours >= 12 ? `${finalHours} PM` : `${finalHours} AM`
|
||||
return `${finalHours} ${month} ${date} ${year}`;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
@ -1601,7 +1629,7 @@
|
||||
})
|
||||
|
||||
// Function for accepting payment request
|
||||
document.getElementById('payment_request_container').addEventListener('click', async (e) => {
|
||||
document.getElementById('payment_request_tab').addEventListener('click', async (e) => {
|
||||
if (e.target.closest('.send-rupee')) {
|
||||
let parent = e.target.closest('.request'),
|
||||
senderAddress = parent.dataset.senderAddress,
|
||||
@ -11133,6 +11161,27 @@
|
||||
{
|
||||
"FByrY4vc1NRfbkqAqABtUyhhNzMZsKUjqr": {
|
||||
"upi_id": "7004780931@upi"
|
||||
},
|
||||
"FPFeL5PXzW9bGosUjQYCxTHSMHidnygvvd": {
|
||||
"upi_id": "7744023898@paytm"
|
||||
},
|
||||
"FCja6sLv58e3RMy41T5AmWyvXEWesqBCkX": {
|
||||
"upi_id": "8507742774@ybl"
|
||||
},
|
||||
"FHW2kgYEhDt85vjAiMMF7bQqdP74L7iwvQ": {
|
||||
"upi_id": "8340617958@ybl"
|
||||
},
|
||||
"FTmJ6QeBjDFjdqS6Zs4V5amac2X19AjXcF": {
|
||||
"upi_id": "8902496422@ybl"
|
||||
},
|
||||
"FBun3694ZdxmD66os9oL5DxMrif3vyVjT3": {
|
||||
"upi_id": "7004801428@ybl"
|
||||
},
|
||||
"FTpxFWdBDvYARGZuPWDhw9gke72J2pruvv": {
|
||||
"upi_id": "aakriti1705sinha@okicici"
|
||||
},
|
||||
"FQ6udJuTbGDa2kWZAkmNpwgHaUEeYLPAtt": {
|
||||
"upi_id": "krishraj1012-2@okicici"
|
||||
}
|
||||
}`
|
||||
text = removeWhiteSpaces(text);
|
||||
@ -11227,7 +11276,7 @@
|
||||
const allCashierOptions = document.querySelectorAll('.cashier-option'),
|
||||
allUserOptions = document.querySelectorAll('.user-option'),
|
||||
allHelplineOptions = document.querySelectorAll('.helpline-option'),
|
||||
userType = document.getElementById('user_type')
|
||||
userType = document.querySelectorAll('.user-type')
|
||||
|
||||
//Cashier startup sequence
|
||||
if (Object.keys(token_app.master_configurations.cashiers).includes(myFloID)) {
|
||||
@ -11243,7 +11292,7 @@
|
||||
show_deposit_request()
|
||||
show_withdraw_request()
|
||||
showPayRequests()
|
||||
userType.textContent = 'Cashier'
|
||||
userType.forEach(user => user.textContent = 'Cashier')
|
||||
showPage(document.getElementById('deposit_page_btn'), 'deposit')
|
||||
}
|
||||
|
||||
@ -11266,7 +11315,7 @@
|
||||
cashierSelect.innerHTML = cashierList;
|
||||
await Promise.all([load_deposit_complaints(cashierSelect.value), load_withdraw_complaints(
|
||||
cashierSelect.value), load_pay_thru_cashier_complaints(cashierSelect.value)])
|
||||
userType.textContent = 'Helpline'
|
||||
userType.forEach(user => user.textContent = 'Cashier')
|
||||
showPage(document.getElementById('helpline_page_btn'), 'helpline_page')
|
||||
}
|
||||
|
||||
@ -11283,7 +11332,7 @@
|
||||
})
|
||||
show_user_activities()
|
||||
show_payment_requests()
|
||||
userType.textContent = 'User'
|
||||
userType.forEach(user => user.textContent = 'User')
|
||||
showPage(document.getElementById('home_page_btn'), 'home_page')
|
||||
}
|
||||
|
||||
@ -11345,36 +11394,36 @@
|
||||
let promises = [];
|
||||
|
||||
for (let cashier in token_app.master_configurations.cashiers) {
|
||||
let p1 = floCloudAPI.requestGeneralData(token_app.master_configurations.TYPE_DEPOSITS, {
|
||||
receiverID: cashier,
|
||||
senderIDs: [myFloID]
|
||||
})
|
||||
let p1 = {
|
||||
func: floCloudAPI.requestGeneralData,
|
||||
arg1: token_app.master_configurations.TYPE_DEPOSITS,
|
||||
arg2: {receiverID: cashier, senderIDs: [myFloID]}
|
||||
}
|
||||
|
||||
let p2 = floCloudAPI.requestGeneralData(token_app.master_configurations
|
||||
.TYPE_WITHDRAWS, {
|
||||
receiverID: cashier,
|
||||
senderIDs: [myFloID]
|
||||
})
|
||||
let p2 = {
|
||||
func: floCloudAPI.requestGeneralData,
|
||||
arg1: token_app.master_configurations.TYPE_WITHDRAWS,
|
||||
arg2: {receiverID: cashier, senderIDs: [myFloID]}
|
||||
}
|
||||
|
||||
let p3 = floCloudAPI.requestGeneralData(token_app.master_configurations
|
||||
.TYPE_PAY_THROUGH_CASHIER, {
|
||||
receiverID: cashier,
|
||||
senderIDs: [myFloID]
|
||||
})
|
||||
|
||||
promises.push(p1);
|
||||
promises.push(p2);
|
||||
promises.push(p3);
|
||||
let p3 = {
|
||||
func: floCloudAPI.requestGeneralData,
|
||||
arg1: token_app.master_configurations.TYPE_PAY_THROUGH_CASHIER,
|
||||
arg2: {receiverID: cashier, senderIDs: [myFloID]}
|
||||
}
|
||||
|
||||
promises.push(p1, p2, p3);
|
||||
}
|
||||
|
||||
let p4 = floCloudAPI.requestGeneralData(token_app.master_configurations.TYPE_MSGES, {
|
||||
receiverID: myFloID
|
||||
})
|
||||
let p4 = {
|
||||
func: floCloudAPI.requestGeneralData,
|
||||
arg1: token_app.master_configurations.TYPE_MSGES,
|
||||
arg2: {receiverID: myFloID}
|
||||
}
|
||||
|
||||
promises.push(p4);
|
||||
|
||||
await Promise.all(promises);
|
||||
await Promise.all(promises.map(prom => prom.func.call(floCloudAPI,prom.arg1, prom.arg2)));
|
||||
|
||||
return promises;
|
||||
|
||||
@ -11518,7 +11567,7 @@
|
||||
flo_txid,
|
||||
user_upi_txid,
|
||||
"tokens_transferred": amount_of_tokens_to_transfer,
|
||||
"datetime": + new Date()
|
||||
"datetime": +new Date()
|
||||
}
|
||||
|
||||
// TODO: check https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/${flo_txid}
|
||||
@ -11576,7 +11625,7 @@
|
||||
input_data["datetime"] = +new Date();
|
||||
|
||||
let token_tx = await ajaxGet('https://ranchimallflo.duckdns.org/api/v1.0/getTransactionDetails/' +
|
||||
input_data["token_txid"]);
|
||||
input_data["token_txid"])
|
||||
if (typeof token_tx !== "object") {
|
||||
notify("Transaction not found");
|
||||
return false;
|
||||
@ -11684,7 +11733,7 @@
|
||||
if (refreshButton) {
|
||||
refreshButton.classList.add('animate-loader')
|
||||
}
|
||||
const current_token_balance = document.getElementById('token_balance').textContent;
|
||||
const current_token_balance = document.querySelector('.token-balance').textContent;
|
||||
if (typeof current_token_balance == "string") {
|
||||
const get_user_rupee_balance = await ajaxGet(
|
||||
'https://ranchimallflo.duckdns.org/api/v1.0/getFloAddressBalance?token=rupee&floAddress=' +
|
||||
@ -11696,7 +11745,7 @@
|
||||
if (typeof get_user_rupee_balance === "object" && get_user_rupee_balance.balance >= 0) {
|
||||
if (get_user_rupee_balance.balance === null)
|
||||
get_user_rupee_balance.balance = 0;
|
||||
document.getElementById('token_balance').textContent = get_user_rupee_balance.balance;
|
||||
document.querySelectorAll('.token-balance').forEach(bal => bal.textContent = get_user_rupee_balance.balance);
|
||||
}
|
||||
if(typeof get_user_unconfirmed_rupee_balance=="number" && !isNaN(get_user_unconfirmed_rupee_balance)) {
|
||||
document.getElementById('uncnf_token_balance').textContent = get_user_unconfirmed_rupee_balance;
|
||||
@ -11857,8 +11906,7 @@
|
||||
<!-- User functions -->
|
||||
<script>
|
||||
let depositRequested = 0,
|
||||
depositedRupeeTxId = document.getElementById('deposited_rupee_txId');
|
||||
|
||||
depositedRupeeTxId = document.getElementById('deposited_rupee_upi');
|
||||
function request_rupee_token() {
|
||||
try {
|
||||
const request_tokens_btn = document.getElementById('request_tokens_btn');
|
||||
@ -11985,7 +12033,7 @@
|
||||
const cashier_upi = token_app.master_configurations.cashiers[cashier].upi_id;
|
||||
|
||||
const txt = `Please send cash to UPI address <strong>${cashier_upi}</strong>.
|
||||
Then specify the <strong>amount sent</strong> and <strong>UPI Transaction ID</strong> below.`;
|
||||
Then specify the <strong>amount sent</strong> and <strong>UPI address you used to send money</strong> below.`;
|
||||
|
||||
document.getElementById('pay_cashier_info').innerHTML = txt;
|
||||
|
||||
@ -11995,17 +12043,17 @@
|
||||
const paying_amount_div = document.getElementById('recvr_amount_to_pay')
|
||||
const recvr_id = document.getElementById('recvr_id').value;
|
||||
let amount_to_pay = Number(paying_amount_div.value);
|
||||
let paid_cashier_upi_txid = document.getElementById('paid_cashier_upi_txid').value;
|
||||
paid_cashier_upi_txid = toAlphanumeric(paid_cashier_upi_txid);
|
||||
let paid_cashier_upi = document.getElementById('paid_cashier_upi').value;
|
||||
paid_cashier_upi = toAlphanumeric(paid_cashier_upi);
|
||||
if (recvr_id.length < 1 ||
|
||||
!floCrypto.validateAddr(recvr_id) ||
|
||||
amount_to_pay <= 0 ||
|
||||
paid_cashier_upi_txid.length < 1)
|
||||
paid_cashier_upi.length < 1)
|
||||
return notify("Incomplete information", 'error', '', true);
|
||||
const req_object = {
|
||||
receiver_flo_id: recvr_id,
|
||||
amount: amount_to_pay,
|
||||
upi_txid: toAlphanumeric(paid_cashier_upi_txid)
|
||||
upi_txid: toAlphanumeric(paid_cashier_upi)
|
||||
}
|
||||
|
||||
floCloudAPI.sendGeneralData(req_object, token_app.master_configurations
|
||||
@ -12050,7 +12098,7 @@
|
||||
} = usr_deposits.message;
|
||||
frag.append(render.depositActivity(usr_deposits.vectorClock, upi_txid, deposit_amount))
|
||||
}
|
||||
if (frag.children.length)
|
||||
|
||||
depositActivityContainer.innerHTML = ``;
|
||||
depositActivityContainer.append(frag)
|
||||
|
||||
@ -12064,8 +12112,6 @@
|
||||
frag.append(render.withdrawActivity(usr_withdraws.vectorClock, token_txid, withdrawer_upi,
|
||||
withdraw_amount))
|
||||
}
|
||||
|
||||
if (frag.children.length)
|
||||
withdrawActivityContainer.innerHTML = ``;
|
||||
withdrawActivityContainer.append(frag)
|
||||
|
||||
@ -12080,7 +12126,6 @@
|
||||
amount))
|
||||
}
|
||||
|
||||
if (frag.children.length)
|
||||
payCashierActivityContainer.innerHTML = ``;
|
||||
payCashierActivityContainer.append(frag)
|
||||
|
||||
@ -12088,7 +12133,6 @@
|
||||
frag.append(render.cashierMessage(msg))
|
||||
}
|
||||
|
||||
if (frag.children.length)
|
||||
cashierMessageContainer.innerHTML = ``;
|
||||
cashierMessageContainer.append(frag)
|
||||
} catch (e) {
|
||||
@ -12129,7 +12173,6 @@
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
async function request_payment(receiver_flo_id = '', amount = 0) {
|
||||
try {
|
||||
|
||||
@ -12192,7 +12235,13 @@
|
||||
let processed_payments_requests = approved_reqs_list.map(m => m.message).concat(declined_reqs_list
|
||||
.map(m => m.message));
|
||||
|
||||
let paymentRequestContainer = document.getElementById("payment_request_container");
|
||||
let pendingPaymentRequestContainer = document.getElementById("pending_payment_request_container"),
|
||||
approvedPaymentRequestContainer = document.getElementById("approved_payment_request_container"),
|
||||
declinedPaymentRequestContainer = document.getElementById("declined_payment_request_container");
|
||||
|
||||
pendingPaymentRequestContainer.innerHTML = ``;
|
||||
approvedPaymentRequestContainer.innerHTML = ``;
|
||||
declinedPaymentRequestContainer.innerHTML = ``;
|
||||
|
||||
for (const m of general_msg) {
|
||||
let {
|
||||
@ -12205,11 +12254,34 @@
|
||||
if (processed_payments_requests.includes(pay_req_id || m.message)) continue;
|
||||
console.log(sender_flo_id, amount, datetime, pay_req_id);
|
||||
if (typeof sender_flo_id !== "string") continue;
|
||||
frag.append(render.paymentRequest(datetime, sender_flo_id, amount, pay_req_id, true))
|
||||
}
|
||||
pendingPaymentRequestContainer.append(frag)
|
||||
|
||||
for (const m of approved_reqs_list) {
|
||||
let {
|
||||
sender_flo_id,
|
||||
receiver_flo_id,
|
||||
amount,
|
||||
datetime,
|
||||
pay_req_id
|
||||
} = m.message;
|
||||
frag.append(render.paymentRequest(datetime, sender_flo_id, amount, pay_req_id))
|
||||
}
|
||||
if (frag.children.length)
|
||||
paymentRequestContainer.innerHTML = ``;
|
||||
paymentRequestContainer.append(frag)
|
||||
approvedPaymentRequestContainer.append(frag)
|
||||
|
||||
for (const m of declined_reqs_list) {
|
||||
let {
|
||||
sender_flo_id,
|
||||
receiver_flo_id,
|
||||
amount,
|
||||
datetime,
|
||||
pay_req_id
|
||||
} = m.message;
|
||||
console.log(m)
|
||||
frag.append(render.paymentRequest(datetime, sender_flo_id, amount, pay_req_id))
|
||||
}
|
||||
declinedPaymentRequestContainer.append(frag)
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
return false
|
||||
@ -12273,7 +12345,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<!-- Helpline -->
|
||||
<script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user