Browse Source
Update 2016-12-20.22.23
Update 2016-12-20.22.23
Add vendor_id to subscriptions table Add Event is_allday to user_events table Add logfiles viewer for adminpull/1/head
29 changed files with 380 additions and 74 deletions
-
5app/Entities/BaseRepository.php
-
5app/Entities/Payments/Payment.php
-
5app/Entities/Subscriptions/Subscription.php
-
2app/Http/Controllers/Api/EventsController.php
-
6app/Http/Controllers/SubscriptionsController.php
-
2app/Http/Middleware/Authenticate.php
-
2app/Http/Middleware/RoleMiddleware.php
-
1config/app.php
-
15database/factories/ModelFactory.php
-
1resources/lang/id/subscription.php
-
2resources/views/auth/login.blade.php
-
2resources/views/layouts/guest.blade.php
-
4resources/views/payments/index.blade.php
-
8resources/views/projects/features-export-html.blade.php
-
2resources/views/projects/payments.blade.php
-
53resources/views/reports/log-files.blade.php
-
1resources/views/subscriptions/create.blade.php
-
1resources/views/subscriptions/edit.blade.php
-
9resources/views/subscriptions/index.blade.php
-
197resources/views/users/calendar-vue.blade.php
-
32resources/views/users/calendar.blade.php
-
2routes/web/account.php
-
13routes/web/calendar.php
-
28routes/web/reports.php
-
1tests/api/ApiEventsTest.php
-
8tests/auth/MemberChangePasswordTest.php
-
24tests/auth/MemberRegistrationAndLoginTest.php
-
7tests/auth/MemberResetPasswordTest.php
-
16tests/functional/ManageSubscriptionsTest.php
@ -0,0 +1,53 @@ |
|||
@extends('layouts.app') |
|||
|
|||
@section('title','Log Files') |
|||
|
|||
@section('content') |
|||
<h3 class="page-header"> |
|||
Log Files |
|||
</h3> |
|||
<div class="row"> |
|||
<div class="col-md-8"> |
|||
<div class="panel panel-default"> |
|||
<table class="table table-condensed"> |
|||
<thead> |
|||
<th>#</th>
|
|||
<th>Nama File</th> |
|||
<th>Ukuran</th> |
|||
<th>Tanggal Jam</th> |
|||
<th>{{ trans('app.action') }}</th> |
|||
</thead> |
|||
<tbody> |
|||
@forelse($logFiles as $key => $logFile) |
|||
<tr> |
|||
<td>{{ $key + 1 }}</td> |
|||
<td>{{ $logFile->getFilename() }}</td> |
|||
<td>{{ formatSizeUnits($logFile->getSize()) }}</td> |
|||
<td>{{ date('Y-m-d H:i:s', $logFile->getMTime()) }}</td> |
|||
<td> |
|||
{!! html_link_to_route('log-files.download','',[$logFile->getFilename()],[ |
|||
'class'=>'btn btn-default btn-xs', |
|||
'icon' => 'download', |
|||
'id' => 'download-' . $logFile->getFilename(), |
|||
'title' => 'Download file ' . $logFile->getFilename() |
|||
]) !!} |
|||
{!! html_link_to_route('log-files.show','',[$logFile->getFilename()],[ |
|||
'class'=>'btn btn-default btn-xs', |
|||
'icon' => 'search', |
|||
'id' => 'view-' . $logFile->getFilename(), |
|||
'title' => 'View file ' . $logFile->getFilename(), |
|||
'target' => '_blank', |
|||
]) !!} |
|||
</td> |
|||
</tr> |
|||
@empty |
|||
<tr> |
|||
<td colspan="3">Belum ada file logFile</td> |
|||
</tr> |
|||
@endforelse |
|||
</tbody> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@endsection |
|||
@ -0,0 +1,197 @@ |
|||
@extends('layouts.app') |
|||
|
|||
@section('title', 'Safety Calendar') |
|||
|
|||
@section('content') |
|||
|
|||
<div class=""> |
|||
<div class="row"> |
|||
<div class="col-md-12"> |
|||
<div class="x_panel"> |
|||
<div class="x_title"><h3>Safety Calendar <small>Click to add/edit events</small></h3></div> |
|||
<div class="x_content"> |
|||
<div id='calendar'> |
|||
<div id="app" class="wrapper"> |
|||
<calendar :events="events" :editable="true"></calendar> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
@endsection |
|||
|
|||
@section('ext_css') |
|||
{!! Html::style(url('assets/css/plugins/fullcalendar.min.css')) !!} |
|||
@endsection |
|||
|
|||
@section('ext_js') |
|||
{!! Html::script(url('assets/js/plugins/moment.min.js')) !!} |
|||
{!! Html::script(url('assets/js/plugins/fullcalendar.min.js')) !!} |
|||
{!! Html::script(url('assets/js/plugins/vue.min.js')) !!} |
|||
{!! Html::script(url('assets/js/plugins/vue-resource.min.js')) !!} |
|||
@endsection |
|||
|
|||
@section('script') |
|||
<script> |
|||
Vue.component('calendar', { |
|||
template: '<div></div>', |
|||
|
|||
props: { |
|||
events: { |
|||
type: Array, |
|||
required: true |
|||
}, |
|||
|
|||
editable: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
|
|||
droppable: { |
|||
type: Boolean, |
|||
required: false, |
|||
default: false |
|||
}, |
|||
}, |
|||
|
|||
data: function() |
|||
{ |
|||
return { |
|||
cal: null |
|||
} |
|||
}, |
|||
|
|||
ready: function() |
|||
{ |
|||
var self = this; |
|||
self.cal = $(self.$el); |
|||
|
|||
var args = { |
|||
lang: 'en', |
|||
header: { |
|||
left: 'prev,next today', |
|||
center: 'title', |
|||
right: 'month,agendaWeek,agendaDay' |
|||
}, |
|||
height: "auto", |
|||
// allDaySlot: false,
|
|||
slotEventOverlap: false, |
|||
timeFormat: 'HH:mm', |
|||
|
|||
// events: self.events,
|
|||
|
|||
dayClick: function(date, data) |
|||
{ |
|||
self.$dispatch('day::clicked', date, data); |
|||
}, |
|||
|
|||
eventClick: function(event) |
|||
{ |
|||
self.$dispatch('event::clicked', event); |
|||
} |
|||
} |
|||
|
|||
if (self.editable) |
|||
{ |
|||
args.editable = true; |
|||
args.eventResize = function(event) |
|||
{ |
|||
self.$dispatch('event::resized', event); |
|||
} |
|||
|
|||
args.eventDrop = function(event) |
|||
{ |
|||
self.$dispatch('event::dropped', event); |
|||
} |
|||
} |
|||
|
|||
if (self.droppable) |
|||
{ |
|||
args.droppable = true; |
|||
args.eventReceive = function(event) |
|||
{ |
|||
self.$dispatch('event::received', event); |
|||
} |
|||
} |
|||
|
|||
this.cal.fullCalendar(args); |
|||
|
|||
} |
|||
|
|||
}) |
|||
|
|||
new Vue({ |
|||
el: '#calendar', |
|||
|
|||
data: { |
|||
events: { |
|||
url: "{{ route('api.events.index') }}", |
|||
type: "GET", |
|||
error: function() { |
|||
alert('there was an error while fetching events!'); |
|||
} |
|||
} |
|||
}, |
|||
|
|||
events: { |
|||
'day::clicked': function(date, data) |
|||
{ |
|||
// var title = prompt('Event Title:', event.title, { buttons: { Ok: true, Cancel: false} });
|
|||
console.log(data); |
|||
|
|||
var title = event.title; |
|||
// var start = event.start.format("YYYY-MM-DD[T]HH:mm:SS");
|
|||
var start = event.start; |
|||
// $.ajax({
|
|||
// url: 'process.php',
|
|||
// data: 'type=new&title='+title+'&startdate='+start+'&zone='+zone,
|
|||
// type: 'POST',
|
|||
// dataType: 'json',
|
|||
// success: function(response){
|
|||
// event.id = response.eventid;
|
|||
// $('#calendar').fullCalendar('updateEvent',event);
|
|||
// },
|
|||
// error: function(e){
|
|||
// console.log(e.responseText);
|
|||
|
|||
// }
|
|||
// });
|
|||
$('#calendar').fullCalendar('updateEvent',event); |
|||
// console.log(event);
|
|||
console.log(date); |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
fetchEvents: function() { |
|||
Vue.http.headers.common['Authorization'] = 'Bearer ' + "{{ auth()->user()->api_token }}"; |
|||
// this.$http.get("{{ route('api.events.index') }}", function(data) {
|
|||
// console.log(data);
|
|||
// console.log([
|
|||
// {
|
|||
// title: 'Event1',
|
|||
// start: '2016-11-10',
|
|||
// },
|
|||
// {
|
|||
// title: 'Event2',
|
|||
// start: '2016-11-07',
|
|||
// }
|
|||
// ]);
|
|||
// this.$set('events', data);
|
|||
// this.events = data;
|
|||
// });
|
|||
} |
|||
}, |
|||
|
|||
ready: function() { |
|||
this.fetchEvents(); |
|||
} |
|||
}) |
|||
|
|||
|
|||
</script> |
|||
@endsection |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue