Skip to content

Commit

Permalink
payments notifications + refactoring for plan extending
Browse files Browse the repository at this point in the history
  • Loading branch information
ksydex committed Feb 16, 2020
1 parent 6c67d13 commit e7ed799
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 10 deletions.
16 changes: 15 additions & 1 deletion components/pages/workout/pesonal/WorkoutDayOff.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
<nuxt-link to="/workout">
<VButton w100>Понятно!</VButton>
</nuxt-link>
<nuxt-link class="previous-btn" to="/workout/personal/previous">
<nuxt-link
v-if="WORKOUT.day_number > 1"
class="previous-btn"
to="/workout/personal/previous"
>
<VP>
Посмотреть предыдущий день
</VP>
Expand All @@ -40,6 +44,16 @@
</div>
</template>

<script>
export default {
computed: {
WORKOUT() {
return this.$store.getters['workout/GET_WORKOUT']
}
}
}
</script>

<style scoped>
.actions-wrapper {
width: 70%;
Expand Down
34 changes: 28 additions & 6 deletions pages/notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,18 @@
<VP>
{{ item.title }}
</VP>
<div @click="pushTo(item.url)" v-if="item.url">
<VIcon icon="back" class="notifications__list__item__icon" />
<div @click="pushTo(item.url)" v-if="item.url !== 'null'">
<svg
class="notifications__list__item__icon"
viewBox="0 0 28 27"
width="28"
height="27"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M24.5 11.833H7.483l6.175-6.175-1.65-1.65L3.018 13l8.992 8.991 1.65-1.65-6.176-6.174H24.5v-2.334z"
/>
</svg>
</div>
</div>
<VP
Expand All @@ -39,11 +49,18 @@
<VP>
{{ item.title }}
</VP>
<div @click="pushTo(item.url)" v-if="item.url">
<VIcon
icon="back"
<div @click="pushTo(item.url)" v-if="item.url !== 'null'">
<svg
class="notifications__list__item__icon notifications__list__item__icon-old"
/>
viewBox="0 0 28 27"
width="28"
height="27"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M24.5 11.833H7.483l6.175-6.175-1.65-1.65L3.018 13l8.992 8.991 1.65-1.65-6.176-6.174H24.5v-2.334z"
/>
</svg>
</div>
</div>
</div>
Expand Down Expand Up @@ -96,6 +113,7 @@ export default {
background: var(--grey-light1);
display: flex;
justify-content: space-between;
align-items: center;
}
.notifications__list__item p {
Expand All @@ -106,6 +124,10 @@ export default {
transform: rotate(180deg);
}
.notifications__list__item__icon path {
fill: var(--yellow-base);
}
.notifications__list__item__icon-old {
filter: saturate(0);
opacity: 0.5;
Expand Down
5 changes: 3 additions & 2 deletions pages/subscription/extend.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ export default {
},
async extend() {
const plan_id = this.selectedPlan.id
console.log(plan_id)
try {
const data = await this.$api.Subscription.extend({ plan_id })
const { data } = await this.$api.Subscription.extend({ plan_id })
console.log(data)
if (data.url) window.open(data.url)
this.afterPayment = true
} catch (e) {}
},
Expand Down
3 changes: 2 additions & 1 deletion store/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const state = () => ({
'/workout/tips',
'/workout/tips/health',
'/workout/tips/common',
'/workout/exercise/id'
'/workout/exercise/id',
'/workout/personal/previous'
],
icon:
'M12.573 31.412a.705.705 0 01-.035.991l-1.52 1.422a.7.7 0 01-.988-.036l-8.854-9.542a.705.705 0 01.036-.992l1.522-1.42a.7.7 0 01.988.037l8.851 9.54zm11.298-17.955a.705.705 0 01-.035.991l-9.57 8.939a.7.7 0 01-.987-.036l-2.284-2.464a.705.705 0 01.036-.992l9.566-8.939a.697.697 0 01.987.036l2.287 2.465zM15.83 28.369a.705.705 0 01-.036.991l-1.522 1.421a.7.7 0 01-.988-.036l-8.85-9.542a.705.705 0 01.036-.991l1.52-1.42a.7.7 0 01.987.035l8.853 9.542zm14.744-14.57a.705.705 0 01-.036.991l-1.522 1.421a.7.7 0 01-.988-.035l-8.851-9.54a.704.704 0 01.035-.991l1.526-1.425a.697.697 0 01.987.036l8.85 9.543zm3.251-3.038a.706.706 0 01-.036.992l-1.519 1.42a.697.697 0 01-.987-.035l-8.85-9.544a.706.706 0 01.036-.992l1.52-1.423a.697.697 0 01.987.035l8.849 9.547z'
Expand Down

0 comments on commit e7ed799

Please sign in to comment.