Skip to content

Commit 23ad224

Browse files
committed
fix(events): rework application date display
1 parent 1a90444 commit 23ad224

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/views/events/List.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,13 @@
110110
<div class="content">
111111
<ul style="list-style-type: none; padding: 0; margin: 0">
112112
<li><span class="title is-4">{{ event.name }}</span></li>
113-
<li>
113+
<li style="display: flex; justify-content: space-between;">
114114
<span class="tag" :style="{ 'background-color': colors[event.type], color: '#FFFFFF' }">
115115
{{ eventTypesNames[event.type] }}
116116
</span>
117+
<span v-if="today.isBefore(event.application_starts)" class="tag is-warning">Apply after {{ event.application_starts | date }}</span>
118+
<span v-if="event.application_status === 'open'" class="tag is-success">Apply before {{ event.application_ends | date }}</span>
119+
<span v-if="today.isAfter(event.application_ends)" class="tag is-light">Applications are closed</span>
117120
</li>
118121
</ul>
119122

@@ -156,13 +159,10 @@
156159
<p class="control" v-if="event.status === 'published' && event.application_status === 'open'">
157160
<router-link
158161
:to="{ name: 'oms.events.apply', params: { id: event.url || event.id, application_id: 'me' } }"
159-
class="button is-warning">
160-
My application
162+
class="button is-success">
163+
Apply!
161164
</router-link>
162165
</p>
163-
<p class="control" v-else>
164-
<button class="button is-warning" disabled>My application</button>
165-
</p>
166166
</div>
167167
</div>
168168
</div>
@@ -227,6 +227,7 @@ export default {
227227
nwm: '#FBBA00',
228228
cultural: '#C51C13'
229229
},
230+
today: moment(),
230231
canLoadMore: true,
231232
source: null,
232233
can: {

0 commit comments

Comments
 (0)