Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.9.0 #341

Merged
merged 51 commits into from
Apr 23, 2024
Merged
Changes from 11 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
997891b
Added Vue full calendar
NuwanJ Nov 13, 2022
000e979
Full Calendar updates
NuwanJ Nov 13, 2022
abef7c1
Merge pull request #47 from cepdnaclk/milestone_3b
NuwanJ Nov 13, 2022
a9c92e8
Merge branch 'milestone_3b' of https://github.com/NuwanJ/smart-invent…
NuwanJ Nov 13, 2022
d88354d
Merge fixes
NuwanJ Nov 13, 2022
10f1c7b
A few merge issues were fixed
NuwanJ Nov 13, 2022
3a00ffc
Merge pull request #49 from NuwanJ/vue-full-calendar
NuwanJ Nov 13, 2022
6666fcc
Location checkbox updates
NuwanJ Nov 19, 2022
a167db1
Merge branch 'dev' of https://github.com/NuwanJ/smart-inventory-manag…
NuwanJ Nov 19, 2022
fdf541e
Announcements Basic Setup
NuwanJ Dec 6, 2022
e2dfa47
Discord Log Channel implementation
NuwanJ Dec 7, 2022
53f68a3
Merge pull request #52 from NuwanJ/331-discord-logs
NuwanJ Dec 7, 2022
5f398fa
Calendar Updates
NuwanJ Apr 8, 2023
bf8f3f5
Milestone 3B Merge fixes
NuwanJ Apr 8, 2023
3ffb0a8
Merge fix updates
NuwanJ Apr 8, 2023
60f4b48
Merge pull request #53 from NuwanJ/milestone_3b
NuwanJ Apr 8, 2023
07607b7
Merge pull request #314 from NuwanJ/dev
NuwanJ Apr 8, 2023
49819a1
Frontend view updates
NuwanJ Apr 29, 2023
8185cf9
Fix
NuwanJ Apr 29, 2023
330e2f4
Added Git pre-push unit testing
NuwanJ Apr 29, 2023
97190fc
Readme update
NuwanJ Apr 29, 2023
985ecde
Git CI pipeline updates
NuwanJ Apr 29, 2023
1e00e7a
Removed unused GUI test
NuwanJ Apr 29, 2023
23ab4eb
Dummy image
NuwanJ May 1, 2023
5259297
Backend UI updates
NuwanJ May 1, 2023
f17cd70
Merge pull request #54 from NuwanJ/308-frontend-UI-updates
NuwanJ May 1, 2023
7883923
Bug fix
NuwanJ May 1, 2023
6acd3cd
item_thumbnail.jpg update
NuwanJ May 1, 2023
3af2dcb
Merge pull request #315 from NuwanJ/dev
NuwanJ May 1, 2023
f22fbbc
Merge pull request #316 from cepdnaclk/308-frontend-UI-updates
NuwanJ May 1, 2023
cf0353d
Basic changes
NuwanJ May 1, 2023
1bd6cb0
Updating unit tests
NuwanJ May 1, 2023
883091b
Merge pull request #318 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 2, 2023
157790e
Merge branch 'cepdnaclk:main' into annoucements
NuwanJ May 3, 2023
7b84187
Merge pull request #57 from NuwanJ/dev
NuwanJ May 3, 2023
b505d06
Basic implementations
NuwanJ-RhinoPartners May 3, 2023
23fa866
Merge pull request #55 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 3, 2023
ee61291
Merge pull request #58 from NuwanJ/dev
NuwanJ May 3, 2023
7af1c43
Updated unit testings
NuwanJ-RhinoPartners May 3, 2023
baef827
Announcement display order updated
NuwanJ-RhinoPartners May 3, 2023
00ac2cf
Merge pull request #56 from NuwanJ/annoucements
NuwanJ May 3, 2023
e12202f
Merge pull request #320 from NuwanJ/dev
NuwanJ May 3, 2023
b0b87d5
Remove thumbURL delete logic
NuwanJ-RhinoPartners May 5, 2023
74ae3ea
Submit only the thumb parameter to deleteThumb()
NuwanJ-RhinoPartners May 5, 2023
e103742
Avaoid deleting the parent thumbnail when updating
NuwanJ May 5, 2023
ba1ba45
Fix
NuwanJ Jun 24, 2023
b310f92
Merge pull request #335 from cepdnaclk/334-bug-remove-location-from-t…
NuwanJ Jun 24, 2023
cde93ed
336 limit self registration only for the department students (#338)
NuwanJ Jun 29, 2023
677bb17
UI updates for alerts (#340)
NuwanJ Jun 29, 2023
954d2fe
Server changes
NuwanJ Apr 17, 2024
a41d8bd
Typo correction on Announcements
NuwanJ Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
5 changes: 0 additions & 5 deletions .run/Test.run.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test" type="PhpLocalRunConfigurationType" factoryName="PHP Console" path="$PROJECT_DIR$/artisan" scriptParameters="test">
<CommandLine>
<PhpTestInterpreterSettings>
<option name="interpreterName" value="PHP 7.4.9" />
</PhpTestInterpreterSettings>
</CommandLine>
<method v="2" />
</configuration>
</component>
14 changes: 14 additions & 0 deletions .tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "system"
},
"include": [
"resources/js/frontend/components/*"
],
"exclude": [
"node_modules"
],
"vueCompilerOptions": {
"target": "2.7"
}
}
8 changes: 4 additions & 4 deletions app/Http/Controllers/Backend/ConsumableItemController.php
Original file line number Diff line number Diff line change
@@ -103,7 +103,7 @@ public function edit(ConsumableItem $consumableItem)
return view('backend.consumable.items.edit', compact('types', 'consumableItem', 'locations'));
}

/**
/**
* Edit the locations ot the item
*
* @param EquipmentItem $equipmentItem
@@ -142,7 +142,7 @@ public function update(Request $request, ConsumableItem $consumableItem)
if ($request->thumb != null) {
$data['thumb'] = $this->uploadThumb($consumableItem->thumbURL(), $request->thumb, "consumable_items");
}

$filtered_data = $data;
unset($filtered_data['location']);
$consumableItem->update($filtered_data);
@@ -181,7 +181,7 @@ public function destroy(ConsumableItem $consumableItem)

// Delete location entries
$this_item_locations = ItemLocations::where('item_id', $consumableItem->inventoryCode())->get();
foreach($this_item_locations as $loc){
foreach ($this_item_locations as $loc) {
$loc->delete();
}
return redirect()->route('admin.consumable.items.index')->with('Success', 'Consumable was deleted !');
@@ -212,4 +212,4 @@ private function uploadThumb($currentURL, $newImage, $folder)

return $imageName;
}
}
}
9 changes: 5 additions & 4 deletions app/Http/Controllers/Backend/EquipmentItemController.php
Original file line number Diff line number Diff line change
@@ -185,7 +185,7 @@ public function update(Request $request, EquipmentItem $equipmentItem)
} catch (\Exception $ex) {
return abort(500);
}
}
}

/**
* Confirm to delete the specified resource from storage.
@@ -207,6 +207,7 @@ public function delete(EquipmentItem $equipmentItem)
*/
public function destroy(EquipmentItem $equipmentItem)
{

try {
// Delete the thumbnail form the file system
$this->deleteThumb($equipmentItem->thumbURL());
@@ -215,10 +216,10 @@ public function destroy(EquipmentItem $equipmentItem)

// delete location entries
$this_item_locations = ItemLocations::where('item_id', $equipmentItem->inventoryCode())->get();
foreach($this_item_locations as $loc){
foreach ($this_item_locations as $loc) {
$loc->delete();
}

return redirect()->route('admin.equipment.items.index')->with('Success', 'Equipment was deleted !');
} catch (\Exception $ex) {
return abort(500);
@@ -248,4 +249,4 @@ private function uploadThumb($currentURL, $newImage, $folder)

return $imageName;
}
}
}
10 changes: 6 additions & 4 deletions app/Http/Controllers/Frontend/CalendarController.php
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ public function index(Stations $station)
$events = [];

// Get all the reservations for that particular station

$bookings = Reservation::where('station_id', $station->id)->where('start_date', '>', Carbon::now()->subDays(8))->where('start_date', '>', Carbon::now()->subDays(8))->get();

foreach ($bookings as $booking) {
@@ -35,6 +36,7 @@ public function index(Stations $station)
} else {
$color = '#3E9CC2';
}

$userVar = User::find($booking->user_id);
$events[] = [
'id' => $booking->id,
@@ -45,7 +47,7 @@ public function index(Stations $station)
'auth' => $booking->user_id,
'color' => $color,
];
}
}

$today = date('Y-m-d H:i:s');
return view('frontend.calendar.index', ['events' => $events, 'station' => $station, 'userLoggedin' => $userLoggedin, 'today' => $today]);
@@ -72,7 +74,6 @@ public function list(Stations $station)

public function store(Request $request)
{

$station = Session::get('station');
$userLoggedin = auth()->user();

@@ -114,6 +115,7 @@ public function store(Request $request)
// it will be only executed in a web server.
// Environment can be setup in the .env file


if (App::environment(['local', 'staging'])) {
// dd('Not sending emails');
} else {
@@ -153,6 +155,7 @@ public function store(Request $request)
}



//**********mails****************

return response()->json([
@@ -205,7 +208,6 @@ public function update(Request $request, $id)
'end_date' => $request->end_date,
]);
return response()->json('Event updated');

// TODO: If the start end times changed, it will be better to send the users an email
// saying the time is changed (remind Google Calender events !)

@@ -238,4 +240,4 @@ public function destroy($id)

return $id;
}
}
}
1 change: 0 additions & 1 deletion app/Models/ConsumableItem.php
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@
use Spatie\Searchable\SearchResult;

class ConsumableItem extends Model implements Searchable

{
use HasFactory;

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
"@popperjs/core": "^2.11.5",
"alpinejs": "^2.3.5",
"axios": "^0.21.1",
"bootstrap": "5.0.2",
"bootstrap": "^5.0.2",
"cross-env": "^7.0",
"jquery": "^3.5.1",
"laravel-mix": "^6.0.28",
@@ -28,7 +28,7 @@
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"sweetalert2": "^9.8.2",
"vue": "^2.5.17",
"vue": "^2.7.14",
"vue-loader": "^15.9.5",
"vue-template-compiler": "^2.6.10"
},
@@ -41,9 +41,11 @@
"@fullcalendar/interaction": "^5.11.3",
"@fullcalendar/timegrid": "^5.11.3",
"@fullcalendar/vue": "^5.11.2",
"bootstrap-vue": "^2.23.1",
"bootstrap": "5.0.2",
"font-awesome": "^4.7.0",
"mix": "^0.0.1",
"moment": "^2.29.4",
"urix": "^0.1.0"
}
}
21 changes: 8 additions & 13 deletions resources/js/frontend/app.js
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@
* building robust, powerful web applications using Vue and Laravel.
*/

require("../bootstrap");
require("../plugins");
require('../bootstrap')
require('../plugins')

import Vue from "vue";
import Vue from 'vue'

/**
* The following block of code may be used to automatically register your
@@ -21,14 +21,9 @@ import Vue from "vue";
// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))

Vue.component(
"example-component",
require("./components/ExampleComponent.vue").default
);

Vue.component(
"fullcalendar-component",
require("./components/ScheduleCalendar.vue").default
);
'example-component',
require('./components/ExampleComponent.vue').default
)

/**
* Next, we will create a fresh Vue application instance and attach it to
@@ -37,5 +32,5 @@ Vue.component(
*/

const app = new Vue({
el: "#app",
});
el: '#app',
})
174 changes: 165 additions & 9 deletions resources/js/frontend/components/ScheduleCalendar.vue
Original file line number Diff line number Diff line change
@@ -32,10 +32,95 @@ export default {
});
});
},
createReservation(data){
// TODO: Create a reservation
console.log("create: ", data);
createReservation(event){
const moment = require('moment');
console.log("create: ", event);
const start_date = moment(event.startStr);
const end_date = moment(event.endStr);
const duration = moment.duration(end_date.diff(start_date)).asMinutes();
this.startTime = start_date.format("hh:mm A");
this.endTime = end_date.format("hh:mm A");
if (duration > this.maxSlotDuration){
alert(`Maximum scheduling duration is ${this.maxSlotDuration} minutes !`);
return false;
}
// TODO: Avoid some tmie intervals like Nights and Mornings
if (event.view.type == "timeGridWeek") {
this.$bvModal.show('schedule-modal')
}
// if ((view.name === 'agendaDay' || view.name === 'agendaWeek') && (!isAnOverlapEvent(start, end))) {
// $('#bookingModal').modal('toggle');
// $('#saveBtn').click(function () {
// var title = $('#title').val();
// var start_date = $.fullCalendar.formatDate(start, "YYYY-MM-DD HH:mm:ss");
// var end_date = $.fullCalendar.formatDate(end, "YYYY-MM-DD HH:mm:ss");
// var loggedIn = @json($userLoggedin);
// var user = loggedIn['email'];
// var begin = moment(start).format('YYYY-MM-DD');
// // console.log(start, end);
// console.log(start_date, end_date);
// // count hours
// const date1 = new Date(start_date);
// const date2 = new Date(end_date);
// var ms = date2.getTime() - date1.getTime();
// var d = moment.duration(ms);
// var m = d.asMinutes();
// const time_limit = 300;
// console.log(ms, d, m);
// // TODO: Validate the E Numbers
// //Send to the database
// if (m < time_limit) { //limit maximum time
// $.ajax({
// url: "{{ route('frontend.calendar.store') }}",
// type: "POST",
// dataType: 'json',
// data: { title, start_date, end_date, begin, m },
// success: function (response) {
// //fill the calendar when event is entered instantaneously
// $('#bookingModal').modal('hide')
// $('#calendar').fullCalendar('renderEvent', {
// 'title': response.title,
// 'start': response.start,
// 'end': response.end,
// 'color': response.color,
// 'auth': response.auth,
// });
// swal("Done!", "Event Created!", "success");
// // TODO: This is a temporary fix. Find a better way to this
// refreshPage();
// },
// error: function (error) {
// if (error.responseJSON.errors) {
// $('#titleError').html(error.responseJSON.errors.title);
// } else {
// $('#bookingModal').modal('hide')
// swal("Denied!", "Can not make multiple reservations in a day!", "warning");
// }
// console.log(error);
// },
// });
// } else {
// swal("Permission Denied!", "You can not exceed 4 hours!", "warning");
// }
// });
// }
},
deleteReservation(data){
console.log("delete: ", data);
@@ -63,11 +148,44 @@ export default {
updateReservation(data){
// TODO: Update event
console.log("update: ", data);
},
showModal() {
this.$refs['schedule-modal'].show()
},
hideModal() {
this.$refs[''].hide()
},
setupEvent(bvModalEvent){
console.log("Creating....");
const {startTime, endTime, eNumbers, description} = this;
axios.get('/sanctum/csrf-cookie').then(response => {
// console.log(response);
axios.post(`${this.baseURL}/reservations/${this.stationId}/`,
{ startTime, endTime, eNumbers, description })
.then(response => {
const data = response.data;
if (response.status == 200){
this.$bvModal.hide('schedule-modal');
console.log(data);
}else{
console.log(response.status, response.statusText);
}
});
});
}
},
data() {
return {
baseURL: '',
startTime: "",
endTime: "",
eNumbers: "",
description: "",
maxSlotDuration: 300,
calendarEvents: [],
calendarOptions: {
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
@@ -94,11 +212,7 @@ export default {
// dayClick: function (date, jsEvent, view) { },
// eventRender: function eventRender(event, element, view) { },
select: function (event) {
console.log("eventCreate: ", event);
},
select: this.createReservation,
eventResize: this.updateReservation,
eventDrop: this.updateReservation,
eventClick: this.deleteReservation,
@@ -113,6 +227,48 @@ export default {
<template>
<div>
Station: {{ stationId }}
<FullCalendar :options="calendarOptions" />
<FullCalendar :options="calendarOptions"/>

<div>
<b-modal id="schedule-modal" title="Create a schedule" centered @ok="setupEvent">
<b-form-group
id="inputGroup-startTime"
label="Schedule start at"
label-for="input_Start"
>
<b-form-input id="input_Start" v-model="startTime" readonly ></b-form-input>
</b-form-group>

<b-form-group
id="inputGroup-endTime"
label="Schedule end at"
label-for="input_End"
>
<b-form-input id="input_End" v-model="endTime" readonly ></b-form-input>
</b-form-group>

<b-form-group
id="inputGroup-Enumbers"
label="Enter your/your group members' E-numbers (comma separated)"
label-for="input_Enumbers"
description=""
>
<b-form-input id="input_Enumbers" v-model="eNumbers" placeholder="E/YY/XXX, E/YY/XXX, ..." required></b-form-input>
</b-form-group>
<b-form-group
id="inputGroup-Description"
label="Reservation description"
label-for="input_description"
description=""
>
<b-form-textarea
id="input_description"
v-model="description"
rows="3"
></b-form-textarea>
</b-form-group>
</b-modal>
</div>

</div>
</template>
50 changes: 50 additions & 0 deletions resources/views/backend/consumable/items/create.blade.php
Original file line number Diff line number Diff line change
@@ -49,6 +49,56 @@
@enderror
</div>
</div>
<!-- Location -->
<div class="form-group row">
{!! Form::label('location_label', 'Location*', ['class' => 'col-md-2 col-form-label']) !!}

<div class="col-md-4">
{!! Form::select('location', $locations, null, [
'class' => 'form-control',
'required' => true,
'placeholder' => '',
]) !!}
@error('location')
<strong>{{ $message }}</strong>
@enderror
</div>
</div>


{{-- <div class="form-group row"> --}}
{{-- <!-- Brand --> --}}
{{-- {!! Form::label('brand', 'Brand', ['class' => 'col-md-2 col-form-label']) !!} --}}

{{-- <div class="col-md-4"> --}}
{{-- {!! Form::text('brand', '', ['class'=>'form-control']) !!} --}}
{{-- @error('brand') --}}
{{-- <strong>{{ $message }}</strong> --}}
{{-- @enderror --}}
{{-- </div> --}}

{{-- <!-- Product Code --> --}}
{{-- {!! Form::label('productCode', 'Product Code', ['class' => 'col-md-2 col-form-label']) !!} --}}

{{-- <div class="col-md-4"> --}}
{{-- {!! Form::text('productCode', '', ['class'=>'form-control']) !!} --}}
{{-- @error('productCode') --}}
{{-- <strong>{{ $message }}</strong> --}}
{{-- @enderror --}}
{{-- </div> --}}
{{-- </div> --}}

{{-- <!-- Description --> --}}
{{-- <div class="form-group row"> --}}
{{-- {!! Form::label('description', 'Description', ['class' => 'col-md-2 col-form-label']) !!} --}}

{{-- <div class="col-md-10"> --}}
{{-- {!! Form::textarea('description', '', ['class'=>'form-control', 'rows'=>3 ]) !!} --}}
{{-- @error('description') --}}
{{-- <strong>{{ $message }}</strong> --}}
{{-- @enderror --}}
{{-- </div> --}}
{{-- </div> --}}

<!-- Specifications -->
<div class="form-group row">
1 change: 0 additions & 1 deletion resources/views/backend/consumable/items/edit.blade.php
Original file line number Diff line number Diff line change
@@ -49,7 +49,6 @@
@enderror
</div>
</div>

<!-- Specifications -->
<div class="form-group row">
{!! Form::label('specifications', 'Specifications', ['class' => 'col-md-2 col-form-label']) !!}
3 changes: 2 additions & 1 deletion resources/views/backend/consumable/items/index.blade.php
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
<x-slot name="headerActions">
<x-utils.link icon="c-icon cil-plus" class="card-header-action" :href="route('admin.consumable.items.create')" :text="__('Create Consumable')">
</x-utils.link>
<x-utils.link icon="c-icon cil-plus" class="card-header-action" :href="route('admin.consumable.items.create')" :text="__('Create Consumable')">
</x-utils.link>
</x-slot>
@endif

@@ -32,7 +34,6 @@
@endif

<livewire:backend.consumable-item-table />

</x-slot>
</x-backend.card>
</div>
1 change: 0 additions & 1 deletion resources/views/backend/equipment/items/index.blade.php
Original file line number Diff line number Diff line change
@@ -32,7 +32,6 @@
@endif

<livewire:backend.equipment-item-table />

</x-slot>

</x-backend.card>
76 changes: 33 additions & 43 deletions resources/views/backend/includes/sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<div class="c-sidebar c-sidebar-dark c-sidebar-fixed c-sidebar-lg-show" id="sidebar">
<div class="c-sidebar-brand d-lg-down-none">
<!-- <svg class="c-sidebar-brand-full" width="118" height="46" alt="CoreUI Logo">
<use xlink:href="{{ asset('img/brand/coreui.svg#full') }}"></use>
</svg>
<svg class="c-sidebar-brand-minimized" width="46" height="46" alt="CoreUI Logo">
<use xlink:href="{{ asset('img/brand/coreui.svg#signet') }}"></use>
</svg> -->
</div>
<!--c-sidebar-brand-->

@@ -9,13 +15,14 @@
icon="c-sidebar-nav-icon cil-speedometer" :text="__('Dashboard')"></x-utils.link>
</li>

@if ($logged_in_user->hasAllAccess() ||
($logged_in_user->can('admin.access.user.list') ||
$logged_in_user->can('admin.access.user.deactivate') ||
$logged_in_user->can('admin.access.user.reactivate') ||
$logged_in_user->can('admin.access.user.clear-session') ||
$logged_in_user->can('admin.access.user.impersonate') ||
$logged_in_user->can('admin.access.user.change-password')))
@if (
$logged_in_user->hasAllAccess() ||
($logged_in_user->can('admin.access.user.list') ||
$logged_in_user->can('admin.access.user.deactivate') ||
$logged_in_user->can('admin.access.user.reactivate') ||
$logged_in_user->can('admin.access.user.clear-session') ||
$logged_in_user->can('admin.access.user.impersonate') ||
$logged_in_user->can('admin.access.user.change-password')))
<li class="c-sidebar-nav-title">@lang('System')</li>

<li
@@ -24,13 +31,14 @@ class="c-sidebar-nav-dropdown {{ activeClass(Route::is('admin.auth.user.*') || R
:text="__('Access')"></x-utils.link>

<ul class="c-sidebar-nav-dropdown-items">
@if ($logged_in_user->hasAllAccess() ||
($logged_in_user->can('admin.access.user.list') ||
$logged_in_user->can('admin.access.user.deactivate') ||
$logged_in_user->can('admin.access.user.reactivate') ||
$logged_in_user->can('admin.access.user.clear-session') ||
$logged_in_user->can('admin.access.user.impersonate') ||
$logged_in_user->can('admin.access.user.change-password')))
@if (
$logged_in_user->hasAllAccess() ||
($logged_in_user->can('admin.access.user.list') ||
$logged_in_user->can('admin.access.user.deactivate') ||
$logged_in_user->can('admin.access.user.reactivate') ||
$logged_in_user->can('admin.access.user.clear-session') ||
$logged_in_user->can('admin.access.user.impersonate') ||
$logged_in_user->can('admin.access.user.change-password')))
<li class="c-sidebar-nav-item">
<x-utils.link :href="route('admin.auth.user.index')" class="c-sidebar-nav-link" :text="__('User Management')"
:active="activeClass(Route::is('admin.auth.user.*'), 'c-active')"></x-utils.link>
@@ -90,10 +98,13 @@ class="c-sidebar-nav-dropdown {{ activeClass(Route::is('admin.auth.user.*') || R
<li class="c-sidebar-nav-item">
<x-utils.link :href="route('admin.consumable.types.index')" class="c-sidebar-nav-link" :text="__('Types')"></x-utils.link>
</li>

</ul>
</li>
@endif



{{-- Fabrication Requests --}}
<li class="c-sidebar-nav-dropdown">
<x-utils.link href="#" icon="c-sidebar-nav-icon cil-list" class="c-sidebar-nav-dropdown-toggle"
@@ -129,53 +140,32 @@ class="c-sidebar-nav-dropdown {{ activeClass(Route::is('admin.auth.user.*') || R

{{-- Stations --}}
<li class="c-sidebar-nav-dropdown">
<x-utils.link
href="#"
icon="c-sidebar-nav-icon cil-list"
class="c-sidebar-nav-dropdown-toggle"
:text="__('Stations')"></x-utils.link>
<x-utils.link href="#" icon="c-sidebar-nav-icon cil-list" class="c-sidebar-nav-dropdown-toggle"
:text="__('Stations')"></x-utils.link>

<ul class="c-sidebar-nav-dropdown-items">


@if ($logged_in_user->isMaintainer() || $logged_in_user->isAdmin() || $logged_in_user->isTechOfficer())
<li class="c-sidebar-nav-item">
<x-utils.link
:href="route('admin.station.index')"
class="c-sidebar-nav-link"
:text="__('Stations')"></x-utils.link>
<x-utils.link :href="route('admin.station.index')" class="c-sidebar-nav-link" :text="__('Stations')"></x-utils.link>
</li>

<li class="c-sidebar-nav-item">
<x-utils.link
:href="route('admin.reservation.index')"
class="c-sidebar-nav-link"
:text="__('Reservations - Maintainer')"></x-utils.link>
<x-utils.link :href="route('admin.reservation.index')" class="c-sidebar-nav-link" :text="__('Reservations - Maintainer')"></x-utils.link>
</li>

<li class="c-sidebar-nav-item">
<x-utils.link
:href="route('frontend.reservation.index')"
class="c-sidebar-nav-link"
:text="__('Reservations - User')"></x-utils.link>
<x-utils.link :href="route('frontend.reservation.index')" class="c-sidebar-nav-link" :text="__('Reservations - User')"></x-utils.link>
</li>
@else

<li class="c-sidebar-nav-item">
<x-utils.link
:href="route('frontend.stations.list')"
class="c-sidebar-nav-link"
:text="__('Stations')"></x-utils.link>
<x-utils.link :href="route('frontend.stations.list')" class="c-sidebar-nav-link" :text="__('Stations')"></x-utils.link>
</li>

<li class="c-sidebar-nav-item">
<x-utils.link
:href="route('frontend.reservation.index')"
class="c-sidebar-nav-link"
:text="__('Reservations - User')"></x-utils.link>
<x-utils.link :href="route('frontend.reservation.index')" class="c-sidebar-nav-link" :text="__('Reservations - User')"></x-utils.link>
</li>


@endif

</ul>
4 changes: 0 additions & 4 deletions resources/views/backend/layouts/app.blade.php
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@
<link href="{{ mix('css/backend.css') }}" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"
integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
@@ -30,15 +29,12 @@
{{-- integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" --}}
{{-- crossorigin="anonymous"></script> --}}




<livewire:styles />
@stack('after-styles')
</head>

<body class="c-app">

@include('backend.includes.sidebar')

<div class="c-wrapper c-fixed-components">
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-utils.link class="c-subheader-nav-link" :href="route('admin.reservation.index')" :text="__('Reservations')" {{-- permission="admin.access.user.reactivate" --}}></x-utils.link>

<x-utils.link class="c-subheader-nav-link" :href="route('frontend.reservation.index')" :text="__('Reservations User')" {{-- permission="admin.access.user.reactivate" --}}></x-utils.link>

<x-utils.link class="c-subheader-nav-link" :href="route('frontend.reservation.index')" :text="__('Reservations User')" {{-- permission="admin.access.user.reactivate" --}}></x-utils.link>
41 changes: 40 additions & 1 deletion resources/views/backend/station/index.blade.php
Original file line number Diff line number Diff line change
@@ -31,7 +31,46 @@
</div>
@endif

<livewire:backend.stations-table />
<div class="container table-responsive pt-3">
<table class="table table-striped">
<tr>
<th>Station Name</th>
<th>Description</th>
<!-- <th>Thumbnail</th> -->
<th>Capacity</th>
<th>&nbsp;</th>
</tr>

@foreach ($station as $st)
<tr>
<td>{{ $st->stationName }}</td>
<td>{{ $st->description }}</td>
<!-- <td>{{ $st->thumb }}</td> -->
<td>{{ $st->capacity }}</td>
<td>

<div class="d-flex px-0 mt-0 mb-0">
<div class="btn-group" role="group" aria-label="Basic example">
<a href="{{ route('admin.station.show', $st) }}"
class="btn btn-secondary btn-xs"><i class="fa fa-eye" title="Show"></i>
</a>

<a href="{{ route('admin.station.edit', $st) }}" class="btn btn-info btn-xs"><i
class="fa fa-pencil" title="Edit"></i>
</a>
<a href="{{ route('admin.station.delete', $st) }}"
class="btn btn-danger btn-xs"><i class="fa fa-trash" title="Delete"></i>
</a>
</div>
</div>
</td>

</tr>
@endforeach
</table>

{{ $station->links() }}
</div>
</x-slot>
</x-backend.card>
</div>
1,009 changes: 695 additions & 314 deletions resources/views/frontend/calendar/index.blade.php

Large diffs are not rendered by default.

685 changes: 0 additions & 685 deletions routes.md

This file was deleted.

2 changes: 1 addition & 1 deletion routes/backend/consumables.php
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
->push(__('Consumables'), route('admin.consumable.index'));
});


//consumable Items --------------------------------------------------------------------

//Index
@@ -91,7 +92,6 @@
// Consumable Types -------------------------------------------------------------

// Index

Route::get('consumables/types', [ConsumableTypeController::class, 'index'])
->name('consumable.types.index')
->breadcrumbs(function (Trail $trail) {
13 changes: 12 additions & 1 deletion routes/frontend/reservations.php
Original file line number Diff line number Diff line change
@@ -21,6 +21,8 @@
->breadcrumbs(function (Trail $trail) {
$trail->parent('frontend.index')
->push(__('Reservations'));
$trail->parent('frontend.index')
->push(__('Reservations'));
});


@@ -33,6 +35,7 @@
});



// Edit
Route::get('/reservation/edit/{reservation}', [ReservationController::class, 'edit'])->name('reservation.edit')
->breadcrumbs(function (Trail $trail) {
@@ -43,7 +46,7 @@
// Update
Route::put('reservation/update/{reservation}', [ReservationController::class, 'update'])
->name('reservation.update');

// Delete
Route::get('reservation/delete/{reservation}', [ReservationController::class, 'delete'])
->name('reservation.delete')
@@ -54,6 +57,7 @@
});


// API Routes
// API Routes

// TODO: Move into /api/ routes
@@ -63,4 +67,11 @@
Route::patch('/{id}', [CalendarController::class, 'update'])->name('calendar.update');
Route::delete('/{id}', [CalendarController::class, 'destroy'])->name('calendar.destroy');
});
// TODO: Move into /api/ routes
Route::group(['prefix' => 'reservations'], function () {
Route::get('/{station}/', [CalendarController::class, 'list'])->name('calendar.list');
Route::post('/', [CalendarController::class, 'store'])->name('calendar.store');
Route::patch('/{id}', [CalendarController::class, 'update'])->name('calendar.update');
Route::delete('/{id}', [CalendarController::class, 'destroy'])->name('calendar.destroy');
});
});