소스 검색

:fire: removed unneeded card

tags/0.0.2
j 3 년 전
부모
커밋
c675590b91
2개의 변경된 파일9개의 추가작업 그리고 118개의 파일을 삭제
  1. 0
    109
      frontend/src/components/ProfileCardItem.vue
  2. 9
    9
      frontend/src/components/ProfileCardList.vue

+ 0
- 109
frontend/src/components/ProfileCardItem.vue 파일 보기

@@ -1,109 +0,0 @@
1
-<template lang="pug">
2
-w-card.profile-card-list--card.xs12.pa12
3
-    header.xs12.w-flex.column.center
4
-        NamePlate(
5
-            :is-list='isList'
6
-            :is-paired='isPaired'
7
-            :name='card.name'
8
-            :pid='card.pid'
9
-            :pronouns='card.pronouns'
10
-            :role='card.role'
11
-        )
12
-
13
-        w-button.text-upper.xs12.pa6(v-if='isPaired && !isList')
14
-            w-icon.mr1(xl) mdi mdi-chat
15
-            | start chat
16
-
17
-        template(v-if='!isList')
18
-            SummaryBar(:is-tab='isPaired' :tab-content='card.summary')
19
-            TagList(v-if='!isPaired || isList')
20
-
21
-    article.xs12.w-flex.column.justify-space-between
22
-        AspectBar(
23
-            :key='aspect.name'
24
-            :labels='aspect.labels'
25
-            :percentage='aspect.percentage'
26
-            v-for='aspect in aspects'
27
-            v-if='!isPaired || isList'
28
-        )
29
-
30
-    footer(v-if='!isList && !isPaired')
31
-        .pa12
32
-            p {{ card.summary.about.tab }}
33
-        PairingButton(@pair='onPair' @pass='onPass' v-if='!isPaired')
34
-</template>
35
-
36
-<script setup>
37
-import { ref } from 'vue'
38
-import { useRouter } from 'vue-router'
39
-import {
40
-    updateQueueByProfileId,
41
-    postMembershipByProfileId,
42
-    currentProfile,
43
-} from '../services'
44
-
45
-import NamePlate from './NamePlate.vue'
46
-import AspectBar from './AspectBar.vue'
47
-import SummaryBar from './SummaryBar.vue'
48
-import TagList from './TagList.vue'
49
-import PairingButton from './PairingButton.vue'
50
-
51
-const router = useRouter()
52
-// const isPaired = ref(true)
53
-const isPaired = ref(false)
54
-
55
-const props = defineProps({
56
-    card: {
57
-        type: Object,
58
-        required: true,
59
-    },
60
-    aspects: {
61
-        type: Array,
62
-        required: true,
63
-    },
64
-    isList: {
65
-        type: Boolean,
66
-        required: false,
67
-        default: true,
68
-    },
69
-})
70
-
71
-/**
72
- * Attempt to pair with target profile
73
- * Creates a grouping, and a membership
74
- * for both profileId and targetId
75
- */
76
-const onPair = async () => {
77
-    const group = await postMembershipByProfileId({
78
-        profileId: currentProfile.id.value,
79
-        targetId: props.card.pid,
80
-    })
81
-    updateQueueByProfileId(currentProfile.id.value, props.card.pid, false)
82
-    currentProfile.getGroupings()
83
-    console.warn('created grouping:', group)
84
-
85
-    let goToRoute = { name: 'HomeView' }
86
-    // if (group.membershipMatch.hasMatch) {
87
-    //     goToRoute = { name: 'PairsView' }
88
-    // }
89
-    router.push(goToRoute)
90
-}
91
-
92
-/**
93
- * Send to the back of the matchQueue
94
- * and forward back home
95
- */
96
-const onPass = async () => {
97
-    updateQueueByProfileId(currentProfile.id.value, props.card.pid, true)
98
-    router.push({ name: 'HomeView' })
99
-}
100
-</script>
101
-
102
-<style lang="sass">
103
-.profile-card-list--card
104
-    background-color: #000
105
-    color: #fff
106
-    header > .w-button
107
-        background-color: #116006
108
-        color: #fff
109
-</style>

+ 9
- 9
frontend/src/components/ProfileCardList.vue 파일 보기

@@ -1,15 +1,15 @@
1 1
 <template lang="pug">
2 2
 section.profile-card-list.xs12.w-flex.column
3 3
     header.xs12.w-flex 
4
-        w-select(:items="['one', 'two', 'three']" outline) Label
5
-    
4
+        w-select(:items='["one", "two", "three"]' outline) Label
5
+
6 6
     article
7
-        ProfileCardItem.match-layout(
8
-            v-for="(card, i) in cards"
9
-            :key="`${card.pid}-${i}`"
10
-            :card="card"
11
-            :aspects="aspects"
12
-            :is-list="true"
7
+        ProfileCard.match-layout(
8
+            :aspects='aspects'
9
+            :card='card'
10
+            :is-list='true'
11
+            :key='`${card.pid}-${i}`'
12
+            v-for='(card, i) in cards'
13 13
         )
14 14
 </template>
15 15
 
@@ -21,7 +21,7 @@ import {
21 21
     postMembershipByProfileId,
22 22
     currentProfile,
23 23
 } from '../services'
24
-import ProfileCardItem from './ProfileCardItem.vue'
24
+import ProfileCard from './ProfileCard.vue'
25 25
 
26 26
 class Aspect {
27 27
     constructor({ name, labels, percentage = 50 }) {

Loading…
취소
저장