Skip to content

Commit 25d98bc

Browse files
committed
etkinlikler tarihe gore siralandi
1 parent cb023c2 commit 25d98bc

9 files changed

Lines changed: 703 additions & 433 deletions

File tree

package-lock.json

Lines changed: 588 additions & 355 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,9 @@
6262
"> 1%",
6363
"last 2 versions",
6464
"not ie <= 8"
65-
]
65+
],
66+
"prettier":{
67+
"useTabs":true,
68+
"tabWidth": 4
69+
}
6670
}

src/components/SidebarPlugin/SideBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<div class="row">
6868
<div class="col-6 collapse-brand">
6969
<router-link to="/" class="navbar-brand">
70-
<img :src="logo"> WTM Sivas
70+
<img :src="logo"> Gdg Sivas
7171
</router-link>
7272
</div>
7373
<div class="col-6 collapse-close">

src/components/dateToString.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Date.prototype.customDate = function() {
2+
const months = [
3+
"Ocak",
4+
"Şubat",
5+
"Mart",
6+
"Nisan",
7+
"Mayıs",
8+
"Haziran",
9+
"Temmuz",
10+
"Ağustos",
11+
"Eylül",
12+
"Ekim",
13+
"Kasım",
14+
"Aralık",
15+
];
16+
return (
17+
this.getDate() + " " + months[this.getMonth()] + " " + this.getUTCFullYear()
18+
);
19+
};
20+
21+
Date.prototype.customTime = function() {
22+
return (
23+
this.getHours() + ":" + (this.getMinutes() == 0 ? "00" : this.getMinutes())
24+
);
25+
};

src/views/EventDetail.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
import {db} from "../db/firebase";
2222
2323
export default {
24-
name: 'programs',
24+
name: 'eventDetail',
2525
components: {
2626
ProgramsTable
2727
},
2828
firestore(){
2929
return {
30-
programs:db.collection("events").doc(this.$route.params.id).collection('programs')
30+
programs:db.collection("events").doc(this.$route.params.id).collection('programs').orderBy('time_start')
3131
}
3232
},
3333
data(){

src/views/Events.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
export default {
2222
name: 'events',
2323
firestore: {
24-
events: db.collection("events")
24+
events: db.collection("events").orderBy('date', 'asc')
2525
},
2626
components: {
2727
EventsTable

src/views/ProgramDetail.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="row align-items-center">
1313
<div class="col">
1414
<h3 class="mb-0">
15-
{{program.name}} <span class="badge badge-success">{{ program.time }}</span>
15+
{{program.name}} <span class="badge badge-success">{{ program.time_start.toDate().customTime() }} -{{ program.time_end.toDate().customTime() }} </span>
1616
</h3>
1717
<p>{{program.content}}</p>
1818
</div>
@@ -38,6 +38,7 @@
3838
</template>
3939
<script>
4040
import {db} from "../db/firebase";
41+
require ("../../src/components/dateToString")
4142
4243
export default {
4344
name: 'program-detail',

src/views/Tables/EventsTable.vue

Lines changed: 64 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,78 @@
11
<template>
2-
<div class="card shadow">
3-
<div class="card-header border-0">
4-
<div class="row align-items-center">
5-
<div class="col">
6-
<h3 class="mb-0">
7-
{{ title }}
8-
</h3>
9-
</div>
10-
</div>
11-
</div>
12-
<div class="table-responsive">
13-
<base-table
14-
class="table align-items-center table-flush"
15-
tbody-classes="list"
16-
:data="tableData"
17-
:activeRow="activeRow"
18-
>
19-
<template slot-scope="{ row }">
20-
<td @click="goToEvent(row.id)">
21-
<div class="media align-items-center">
22-
<a href="#" class="avatar rounded-circle mr-3">
23-
<img alt="Image" :src="row.imgUrl" />
24-
</a>
25-
<div class="media-body">
26-
<span class="name mb-0 text-sm">{{ row.name }}</span>
27-
<p class="place">{{ row.place }}</p>
28-
<span>{{ row.date }}</span>
29-
</div>
30-
</div>
31-
</td>
32-
</template>
33-
</base-table>
34-
</div>
35-
</div>
2+
<div class="card shadow">
3+
<div class="card-header border-0">
4+
<div class="row align-items-center">
5+
<div class="col">
6+
<h3 class="mb-0">
7+
{{ title }}
8+
</h3>
9+
</div>
10+
</div>
11+
</div>
12+
<div class="table-responsive">
13+
<base-table
14+
class="table align-items-center table-flush"
15+
tbody-classes="list"
16+
:data="tableData"
17+
:activeRow="activeRow"
18+
>
19+
<template slot-scope="{ row }">
20+
<td @click="goToEvent(row.id)">
21+
<div class="media align-items-center">
22+
<a href="#" class="avatar rounded-circle mr-3">
23+
<img alt="Image" : src="row.imgUrl" />
24+
</a>
25+
<div class="media-body">
26+
<span class="name mb-0 text-sm">{{
27+
row.name
28+
}}</span>
29+
<p class="place">{{ row.place }}</p>
30+
<span>{{
31+
row.date.toDate().customDate()
32+
}}</span>
33+
</div>
34+
</div>
35+
</td>
36+
</template>
37+
</base-table>
38+
</div>
39+
</div>
3640
</template>
3741
<script>
42+
require("../../components/dateToString");
3843
export default {
39-
name: "events-table",
40-
props: {
41-
type: {
42-
type: String
43-
},
44-
title: String,
45-
tableData: Array,
46-
activeRow: Number
47-
},
48-
methods: {
49-
goToEvent(id) {
50-
this.$router.push({
51-
name: "eventDetail",
52-
params: { id }
53-
});
54-
}
55-
}
44+
name: "events-table",
45+
props: {
46+
type: {
47+
type: String
48+
},
49+
title: String,
50+
tableData: Array,
51+
activeRow: Number
52+
},
53+
methods: {
54+
goToEvent(id) {
55+
this.$router.push({
56+
name: "eventDetail",
57+
params: { id }
58+
});
59+
}
60+
}
5661
};
5762
</script>
5863
<style>
5964
tr:hover {
60-
background-color: #2dce88c9;
65+
background-color: #2dce88c9;
6166
}
6267
.place {
63-
color: #808080d6;
64-
font-size: 13px !important;
65-
font-weight: 600;
66-
letter-spacing: 0.5px;
68+
color: #808080d6;
69+
font-size: 13px !important;
70+
font-weight: 600;
71+
letter-spacing: 0.5px;
6772
}
6873
.name {
69-
font-size: 18px !important;
70-
font-weight: bold;
71-
color: gray;
74+
font-size: 18px !important;
75+
font-weight: bold;
76+
color: gray;
7277
}
7378
</style>

src/views/Tables/ProgramsTable.vue

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="row align-items-center">
55
<div class="col">
66
<h3 class="mb-0">
7-
{{title}}
7+
{{ title }}
88
</h3>
99
</div>
1010
</div>
@@ -17,15 +17,16 @@
1717
:activeRow="activeRow"
1818
>
1919
<template slot-scope="{ row }">
20-
<td @click="goToProgram($route.params.id,row.id)">
20+
<td @click="goToProgram($route.params.id, row.id)">
2121
<div class="media align-items-center">
2222
<a href="#" class="avatar rounded-circle mr-3">
23-
<img alt="Program Image" :src="row.imgUrl"/>
23+
<img alt="Program Image" :src="row.imgUrl" />
2424
</a>
2525
<div class="media-body">
2626
<span class="name mb-0 text-sm">{{ row.name }}</span>
2727
<p class="speaker-name">{{ row.speaker.name }}</p>
28-
{{ row.time }}
28+
{{ row.time_start.toDate().customTime() }} -
29+
{{ row.time_end.toDate().customTime() }}
2930
</div>
3031
</div>
3132
</td>
@@ -35,24 +36,25 @@
3536
</div>
3637
</template>
3738
<script>
39+
require("../../components/dateToString");
3840
export default {
3941
name: "programs-table",
40-
methods:{
41-
goToProgram(eventID,programID){
42+
methods: {
43+
goToProgram(eventID, programID) {
4244
this.$router.push({
43-
name:'programDetail',
44-
params:{eventID,programID},
45+
name: "programDetail",
46+
params: { eventID, programID },
4547
});
46-
}
48+
},
4749
},
4850
props: {
4951
type: {
50-
type: String
52+
type: String,
5153
},
5254
title: String,
53-
tableData:Array,
54-
activeRow:Number,
55-
}
55+
tableData: Array,
56+
activeRow: Number,
57+
},
5658
};
5759
</script>
5860
<style>

0 commit comments

Comments
 (0)