View Index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<q-page class="flex flex-center"> | |
{{ monthsAgo }} | |
</q-page> | |
</template> | |
<script> | |
export default { | |
name: 'PageIndex', | |
mounted () { |
View TreeObject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ id: 1, name: "Elemento 1", parentId: null } |
View Component.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div>{{ lastLogin }} | |
</template> | |
<script> | |
export default { | |
computed: { | |
lastLogin () { | |
return this.$options.filters.formatDate(this.user.LastLogin) | |
} |
View Component.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div>{{ user.LastLogin | formatDate }}</div> | |
</template> |
View Filters.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vue.filter('formatDate', function(value) { | |
if (value) { | |
return moment(String(value)).format('DD/MM/YYYY hh:mm:ss') | |
} | |
return 'N/A'; | |
}); |
View StatisticController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Statistic; | |
class StatisticController extends Controller | |
{ | |
public function stats() { | |
$period = request('period'); | |
$statistics = Statistic::select('columns') |
View StatisticController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Statistic; | |
class StatisticController extends Controller | |
{ | |
public function stats() { | |
$period = request('period'); |
View posts.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="e3" style="width: 500px; max-width: 600px"> | |
<v-toolbar color="pink"> | |
<v-toolbar-side-icon></v-toolbar-side-icon> | |
<v-toolbar-title>Formulario de posts</v-toolbar-title> | |
<v-spacer></v-spacer> | |
</v-toolbar> | |
<v-card> |
View policy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "PublicReadGetObject", | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "*", | |
"Resource": "arn:aws:s3:::sls-course-dev/*" | |
} |
View upload.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
storageRef.child(`/products/${fileId}`).getDownloadURL().then(url => { | |
let product = firebase.firestore().collection('products').doc(id); | |
return product.update({ | |
url: url, | |
file_id: fileId | |
}); | |
}); |
NewerOlder