Skip to content
This repository has been archived by the owner on Oct 12, 2020. It is now read-only.

Commit

Permalink
Merge Request system (#3)
Browse files Browse the repository at this point in the history
* Fix the request edit modal

> Course requests can't be upgraded.
> Fix the subfolder view bug in FolderRender
> Showing only the first layer of folders into Sidebar section

* Add sweetAlert2 and complete the delete action to course requests

> Adding sweetAlert2 library to show some nice popups
> Writing down all the requests to server to delete a course request

* Complete edit requests and User Request Panel

> Wrote all the requests to upgrade the PRSystem
> Completed the User Request Panel

* Design Admin PRSystem Panel

> Course requests and folder requests have been merged, but require filters, pagination and a good format.
> Designing panel as a collection of requests, every requests has a request label

* Format requests to PRSys admin panel

Formatting requests to PRSys admin panel, adding the following infos:
> User
> Course
> Folder (if set)
And adding those to the Request label.

* Edit UI-UX on PRSys Admin Panel

> shamelessly copyng the YouTube Filter style;
> Applyng filters on requests
> Getting rid of the old images in favor of brand new reactive icons!

* Finish filter section on PRSys Admin panel

* Implement pagination on PRSys admin panel

* Add 404 page

* Fix some issues and start to build request manager UI

Fixing the following issues:
> Materialize css has to re-init comps on 404-redirect
> clearing some minor bugs

* Design Request management UI

* Fetch data required to build PR System Interface

Fetch course, folder, user and building a nice UI

* Complete admin UI on PRSys and API calls

> Solving #issue-529602662
  • Loading branch information
LemuelPuglisi authored Dec 8, 2019
1 parent d736960 commit 30ea1c6
Show file tree
Hide file tree
Showing 28 changed files with 1,392 additions and 360 deletions.
376 changes: 238 additions & 138 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"vue": "^2.6.10",
"vue-pdf": "^4.0.7",
"vue-router": "^3.0.3",
"vue-sweetalert2": "^2.1.5",
"vuex": "^3.0.1"
},
"devDependencies": {
Expand Down
Binary file added src/assets/media/404bg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/media/no-content.gif
Binary file not shown.
Binary file added src/assets/media/no-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/media/unict-logo.png
Binary file not shown.
12 changes: 3 additions & 9 deletions src/components/main/CourseRender.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@

<div v-if="emptyCourse && course != null">
<div class="row">
<div class="offset-s1 col s10 ">
<div class="card">
<div class="card-image">
<img src="@/assets/media/no-content.gif" class="responsive-img" alt="">
</div>
<div class="card-content center align">
<p class="error-message"><i class="material-icons fixed-icon red-text">mood_bad</i> Il corso <b>{{course.name}}</b> sembra essere <span class="red-text">vuoto</span>! </p>
</div>
</div>
<div class="offset-m3 col s12 m6 center-align">
<img src="@/assets/media/no-content.png" class="responsive-img" alt="">
<p class="error-message"><i class="material-icons fixed-icon red-text">mood_bad</i> Il corso <b>{{course.name}}</b> sembra essere <span class="red-text">vuoto</span>! </p>
</div>
</div>
</div>
Expand Down
17 changes: 7 additions & 10 deletions src/components/main/FolderRender.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@

<div v-if="emptyFolder && folder != null">
<div class="row">
<div class="offset-s1 col s10 ">
<div class="card">
<div class="card-image">
<img src="@/assets/media/no-content.gif" class="responsive-img" alt="">
</div>
<div class="card-content center align">
<p class="error-message"><i class="material-icons fixed-icon red-text">mood_bad</i> Il corso <b>{{folder.display_name}}</b> sembra essere <span class="red-text">vuoto</span>! </p>
</div>
</div>
<div class="offset-m3 col s12 m6 center-align">
<img src="@/assets/media/no-content.png" class="responsive-img" alt="">
<p class="error-message"><i class="material-icons fixed-icon red-text">mood_bad</i> La cartella <b>{{folder.display_name}}</b> sembra essere <span class="red-text">vuota</span>! </p>
</div>
</div>
</div>
Expand Down Expand Up @@ -99,7 +93,10 @@ export default {
computed: {
emptyFolder: function() {
return this.content == null || this.content.length <= 0;
return (this.content == null ||
this.content.length < 1) &&
(this.subfolders == null ||
this.subfolders.length < 1)
},
files: function() {
Expand Down
10 changes: 9 additions & 1 deletion src/components/nav/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export default {
course.folders = null;
CoursesRepo.getFolders(course.id)
.then(result => {
course.folders = result.data.content;
let x = result.data.content
course.folders = this.getFirstLayer(x);
})
.catch(error => {
this.handleError(error)
Expand All @@ -121,6 +122,13 @@ export default {
goHome: function() {
this.$router.push({name: "cloud"})
},
getFirstLayer: function(folders) {
if (folders == null) return folders
return folders.filter(folder => {
return folder.subfolder_of == null
})
}
},
Expand Down
Loading

0 comments on commit 30ea1c6

Please sign in to comment.