geer-builder 1.2.522 → 1.2.526

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/GCashOut.vue CHANGED
@@ -3,7 +3,7 @@
3
3
  <q-form @submit.prevent="submit()">
4
4
  <div class="cashout__content" v-if="!is_initializing">
5
5
  <div class="cashout__content-left">
6
- <g-card :nomargin="true" class="cashout__box cashout__choice">
6
+ <g-card :nomargin="true" class="cashout__box cashout__choice" v-if="!cashout_choice_hide">
7
7
  <div class="cashout__content-label cashout_title">How should we send the money?</div>
8
8
  <div class="cashout__content-label cashout_body q-mt-md">
9
9
  <q-select v-model="cashout_choice" outlined dense :options="payoutmethodlist" option-label="method_label" option-value="method_key"/>
@@ -38,7 +38,8 @@
38
38
  <div class="cashout__content-label cashout_title">Cash out Summary</div>
39
39
  <div class="cashout_body">
40
40
  <div class="summary__content">
41
- <div class="summary__content-label">Cashout Method</div>
41
+ <div class="summary__content-label" v-if="metamask">Currency</div>
42
+ <div class="summary__content-label" v-else>Cashout Method</div>
42
43
  <div class="summary__content-info">{{cashout_choice.method_label}}</div>
43
44
  </div>
44
45
  <div class="summary__content">
@@ -61,7 +62,7 @@
61
62
  <div class="summary__content-label" v-else>Withholding Tax</div>
62
63
  <div class="summary__content-info">{{ main_currency }} {{ $_formatNumber(xfield.witholding_tax, { decimal: 2}) }}</div>
63
64
  </div>
64
- <div class="summary__content">
65
+ <div class="summary__content" v-if="!metamask">
65
66
  <div class="summary__content-label">Total Charge</div>
66
67
  <div class="summary__content-info" v-if="merchant_cashout">{{ main_currency }} {{ $_formatNumber(total_charge, { decimal: 2}) }}</div>
67
68
  <div class="summary__content-info" v-else>{{ main_currency }} {{ $_formatNumber(total_charge, { decimal: 2}) }}</div>
@@ -89,7 +90,7 @@
89
90
  </q-form>
90
91
 
91
92
  <q-dialog v-model="is_dialog_open_cashout_status">
92
- <cashout-status-dialog @closePopup="is_dialog_open_cashout_status = false;"></cashout-status-dialog>
93
+ <cashout-status-dialog :metamask='metamask' @closePopup="is_dialog_open_cashout_status = false;"></cashout-status-dialog>
93
94
  </q-dialog>
94
95
  <q-dialog v-model="is_tin_registration_dialog_open">
95
96
  <tin-registration-dialog @closePopup="is_tin_registration_dialog_open = false;"></tin-registration-dialog>
@@ -138,6 +139,7 @@ export default {
138
139
  }),
139
140
  mixins:[GlobalMixins],
140
141
  components: { GCard , CashoutStatusDialog, TinRegistrationDialog},
142
+ props:['cashout_choice_hide', 'metamask'],
141
143
  async mounted()
142
144
  {
143
145
 
@@ -238,7 +240,6 @@ export default {
238
240
  if(this.merchant_cashout)
239
241
  {
240
242
  this.payoutmethodlist = await this.$_getData('merchant_payout_methods');
241
- console.log(this.merchant_cashout, 'Merhant Cashout');
242
243
  }
243
244
  else
244
245
  {
@@ -259,6 +260,7 @@ export default {
259
260
  },
260
261
  async submit()
261
262
  {
263
+
262
264
  if(this.tin_required && !this.user_info.hasOwnProperty('tin_number'))
263
265
  {
264
266
  if(this.user_info.tin_number == 'N/A')
@@ -270,6 +272,10 @@ export default {
270
272
  this.is_tin_registration_dialog_open = true;
271
273
  }
272
274
  }
275
+ else if(this.cashout_amount > this.walletBal)
276
+ {
277
+ this.$q.dialog({ html: true, title: `Something's not quite right`, message: 'Your wallet is not enough to continue this transaction'});
278
+ }
273
279
  else
274
280
  {
275
281
  this.cashout_choice.fields.forEach((field, i) =>
@@ -277,6 +283,7 @@ export default {
277
283
  this.cashout_choice.fields[i]["value"] = this.inputed[i];
278
284
  });
279
285
 
286
+
280
287
  let submitdata = {};
281
288
  if(this.merchant_cashout)
282
289
  {
@@ -294,6 +301,7 @@ export default {
294
301
  await this.$_fbCall('memberCashOut', submitdata);
295
302
  // this.$router.push({ name: 'member_cashout_success' });
296
303
  this.$q.dialog({ html: true, title: `Success`, message: 'Cashout request successfully sent.' });
304
+ this.$emit('closeDialog');
297
305
  }
298
306
  catch (error)
299
307
  {
package/GInvestment.vue CHANGED
@@ -14,16 +14,17 @@
14
14
  <div class="plan-value">Support 24/7</div>
15
15
  </div> -->
16
16
 
17
- <q-card class="my-card bg-primary text-white" style="width:250px" v-for="(item, i) in investment_packages" :key="i" v-bind:class="{active : chosen_plan.key === item.key}">
18
- <q-card-section>
17
+ <q-card class="my-card bg-primary text-white text-left" style="width:200px" v-for="(item, i) in investment_packages" :key="i" v-bind:class="{active : chosen_plan.key === item.key}">
18
+ <q-card-section @click="choosePlan(item)" style="cursor:pointer">
19
19
  <div class="text-h6">{{item.investment_name}}</div>
20
- <div class="text-h4">${{item.investment_minimum}}</div>
20
+ <div class="text-h6">{{item.investment_rate}}% DAILY</div>
21
+ <div class="text-h6">{{item.investment_duration}} LOCKED IN PERIOD</div>
21
22
  </q-card-section>
22
23
  <q-separator dark />
23
- <q-card-actions vertical align="center" class="bg-white text-primary">
24
+ <!-- <q-card-actions vertical align="center" class="bg-white text-primary">
24
25
  <q-btn flat @click="choosePlan(item)" icon="favorite_border"> Buy</q-btn>
25
26
  <q-btn flat @click="viewPlan(item)" icon="visibility"> View</q-btn>
26
- </q-card-actions>
27
+ </q-card-actions> -->
27
28
  </q-card>
28
29
  </div>
29
30
  <q-dialog persistent :maximized="$q.platform.is.mobile" transition-show="slide-up" transition-hide="slide-down" v-model="is_investment_dialog_open">
@@ -43,7 +44,7 @@
43
44
  <script>
44
45
  import GlobalMixins from './mixins/global_mixins.js';
45
46
  import AddInvestment from './dialogs/AddInvestment';
46
- import InvestmentViewDialog from './components/Investment/InvestmentViewDialog';
47
+ import InvestmentViewDialog from './components/Investment/InvestmentView.vue';
47
48
  export default
48
49
  {
49
50
  components: {AddInvestment, InvestmentViewDialog},
@@ -0,0 +1,85 @@
1
+ <template>
2
+ <div class="g-investment-login" @click="loginMetaMask">
3
+ <img :src="require('./assets/statics/metamask-icon.png')" class="image" alt="">
4
+ <div class="label">Connect to MetaMask</div>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ import GlobalMixins from './mixins/global_mixins';
10
+ import PaymentProcessor from './contracts/PaymentProcessor.json';
11
+ import USDT from './contracts/USDT.json';
12
+ import settings from './settings';
13
+ import { ethers, Contract } from 'ethers';
14
+ export default
15
+ {
16
+ mixins: [GlobalMixins],
17
+ filters: { },
18
+ data:() =>(
19
+ {
20
+ metamask:
21
+ {
22
+ signer: null,
23
+ payment_processor: null,
24
+ usdt: null
25
+ }
26
+ }),
27
+ mounted()
28
+ {
29
+ },
30
+ methods: {
31
+ async loginMetaMask()
32
+ {
33
+ if (window.ethereum)
34
+ {
35
+ await window.ethereum.request({ method: 'eth_requestAccounts' });
36
+ const provider = new ethers.providers.Web3Provider(window.ethereum);
37
+ this.metamask.signer = provider.getSigner();
38
+
39
+ this.metamask.payment_processor = new Contract(
40
+ settings.payment_processor,
41
+ PaymentProcessor.abi,
42
+ this.metamask.signer
43
+ );
44
+
45
+ this.metamask.usdt = new Contract(
46
+ settings.usdt,
47
+ USDT.abi,
48
+ this.metamask.signer
49
+ );
50
+
51
+ console.log(await this.metamask.usdt.balanceOf(await this.metamask.signer.getAddress()).then(result => ethers.utils.formatEther(result.toString())));
52
+ // this.merchant_balance = await this.usdt.balanceOf(this.settings.merchant).then(result => ethers.utils.formatEther(result.toString()));
53
+ }
54
+ else
55
+ {
56
+ this.$q.dialog(
57
+ {
58
+ title: 'An Error Has Occured',
59
+ message: 'Metamask not installed'
60
+ });
61
+ }
62
+ }
63
+ },
64
+ computed: { }
65
+ }
66
+ </script>
67
+ <style lang="scss">
68
+ .g-investment-login{
69
+ background: $primary;
70
+ width: 200px;
71
+ height: 100px;
72
+ border-radius: 5px;
73
+ margin: auto;
74
+ display: grid;
75
+ grid-template-columns: 30% 1fr;
76
+ place-items: center;
77
+ color: #fafafa;
78
+ font-size: 1rem;
79
+ padding: 20px;
80
+ cursor: pointer;
81
+ .image{
82
+ width: 100%;
83
+ }
84
+ }
85
+ </style>
@@ -0,0 +1,301 @@
1
+ <template>
2
+ <q-card class="wallet-logs-dialog">
3
+ <q-bar class="bg-primary text-white q-pa-lg">
4
+ <q-icon class="q-mr-sm" name="fa fa-splotch"></q-icon>
5
+ <b>Wallet Logs</b>
6
+ <q-space />
7
+ <q-btn dense flat icon="close" v-close-popup>
8
+ <q-tooltip content-class="bg-white text-primary">Close</q-tooltip>
9
+ </q-btn>
10
+ </q-bar>
11
+ <div class="table-holder">
12
+ <div class="temp-nav-holder" v-if="!hide_search">
13
+ <!-- FILTER FROM -->
14
+ <!-- <div class="filter-from">
15
+ <div class="q-mt-sm text-left">
16
+ <div class="q-mt-sm q-mr-md">
17
+ <q-input mask="date" outlined label="Filter From" stack-label>
18
+ <template v-slot:append>
19
+ <q-icon name="event" class="cursor-pointer">
20
+ <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
21
+ <q-date @input="() => $refs.qDateProxy.hide()" />
22
+ </q-popup-proxy>
23
+ </q-icon>
24
+ </template>
25
+ </q-input>
26
+ </div>
27
+ </div>
28
+ </div> -->
29
+
30
+ <!-- FILTER TO -->
31
+ <!-- <div class="filter-to">
32
+ <div class="q-mt-sm text-left">
33
+ <div class="q-mt-sm q-mr-md">
34
+ <q-input mask="date" outlined label="Filter To" stack-label>
35
+ <template v-slot:append>
36
+ <q-icon name="event" class="cursor-pointer">
37
+ <q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
38
+ <q-date @input="() => $refs.qDateProxy.hide()" />
39
+ </q-popup-proxy>
40
+ </q-icon>
41
+ </template>
42
+ </q-input>
43
+ </div>
44
+ </div>
45
+ </div> -->
46
+
47
+
48
+ <!-- ACTIONS -->
49
+ <div class="search-button">
50
+ <div class="q-mt-sm text-left" >
51
+ <div class="q-mt-sm q-mr-md">
52
+ <q-input v-model="search" outlined label="Search" stack-label>
53
+ <template v-slot:append>
54
+ <q-icon size="14px" name="fa fa-search" class="cursor-pointer" />
55
+ </template>
56
+ </q-input>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ </div>
62
+
63
+ <div class="row">
64
+ <!-- TABLE -->
65
+ <div class="col-12 text-right q-mb-md">
66
+ <div class="q-mt-sm text-right">
67
+ <q-table :pagination.sync="pagination" :filter="search" :loading="table_loading" separator="cell" bordered flat :data="!table_loading ? table_data : []" :columns="table_column" row-key="email">
68
+ <template v-slot:body-cell-message="cellProperties">
69
+ <q-td :props="cellProperties">
70
+ <span v-html="cellProperties.value"></span>
71
+ </q-td>
72
+ </template>
73
+ </q-table>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+
79
+ </q-card>
80
+ </template>
81
+
82
+ <script>
83
+ import DB_SLOT_LOG from './models/DB_SLOT_LOG';
84
+ import { formatNumber } from './utilities/NumberUtils';
85
+ import {formatDate} from './utilities/DateUtils';
86
+
87
+ export default
88
+ {
89
+ filters: { },
90
+ components: { },
91
+ props:['hide_search', 'mbot', 'investment_unilevel','investment_direct'],
92
+ data:() =>(
93
+ {
94
+ is_wallet_convert_open:false,
95
+ is_temporary_wallet_dialog_open: false,
96
+ pagination: { rowsPerPage: 8 },
97
+ table_loading: true,
98
+ temp_table_data:[],
99
+ table_data: [],
100
+ temp_search:'',
101
+ search: '',
102
+ settings: '',
103
+ table_column:
104
+ [
105
+ {
106
+ name : 'created_date',
107
+ label : 'Log Date',
108
+ field : row => formatDate(row.created_date, 'MM/DD/YY (hh:mm A)'),
109
+ align : 'left',
110
+ required: true,
111
+ format: val => `${val}`,
112
+ sortable: true,
113
+
114
+ },
115
+ {
116
+ name : 'message',
117
+ label : 'Message',
118
+ field : row => row.message ? row.message : row.temp_wallet_message,
119
+ align : 'left',
120
+ required: true,
121
+ format: val => `${val}`,
122
+ sortable: true,
123
+ },
124
+ {
125
+ name : 'amount',
126
+ label : 'Amount',
127
+ field : row => row.amount,
128
+ align : 'left',
129
+ required: true,
130
+ format : val => formatNumber(val, { decimal: 2 }),
131
+ sortable: true,
132
+ align : "right",
133
+
134
+ },
135
+ ],
136
+ temp_wallet_table_column:
137
+ [
138
+ {
139
+ name : 'created_date',
140
+ label : 'Log Date',
141
+ field : row => formatDate(row.created_date, 'MM/DD/YY (hh:mm A)'),
142
+ align : 'left',
143
+ required: true,
144
+ format: val => `${val}`,
145
+ sortable: true,
146
+
147
+ },
148
+ {
149
+ name : 'type',
150
+ label : 'Type',
151
+ field : row => row.type.toUpperCase(),
152
+ align : 'left',
153
+ required: true,
154
+ format: val => `${val}`,
155
+ sortable: true,
156
+ },
157
+ {
158
+ name : 'message',
159
+ label : 'Message',
160
+ field : row => row.convert_message,
161
+ align : 'left',
162
+ required: true,
163
+ format: val => `${val}`,
164
+ sortable: true,
165
+ },
166
+ {
167
+ name : 'amount',
168
+ label : 'Amount',
169
+ field : row => row.amount,
170
+ align : 'left',
171
+ required: true,
172
+ format : val => formatNumber(val, { decimal: 2 }),
173
+ sortable: true,
174
+ align : "right",
175
+
176
+ },
177
+ ],
178
+ }),
179
+ async mounted() {
180
+ await this.getTableData();
181
+ this.mbot = true;
182
+ if(this.mbot)
183
+ {
184
+ await this.mbotLog();
185
+ }
186
+ },
187
+ methods:
188
+ {
189
+ async mbotLog()
190
+ {
191
+ this.table_data.forEach(element =>
192
+ {
193
+ if(element.type == 'direct_invest')
194
+ {
195
+ element.message = `Your account <b>${element.current_owner_info.email}</b> earned direct referral amounting to <b>${element.amount} USDT</b> from invest a package ${element.cause_info.owner_info.email}`;
196
+ }
197
+ else if(element.type == 'unilevel_invest')
198
+ {
199
+ element.message = `Your account <b>${element.current_owner_info.email}</b> earned unilevel amounting to <b>${element.amount} USDT</b> from ${element.cause_info.owner_info.email}`;
200
+ }
201
+ else if(element.type == 'receive_interest')
202
+ {
203
+ // element.message = `Your account <b>${element.current_owner_info.email}</b> earned direct referral amounting to <b>USD 100.00</b> from invest a package IVABASNKNVL-PH`;
204
+ }
205
+ else if(element.type == 'capital_investment')
206
+ {
207
+ // element.message = `Your account <b>${element.current_owner_info.email}</b> earned direct referral amounting to <b>USD 100.00</b> from invest a package IVABASNKNVL-PH`;
208
+ }
209
+ else if(element.type == 'create_investment')
210
+ {
211
+ // element.message = `Your account <b>${element.current_owner_info.email}</b> earned direct referral amounting to <b>USD 100.00</b> from invest a package IVABASNKNVL-PH`;
212
+ }
213
+ });
214
+ console.log(this.table_data);
215
+ },
216
+ async getTableData()
217
+ {
218
+ if(this.investment_unilevel)
219
+ {
220
+ await this.$bind("table_data", new DB_SLOT_LOG().collection().where("recipient_id", "==", this.user_info.active_slot).where("type", "==", "unilevel_invest").orderBy('created_date', 'desc'));
221
+ }
222
+ else if(this.investment_direct)
223
+ {
224
+ console.log('direct logs');
225
+ await this.$bind("table_data", new DB_SLOT_LOG().collection().where("recipient_id", "==", this.user_info.active_slot).where("type", "==", "direct_invest").orderBy('created_date', 'desc'));
226
+ }
227
+ else
228
+ {
229
+ console.log('all wallet logs');
230
+ await this.$bind("table_data", new DB_SLOT_LOG().collection().where("recipient_id", "==", this.user_info.active_slot).orderBy('created_date', 'desc'));
231
+ }
232
+ this.table_loading = false;
233
+ },
234
+ },
235
+ computed: {
236
+
237
+ }
238
+ }
239
+ </script>
240
+ <style lang="scss">
241
+ .wallet-logs-dialog{
242
+ background:#fafafa;
243
+ width: 100% !important;
244
+ max-width:100% !important;
245
+ height: 100vh;
246
+ .table-holder{
247
+ padding: 20px;
248
+ .temp-nav-holder{
249
+ margin: 10px auto;
250
+ display: flex;
251
+ @media only screen and (max-device-width: 780px)
252
+ {
253
+ display: block;
254
+ }
255
+ .search-button{
256
+
257
+ }
258
+ .convert-button{
259
+ .buttons{
260
+ @media only screen and (max-device-width: 780px)
261
+ {
262
+ text-align: left !important;
263
+ }
264
+ }
265
+
266
+ }
267
+ .filter-from{
268
+
269
+ }
270
+ .filter-to{
271
+
272
+ }
273
+
274
+
275
+ }
276
+
277
+ }
278
+ .view-temp-wallet{
279
+ .view{
280
+ cursor: pointer;
281
+ color: $primary;
282
+ }
283
+ }
284
+ }
285
+ .temp-dialog{
286
+ background: #fafafa;
287
+ max-width: 100% !important;
288
+ min-width: 100% !important;
289
+ min-height: 100% !important;
290
+ .title{
291
+ color: $primary;
292
+ font-weight: 500;
293
+ font-size: 20px;
294
+ text-align: center;
295
+ }
296
+ .search{
297
+ width: 30%;
298
+ padding: 10px 20px;
299
+ }
300
+ }
301
+ </style>
@@ -0,0 +1,20 @@
1
+ <template>
2
+ <q-card class="g-investment-table">
3
+ <investment-list-dialog></investment-list-dialog>
4
+ </q-card>
5
+ </template>
6
+
7
+ <script>
8
+ import InvestmentListDialog from './components/Investment/InvestmentListDialog';
9
+ export default
10
+ {
11
+ components: {InvestmentListDialog},
12
+ filters: { },
13
+ data:() =>(
14
+ {
15
+ }),
16
+ mounted() { },
17
+ methods: { },
18
+ computed: { }
19
+ }
20
+ </script>