thruthesky / centerx

Docker Enginx + MariaDB + PHP
2 stars 0 forks source link

Error on point history #92

Closed thruthesky closed 3 years ago

thruthesky commented 3 years ago

this.$app should be used in x-vue/components.

ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(145,27):
145:27 Property '$app' does not exist on type 'PointHistory'.
    143 |       this.summary.total_point_apply_increase = 0;
    144 |       this.summary.total_point_apply_decrease = 0;
  > 145 |       const $myIdx = this.$app.user.idx;
        |                           ^
    146 |       for (const h of this.pointHistories) {
    147 |         let point = 0;
    148 |         if ($myIdx == h.fromUserIdx) {
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(169,31):
169:31 Property '$app' does not exist on type 'PointHistory'.
    167 | 
    168 |   pointApply(h: PointHistoryModel): number {
  > 169 |     if (h.fromUserIdx == this.$app.user.idx) return h.fromUserPointApply;
        |                               ^
    170 |     if (h.toUserIdx == this.$app.user.idx) return h.toUserPointApply;
    171 |     return 0;
    172 |   }
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(170,29):
170:29 Property '$app' does not exist on type 'PointHistory'.
    168 |   pointApply(h: PointHistoryModel): number {
    169 |     if (h.fromUserIdx == this.$app.user.idx) return h.fromUserPointApply;
  > 170 |     if (h.toUserIdx == this.$app.user.idx) return h.toUserPointApply;
        |                             ^
    171 |     return 0;
    172 |   }
    173 |   pointAfter(h: PointHistoryModel): number {
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(174,31):
174:31 Property '$app' does not exist on type 'PointHistory'.
    172 |   }
    173 |   pointAfter(h: PointHistoryModel): number {
  > 174 |     if (h.fromUserIdx == this.$app.user.idx) return h.fromUserPointAfter;
        |                               ^
    175 |     if (h.toUserIdx == this.$app.user.idx) return h.toUserPointAfter;
    176 |     return 0;
    177 |   }
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(175,29):
175:29 Property '$app' does not exist on type 'PointHistory'.
    173 |   pointAfter(h: PointHistoryModel): number {
    174 |     if (h.fromUserIdx == this.$app.user.idx) return h.fromUserPointAfter;
  > 175 |     if (h.toUserIdx == this.$app.user.idx) return h.toUserPointAfter;
        |                             ^
    176 |     return 0;
    177 |   }
    178 | 
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(187,58):
187:58 Property '$app' does not exist on type 'PointHistory'.
    185 |     if (h.action == "dislike" || h.action == "like") {
    186 |       const f = h.post.parentIdx == 0 ? "post" : "comment";
  > 187 |       if (h.action == "dislike" && h.fromUserIdx == this.$app.user.idx) {
        |                                                          ^
    188 |         return `dislike_deduction_for_disliking_a_${f}`;
    189 |       } else if (h.action == "dislike" && h.toUserIdx == this.$app.user.idx) {
    190 |         return `your_${f}_got_disliked`;
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(189,63):
189:63 Property '$app' does not exist on type 'PointHistory'.
    187 |       if (h.action == "dislike" && h.fromUserIdx == this.$app.user.idx) {
    188 |         return `dislike_deduction_for_disliking_a_${f}`;
  > 189 |       } else if (h.action == "dislike" && h.toUserIdx == this.$app.user.idx) {
        |                                                               ^
    190 |         return `your_${f}_got_disliked`;
    191 |       } else if (h.action == "like" && h.fromUserIdx == this.$app.user.idx) {
    192 |         return `like_deduction_for_liking_a_${f}`;
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(191,62):
191:62 Property '$app' does not exist on type 'PointHistory'.
    189 |       } else if (h.action == "dislike" && h.toUserIdx == this.$app.user.idx) {
    190 |         return `your_${f}_got_disliked`;
  > 191 |       } else if (h.action == "like" && h.fromUserIdx == this.$app.user.idx) {
        |                                                              ^
    192 |         return `like_deduction_for_liking_a_${f}`;
    193 |       } else if (h.action == "like" && h.toUserIdx == this.$app.user.idx) {
    194 |         return `your_${f}_got_liked`;
ERROR in /Users/thruthesky/www/centerx-projects/clientx/src/x-vue/components/user/PointHistory.vue(193,60):
193:60 Property '$app' does not exist on type 'PointHistory'.
    191 |       } else if (h.action == "like" && h.fromUserIdx == this.$app.user.idx) {
    192 |         return `like_deduction_for_liking_a_${f}`;
  > 193 |       } else if (h.action == "like" && h.toUserIdx == this.$app.user.idx) {
        |                                                            ^
    194 |         return `your_${f}_got_liked`;
    195 |       }
    196 |     }