diff --git a/app/App.vue b/app/App.vue
index 256145c..991a6d2 100644
--- a/app/App.vue
+++ b/app/App.vue
@@ -6,6 +6,8 @@
+
+
diff --git a/app/components/dashboardDay.vue b/app/components/dashboardDay.vue
new file mode 100644
index 0000000..4c16113
--- /dev/null
+++ b/app/components/dashboardDay.vue
@@ -0,0 +1,37 @@
+
+ div
+ h2 {{ day }}
+ hr
+ table
+ dashboard-RSVP-row(v-for="RSVPItem in RSVPItemsForDay", v-bind:eventTypes="eventTypes", v-bind:RSVPItem="RSVPItem")
+
+
+
+
+
diff --git a/app/components/dashboardRSVPRow.vue b/app/components/dashboardRSVPRow.vue
new file mode 100644
index 0000000..49d3cbc
--- /dev/null
+++ b/app/components/dashboardRSVPRow.vue
@@ -0,0 +1,52 @@
+
+ tr
+ td
+ color-span(v-bind:color="eventTypes[RSVPItem.eventTypeHash].color")
+ span {{ RSVPItem.startTime }} - {{ RSVPItem.endTime }}
+ td
+ template(v-for="(member, index) in RSVPItem.members")
+ template(v-if="index > 0")
+ | ,
+ a(v-bind:href="'mailto:' + member.email") {{ member.name }}
+ span {{ ' with you' }}
+ br
+ span
+ span {{ '(' }}
+ strong {{ eventTypes[RSVPItem.eventTypeHash].length }} minutes
+ span {{ ' meeting)' }}
+ td(v-if="RSVPItem.status", class="center")
+ strong(class="upper") {{ RSVPItem.status }}
+ td(v-else, class="center")
+ select
+ option(selected) {{ '-' }}
+ option {{ 'Accept' }}
+ option {{ 'Discard' }}
+
+
+
+
+
diff --git a/app/components/eventTypesNav.vue b/app/components/eventTypesNav.vue
index 95ab4c9..953d39d 100644
--- a/app/components/eventTypesNav.vue
+++ b/app/components/eventTypesNav.vue
@@ -3,7 +3,7 @@
ul
li(v-for="(eventType, hash) in eventTypes")
router-link(v-bind:to="{ name: 'publicView', params: { hash: hash } }")
- colorSpan(v-bind:color="eventType.color")
+ color-span(v-bind:color="eventType.color")
| New {{ eventType.length }} mins meeting
@@ -22,7 +22,12 @@
import colorSpan from './colorSpan.vue'
export default {
- props: ['eventTypes'],
+ props: {
+ eventTypes: {
+ type: Object,
+ required: true
+ }
+ },
components: {
colorSpan
}
diff --git a/app/components/publicDayPicker.vue b/app/components/publicDayPicker.vue
index aef4a50..b407f93 100644
--- a/app/components/publicDayPicker.vue
+++ b/app/components/publicDayPicker.vue
@@ -7,7 +7,7 @@
| {{ day }}
p
- em Times are in your computer local timezone.
+ em Times are in {{ timezone }} timezone.
diff --git a/app/components/publicSlotInfos.vue b/app/components/publicSlotInfos.vue
new file mode 100644
index 0000000..4260694
--- /dev/null
+++ b/app/components/publicSlotInfos.vue
@@ -0,0 +1,26 @@
+
+ div
+ p
+ | {{ slotInfo.day }} | {{ slotInfo.timeBegin }} - {{ slotInfo.timeEnd }}
+ br
+ em {{ timezone }}
+
+
+
diff --git a/app/components/publicSlotPicker.vue b/app/components/publicSlotPicker.vue
index 300b181..1c952f4 100644
--- a/app/components/publicSlotPicker.vue
+++ b/app/components/publicSlotPicker.vue
@@ -3,11 +3,11 @@
h2 Pick a slot
ul
li(v-for="slot in availableSlots")
- router-link(v-bind:to="{ name: 'publicSlotSelectedView', params: { hash: hash, day: day, slot: slot } }")
- | {{ slot }}
+ router-link(v-bind:to="{ name: 'publicContactInfosView', params: { hash: hash, day: day, timeBegin: slot.timeBegin, timeEnd: slot.timeEnd } }")
+ | {{ slot.timeBegin }} - {{ slot.timeEnd }}
p
- em Times are in your computer local timezone.
+ em Times are in {{ timezone }} timezone.
diff --git a/app/routes.js b/app/routes.js
index 0a65ebb..254cb27 100644
--- a/app/routes.js
+++ b/app/routes.js
@@ -1,4 +1,10 @@
-import { publicView, publicDaySelectionView, publicSlotSelectionView, publicSlotSelectedView, dashboardView } from './views'
+import {
+ publicView,
+ publicDaySelectionView,
+ publicSlotSelectionView,
+ publicContactInfosView,
+ publicSlotSelectedView,
+ dashboardView } from './views'
export default [
{
@@ -17,7 +23,12 @@ export default [
component: publicSlotSelectionView
},
{
- path: ':day/:slot',
+ path: ':day/:timeBegin/:timeEnd',
+ name: 'publicContactInfosView',
+ component: publicContactInfosView
+ },
+ {
+ path: ':day/:timeBegin/:timeEnd/done',
name: 'publicSlotSelectedView',
component: publicSlotSelectedView
}
diff --git a/app/styles/global.css b/app/styles/global.css
new file mode 100644
index 0000000..cdf5138
--- /dev/null
+++ b/app/styles/global.css
@@ -0,0 +1,22 @@
+body {
+ line-height: 1.5em
+}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0,0,0,0);
+ border: 0;
+}
+
+.upper {
+ text-transform: capitalize
+}
+
+.center {
+ text-align: center
+}
diff --git a/app/views/dashboardView.vue b/app/views/dashboardView.vue
index 37989d7..2277255 100644
--- a/app/views/dashboardView.vue
+++ b/app/views/dashboardView.vue
@@ -6,33 +6,9 @@
ul
li(v-for="(RSVPItemsForDay, day) in RSVPItems")
- h2 {{ day }}
- hr
- table
- tr(v-for="(RSVPItem, index) in RSVPItemsForDay")
- td
- colorSpan(v-bind:color="eventTypes[RSVPItem.eventTypeHash].color")
- span {{ RSVPItem.startTime }} - {{ RSVPItem.endTime }}
- td
- template(v-for="(member, index) in RSVPItem.members")
- template(v-if="index > 0")
- | ,
- a(v-bind:href="'mailto:' + member.email") {{ member.name }}
- span {{ ' with you' }}
- br
- span
- span {{ '(' }}
- strong {{ eventTypes[RSVPItem.eventTypeHash].length }} minutes
- span {{ ' meeting)' }}
- td(v-if="RSVPItem.status", class="center")
- strong(class="upper") {{ RSVPItem.status }}
- td(v-else, class="center")
- select
- option(selected) {{ '-' }}
- option {{ 'Accept' }}
- option {{ 'Discard' }}
- p
- em Times are in your computer local timezone.
+ dashboard-day(v-bind:day="day", v-bind:RSVPItemsForDay="RSVPItemsForDay", v-bind:eventTypes="eventTypes")
+ p
+ em Times are in {{ timezone }} timezone.
diff --git a/app/views/publicDaySelectionView.vue b/app/views/publicDaySelectionView.vue
index 299852b..32fa4c7 100644
--- a/app/views/publicDaySelectionView.vue
+++ b/app/views/publicDaySelectionView.vue
@@ -8,14 +8,6 @@ import publicDayPicker from '../components/publicDayPicker.vue'
export default {
data () {
return {
- eventType: {
- hash: "15toto",
- length: 15,
- color: "yellow"
- },
- owner: {
- name: "Phyks"
- },
availableSlotsPerDay: {
"06-11-2016": [
],
diff --git a/app/views/publicSlotSelectedView.vue b/app/views/publicSlotSelectedView.vue
index f9facf3..92a4859 100644
--- a/app/views/publicSlotSelectedView.vue
+++ b/app/views/publicSlotSelectedView.vue
@@ -1,3 +1,3 @@
- p TODO
+ p Slot successfully requested
diff --git a/app/views/publicSlotSelectionView.vue b/app/views/publicSlotSelectionView.vue
index 81c2286..55d4100 100644
--- a/app/views/publicSlotSelectionView.vue
+++ b/app/views/publicSlotSelectionView.vue
@@ -8,17 +8,12 @@ import publicSlotPicker from '../components/publicSlotPicker.vue'
export default {
data () {
return {
- eventType: {
- hash: "15toto",
- length: 15,
- color: "yellow"
- },
- owner: {
- name: "Phyks"
- },
availableSlotsPerDay: {
"06-11-2016": [
- "09:30 - 09:45"
+ {
+ timeBegin: "09:30",
+ timeEnd: "09:45"
+ }
],
"07-11-2016": [
],
diff --git a/app/views/publicView.vue b/app/views/publicView.vue
index b0d6630..831098a 100644
--- a/app/views/publicView.vue
+++ b/app/views/publicView.vue
@@ -1,7 +1,5 @@
div
- router-link() // TODO: History back
-
h1
color-span(v-bind:color="eventType.color")
| {{ eventType.length }} minutes meeting
@@ -9,6 +7,9 @@
a(v-bind:href="'mailto:' + owner.email") {{ owner.name }}
router-view
+
+ div(v-if="$route.name != 'publicSlotSelectedView'")
+ button(v-on:click="back") Back