Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
mjvallone committed Oct 21, 2020
2 parents dfa1194 + 7ab34ce commit 1d6fa27
Show file tree
Hide file tree
Showing 23 changed files with 637 additions and 585 deletions.
9 changes: 9 additions & 0 deletions frontend/assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,12 @@ td.actions {
.ck-editor__editable {
min-height: 200px;
}

@media (max-width: 320px) {
/* date picker has a fixed width of 300px
for extra small screen size should be same as input width*/
.date-picker-width {
width: unset !important;
}

}
2 changes: 1 addition & 1 deletion frontend/src/components/balance-by-period-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container-fluid">
<table class="table table-hover">
<thead>
<tr class="row thead-light cursorPointer" @click="expanded = !expanded">
<tr class="row thead-light cursorPointer" @click.stop="expanded = !expanded">
<th v-if="groupedBy === 'sdg'" class="col-sm-12" scope="colgroup" colspan="4">{{$t(periodSummary.objectiveNameKey, periodSummary.objectiveNameKey)}}</th>
<th v-if="groupedBy !== 'sdg'" class="col-sm-12" scope="colgroup" colspan="4">{{$t(periodSummary.principleNameKey, periodSummary.principleNameKey)}}</th>
</tr>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/datepicker-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:typeable="typeable"
:disabled-dates="disabledDates"
:use-utc="true"
calendar-class="date-picker-width"
@selected="onDateSelected">
</datepicker>
<div v-if="error" class="invalid-feedback" :style="errorDivStyle">
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/filters-table-component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

<error-form :error="errorFilter" @clean="cleanError()"/>

<div class="mb-3">
<button type="submit" class="btn btn-warning">
<div class="d-flex flex-column flex-sm-row mb-3">
<button type="submit" class="btn btn-warning mb-3 mb-sm-0">
<i class="fa fa-filter"></i>
{{$t("apply")}}
</button>
<button type="button" class="btn btn-secondary" @click.stop="cleanFilters()">
<button type="button" class="btn btn-secondary ml-0 ml-sm-3" @click.stop="cleanFilters()">
<i class="fa fa-eraser"></i>
{{$t("clean")}}
</button>
Expand Down
69 changes: 18 additions & 51 deletions frontend/src/components/loader-overlay.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<template>
<div :class="[loading?'overlay':'']">
<h1 class="loading-text" v-bind:style="loading? '': 'display:none;'">{{$t('loading')}}</h1>
<!-- <slot/> -->
<div class="lds-roller" v-bind:style="loading?'left:40%;':'display:none;'">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<div v-if="loading" class="overlay d-flex justify-content-center align-items-center flex-column flex-sm-row ">
<div class="lds-roller">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<h1 class="loading-text">{{ $t('loading') }}</h1>
</div>
</template>

Expand All @@ -27,53 +26,21 @@

<style scoped>
.overlay{
width: 100%;
height:100%;
position:absolute;
width: 100%;
height:100%;
position:absolute;
top:0;
left: 0;
z-index: 1;
background-color: rgba(0,0,0,0.5);
}
.loading-text{
color:white;
position: fixed;
top: 50%;
left: 46%;
color:white;
z-index: 2;
}
/* .loading-text:after {
content: ' .';
animation: dots 1s steps(5, end) infinite;
}
@keyframes dots {
0%, 20% {
color: rgb(53, 182, 201);
text-shadow:
.25em 0 0 rgb(53, 182, 201),
.5em 0 0 rgb(53, 182, 201);}
40% {
color: white;
text-shadow:
.25em 0 0 rgb(53, 182, 201),
.5em 0 0 rgb(53, 182, 201);}
60% {
text-shadow:
.25em 0 0 white,
.5em 0 0 rgb(53, 182, 201);}
80%, 100% {
text-shadow:
.25em 0 0 white,
.5em 0 0 white}
} */
.lds-roller {
position: fixed;
top: 48%;
left: 40%;
display: inline-block;
width: 80px;
height: 80px;
z-index: 2;
Expand Down Expand Up @@ -156,5 +123,5 @@
100% {
transform: rotate(360deg);
}
}
}
</style>
38 changes: 38 additions & 0 deletions frontend/src/components/missing-data-empty-state.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div v-if="!hasPeriod || !hasActions" class="row">
<div class="col-sm-4"></div>
<div class="col-12 col-sm-4">
<div class="mx-auto">
<img src="images/Ilustracion_COOBS_home_01.png" class="w-100 img-fluid mb-3">
<div v-if="!hasPeriod" class="row justify-content-center">
<h1 class="h4 text-center mb-3">Aún no se ha creado ningun período</h1>
<button type="button" class="btn btn-primary mb-3 mb-sm-0" @click.stop="$router.go(-1)">
Crear un período
</button>
</div>
<div v-else class="row justify-content-center">
<h1 class="h4 text-center mb-3">Aún no se ha creado ninguna acción para el período seleccionado</h1>
<button type="button" class="btn btn-primary mb-3 mb-sm-0" @click.stop="$router.go(-1)">
Crear una acción
</button>
</div>
</div>
</div>
<div class="col-sm-4"></div>
</div>
</template>

<script>
export default {
props: {
hasPeriod: {
type: Boolean,
default: false
},
hasActions: {
type: Boolean,
default: false
}
}
}
</script>
34 changes: 15 additions & 19 deletions frontend/src/components/pagination-table-component.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
<template>
<div v-if="pagination && dataLength" class="row">
<div class="col-sm-12 col-md-5">
<div class="" role="status" aria-live="polite">
{{paginationMessage}}
</div>
<div v-if="pagination && dataLength" class="d-sm-flex justify-content-sm-between align-items-sm-center">
<div class="" role="status" aria-live="polite">
{{paginationMessage}}
</div>
<div class="col-sm-12 col-md-7">
<div class=" paging_simple_numbers">
<ul class="justify-content-end pagination">
<li class="paginate_button page-item previous" :class="{'disabled': !pagination.previous}">
<button class="page-link" @click="goPrevious()">{{$t('previous')}}</button>
</li>
<li v-for="pageNumber in pagination.numPages" :key="pageNumber" class="paginate_button page-item " :class="{'active': pageNumber === pagination.page}">
<button class="page-link" @click="goToPage(pageNumber)">{{pageNumber}}</button>
</li>
<li class="paginate_button page-item next" :class="{'disabled': !pagination.next}">
<button class="page-link" @click="goNext()">{{$t('next')}}</button>
</li>
</ul>
</div>
<div class=" paging_simple_numbers mt-3 mt-sm-0">
<ul class="justify-content-start justify-content-sm-end pagination my-sm-auto">
<li class="paginate_button page-item previous" :class="{'disabled': !pagination.previous}">
<button class="page-link" @click="goPrevious()">{{$t('previous')}}</button>
</li>
<li v-for="pageNumber in pagination.numPages" :key="pageNumber" class="paginate_button page-item " :class="{'active': pageNumber === pagination.page}">
<button class="page-link" @click="goToPage(pageNumber)">{{pageNumber}}</button>
</li>
<li class="paginate_button page-item next" :class="{'disabled': !pagination.next}">
<button class="page-link" @click="goNext()">{{$t('next')}}</button>
</li>
</ul>
</div>
</div>
</template>
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/components/simple-table.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
<template>
<div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr v-if="ordering.enabled">
<th :class="{'cursorPointer': header.sortEnabled}" v-for="header in headers" :key="header.key" @click="onSort(header.sortEnabled, header.key)">
{{ $t(header.value, header.value) }}<span v-if="header.key == ordering.by" :class="{'arrow': header.sortEnabled, [sortDirClass]: header.sortEnabled}"/>
<th class="text-truncate" :class="{'cursorPointer': header.sortEnabled, 'd-flex align-items-center': header.key == ordering.by && header.sortEnabled}" v-for="header in headers" :key="header.key" @click="onSort(header.sortEnabled, header.key)">
{{ $t(header.value, header.value) }}
<span v-if="header.key == ordering.by" :class="{'arrow': header.sortEnabled, [sortDirClass]: header.sortEnabled}"/>
</th>
<th>{{$t("actions")}}</th>
</tr>
<tr v-if="!ordering.enabled">
<th v-for="header in headers" :key="header.key">
<th class="text-truncate" v-for="header in headers" :key="header.key">
{{ $t(header.value, header.value) }}
</th>
<th>{{$t("actions")}}</th>
</tr>
</thead>
<tbody>
<tr v-for="elem in data" :key="elem.id">
<td class="cursor-pointer" v-for="header in headers" :key="header.key" v-html="parseElem(header, elem)"></td>
<td class="text-truncate cursor-pointer" v-for="header in headers" :key="header.key" v-html="parseElem(header, elem)"></td>
<td class="actions">
<button v-if="actions.edit && !elem.noActions" class="btn btn-primary" @click.stop="onEdit(elem)" :title="$t('edit')"><i class="fa fa-edit"></i></button>
<!-- <button v-if="actions.delete && !elem.noActions && actions.showViewButton" class="btn btn-success" @click.stop="onQuickView(elem)" :title="$t('quickView')"><i class="fa fa-eye"></i></button> FIXME no idea why it depends on delete-->
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/layouts/navbar-layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ul class="navbar-nav bg-gradient-info sidebar sidebar-dark accordion" :class="{'toggled': toggled}" data-toggle="collapse" id="accordionSidebar">
<!-- Sidebar - Brand -->
<router-link class="sidebar-brand d-flex align-items-center justify-content-center" :to="{name: 'dashboard'}" >
<div v-if="toggled" class="sidebar-brand-icon">
<div class="sidebar-brand-icon" :class="{'d-md-none': !toggled, 'd-none d-md-inline-block': toggled}">
<img src="images/bs.png" style="max-height: 45px;">
</div>
<div class="sidebar-brand-text mx-3">
Expand Down Expand Up @@ -98,12 +98,15 @@

<!-- Topbar -->
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
<h1 class="display-5">{{$store.state.cooperative.name || $store.state.cooperative.businessName}}</h1>
<h1 class="text-truncate d-none d-md-inline-block">{{$store.state.cooperative.name || $store.state.cooperative.businessName}}</h1>
<!-- Sidebar Toggle (Topbar) -->
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3" @click="toggled = !toggled">
<i class="fa fa-bars"></i>
</button>

<!-- Show smaller coop name and at right in mobile -->
<h4 class="text-truncate d-md-none">{{$store.state.cooperative.name || $store.state.cooperative.businessName}}</h4>

<!-- Topbar Navbar -->
<ul class="navbar-nav ml-auto">

Expand Down Expand Up @@ -145,7 +148,7 @@
<!-- End of Topbar -->

<!-- Begin Page Content -->
<div class="container-fluid">
<div>
<!-- In this slot will be the screen content of this layout -->
<slot name="page-content"></slot>
</div>
Expand Down
Loading

0 comments on commit 1d6fa27

Please sign in to comment.