Merge branch 'pdf-templates' into 'master'

Reports Download on different OS

See merge request mohit.panjvani/crater-web!16
This commit is contained in:
Mohit Panjwani
2019-11-14 06:19:49 +00:00
15 changed files with 119 additions and 181018 deletions
+3 -59
View File
@@ -4636,57 +4636,6 @@ input[type=button].btn-block {
display: none;
}
.navbar-light .navbar-brand {
color: rgba(0, 0, 0, 0.9);
}
.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus {
color: rgba(0, 0, 0, 0.9);
}
.navbar-light .navbar-nav .nav-link {
color: rgba(0, 0, 0, 0.5);
}
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
color: rgba(0, 0, 0, 0.7);
}
.navbar-light .navbar-nav .nav-link.disabled {
color: rgba(0, 0, 0, 0.3);
}
.navbar-light .navbar-nav .show > .nav-link,
.navbar-light .navbar-nav .active > .nav-link,
.navbar-light .navbar-nav .nav-link.show,
.navbar-light .navbar-nav .nav-link.active {
color: rgba(0, 0, 0, 0.9);
}
.navbar-light .navbar-toggler {
color: rgba(0, 0, 0, 0.5);
border-color: rgba(0, 0, 0, 0.1);
}
.navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-light .navbar-text {
color: rgba(0, 0, 0, 0.5);
}
.navbar-light .navbar-text a {
color: rgba(0, 0, 0, 0.9);
}
.navbar-light .navbar-text a:hover,
.navbar-light .navbar-text a:focus {
color: rgba(0, 0, 0, 0.9);
}
.navbar-dark .navbar-brand {
color: #fff;
}
@@ -11504,10 +11453,6 @@ code,
align-items: center;
}
.swal-icon--custom {
height: 70px !important;
}
.site-header {
background-color: #5851D8;
height: 60px;
@@ -15112,10 +15057,6 @@ fieldset[disabled] .multiselect {
color: #FB7178;
}
.dashboard .dashboard-table .table-component .dashboard-recent-invoice-options .dropdown-container {
margin: 10px 5px 0 -75px;
}
.dashbox {
background-color: #fff;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
@@ -18325,6 +18266,8 @@ fieldset[disabled] .multiselect {
.customer-create .same-address-checkbox-container {
display: flex;
justify-content: flex-end;
padding-left: 12px;
margin-bottom: 1.5rem;
align-items: center;
justify-content: flex-end;
@@ -18375,6 +18318,7 @@ fieldset[disabled] .multiselect {
.customer-create .same-address-checkbox-container {
display: flex;
justify-content: flex-start;
padding-left: 15px;
margin-bottom: 0rem;
}
File diff suppressed because one or more lines are too long
-180945
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7 -1
View File
@@ -528,7 +528,8 @@ export default {
preferences: 'Preferences',
notifications: 'Notifications',
tax_types: 'Tax Types',
expense_category: 'Expense Categories'
expense_category: 'Expense Categories',
update_app: 'Update App'
},
title: 'Settings',
setting: 'Settings | Settings',
@@ -664,6 +665,11 @@ export default {
select_time_zone: 'select Time Zone',
select_date_formate: 'select Date Formate',
select_financial_year: 'select financial year'
},
update_app: {
title: 'Update App',
description: 'update app description',
update: 'Update'
}
},
wizard: {
+6
View File
@@ -72,6 +72,7 @@ import UserProfile from './views/settings/UserProfile.vue'
import TaxTypes from './views/settings/TaxTypes.vue'
import ExpenseCategory from './views/settings/ExpenseCategory.vue'
import MailConfig from './views/settings/MailConfig.vue'
import UpdateApp from './views/settings/UpdateApp.vue'
import Wizard from './views/wizard/Index.vue'
@@ -337,6 +338,11 @@ const routes = [
path: 'notifications',
name: 'notifications',
component: Notifications
},
{
path: 'update-app',
name: 'updateapp',
component: UpdateApp
}
]
}
@@ -196,7 +196,14 @@ export default {
return true
},
downloadReport () {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)
@@ -200,7 +200,14 @@ export default {
return true
},
downloadReport () {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)
@@ -238,7 +238,14 @@ export default {
return true
},
downloadReport () {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.getReportUrl + '&download=true')
}
setTimeout(() => {
if (this.selectedType === 'By Customer') {
this.url = `${this.customerSiteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
@@ -189,14 +189,21 @@ export default {
this.$v.formData.$touch()
if (this.$v.$invalid) {
return true
return false
}
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
return true
},
downloadReport () {
if (!this.getReports()) {
return false
}
if (navigator.appVersion.indexOf('Mac') !== -1) {
this.url += '&download=true'
} else {
window.open(this.url + '&download=true')
}
setTimeout(() => {
this.url = `${this.siteURL}?from_date=${moment(this.formData.from_date).format('DD/MM/YYYY')}&to_date=${moment(this.formData.to_date).format('DD/MM/YYYY')}`
}, 200)
@@ -0,0 +1,55 @@
<template>
<div class="setting-main-container">
<div class="card setting-card">
<div class="page-header">
<h3 class="page-title">{{ $t('settings.update_app.title') }}</h3>
<p class="page-sub-title">
{{ $t('settings.update_app.description') }}
</p>
<base-button size="large" icon="sync-alt" color="theme" @click="onUpdateApp">
{{ $t('settings.update_app.update') }}
</base-button>
<div v-if="isShowProgressBar" class="progress mt-4">
<div
:style="[{'width': progress+'%'}]"
class="progress-bar progress-bar-striped progress-bar-animated"
role="progressbar"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
/>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
isShowProgressBar: false,
progress: 10,
interval: null
}
},
watch: {
},
mounted () {
},
methods: {
onUpdateApp () {
this.isShowProgressBar = true
this.interval = setInterval(() => {
if (this.progress >= 100) {
clearInterval(this.interval)
setTimeout(() => {
this.isShowProgressBar = false
}, 1000)
}
this.progress += 10
}, 250)
}
}
}
</script>
@@ -74,6 +74,12 @@ export default {
title: 'settings.menu_title.notifications',
icon: 'bell',
iconType: 'far'
},
{
link: '/admin/settings/update-app',
title: 'settings.menu_title.update_app',
icon: 'sync-alt',
iconType: 'fas'
}
]
}
@@ -50,7 +50,8 @@ import {
faShare,
faEllipsisH,
faCopy,
faPaperPlane
faPaperPlane,
faSyncAlt
} from '@fortawesome/free-solid-svg-icons'
import { far } from '@fortawesome/free-regular-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
@@ -111,7 +112,8 @@ library.add(
faShare,
faEllipsisH,
faCopy,
faPaperPlane
faPaperPlane,
faSyncAlt
)
Vue.component('font-awesome-icon', FontAwesomeIcon)
+2 -2
View File
@@ -38,7 +38,7 @@
}
.filter-date {
flex: 1;
flex: 2;
display: flex;
margin-right: 40px;
align-items: center;
@@ -60,7 +60,7 @@
margin-top: 28px;
}
@media(max-width: $medium-breakpoint ) {
@media(max-width: $large-breakpoint ) {
.filter-container {
flex-direction: column;
}
+2 -2
View File
@@ -33,7 +33,7 @@
}
.filter-date {
flex: 1;
flex: 2;
display: flex;
margin-right: 40px;
align-items: center;
@@ -55,7 +55,7 @@
margin-top: 28px;
}
@media(max-width: $medium-breakpoint ) {
@media(max-width: $large-breakpoint ) {
.filter-container {
flex-direction: column;
}