geer-builder 1.2.770 → 1.2.771

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.
@@ -25,7 +25,7 @@
25
25
  <span>You need to login to view this component.</span>
26
26
  </div>
27
27
  <q-dialog v-model="is_earning_breakdown_log_open">
28
- <earnings-log :complan_details="selected_complan"></earnings-log>
28
+ <earnings-log :is_teslab_earnings="is_teslab_breakdown" :complan_details="selected_complan"></earnings-log>
29
29
  </q-dialog>
30
30
  </div>
31
31
  </template>
@@ -43,6 +43,7 @@ import AUTH from './auth.js';
43
43
  export default
44
44
  {
45
45
  components: { GCard, GLoader, EarningsLog },
46
+ props:['is_teslab_breakdown'],
46
47
  mixins: [GlobalMixins],
47
48
  data: () =>
48
49
  ({
@@ -48,7 +48,7 @@ import GLoader from '../GlobalLoader';
48
48
 
49
49
  export default
50
50
  {
51
- props:['complan_details'],
51
+ props:['complan_details','is_teslab_earnings'],
52
52
  mixins: [GlobalMixins],
53
53
  data: () =>
54
54
  ({
@@ -91,6 +91,16 @@ export default
91
91
  query = new DB_SLOT_LOG().collection().where("recipient_id", "==", this.current_slot_info.slot_code).where("type",'==', this.complan_details.complan).orderBy('created_date', 'desc').limit(10);
92
92
  }
93
93
  await this.$bind('notification_list', query);
94
+
95
+ if(this.is_teslab_earnings == true)
96
+ {
97
+ this.notification_list.map(function(obj) { // loop through array
98
+
99
+ obj.message = obj.message.replace("vortex entry","cash reward entry").replace("matching bonus", "sales force bonus").replace("binary distribution","sales force distribution")
100
+ return obj;
101
+ });
102
+ }
103
+
94
104
  this.initial_loading = false;
95
105
  },
96
106
  async updateNotificationCount()
@@ -115,13 +125,21 @@ export default
115
125
  this.$refs.bar.start();
116
126
 
117
127
  let query = new DB_SLOT_LOG().collection().where("recipient_id", "==", this.current_slot_info.slot_code).where("type",'==', this.complan_details.complan).orderBy('created_date', 'desc').startAfter(this.notification_list[this.notification_list.length - 1].created_date).limit(10);
118
- await this.$bind("table_data", );
128
+ // await this.$bind("table_data", );
119
129
 
120
130
  let result = await query.get();
121
131
 
122
132
  result.docs.forEach(res =>
123
133
  {
124
- this.notification_list.push(Object.assign({}, res.data(), { id: res.id }));
134
+
135
+ let result_data = res.data();
136
+
137
+ if(this.is_teslab_earnings == true)
138
+ {
139
+ result_data.message = result_data.message.replace("vortex entry","cash reward entry").replace("matching bonus", "sales force bonus").replace("binary distribution","sales force distribution")
140
+ }
141
+
142
+ this.notification_list.push(Object.assign({}, result_data, { id: res.id }));
125
143
  });
126
144
 
127
145
  this.$refs.bar.stop();
@@ -150,7 +150,7 @@ import {formatDate}from '../../utilities/DateUtils';
150
150
  {
151
151
  name : 'message',
152
152
  label : 'Message',
153
- field : row => row.message.replace('Vortex Token','Cash Reward').replace('binary points','sales force'),
153
+ field : row => row.message.replace('Vortex Token','Cash Reward').replace('binary points','sales force').replace('vortex entry','cash reward entry'),
154
154
  align : 'left',
155
155
  required: true,
156
156
  format: val => `${val}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geer-builder",
3
- "version": "1.2.770",
3
+ "version": "1.2.771",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {