Merge pull request #2433 from CihanSenturk/payment-modal

Payment modal position
This commit is contained in:
Denis Duliçi 2022-06-07 18:05:58 +03:00 committed by GitHub
commit b75be6f7a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 13 deletions

View File

@ -1,8 +1,8 @@
<template> <template>
<SlideYUpTransition :duration="animationDuration"> <SlideYUpTransition :duration="animationDuration">
<div class="modal fade w-full h-full fixed top-0 left-0 right-0 z-50 overflow-y-auto overflow-hidden modal-add-new fade items-center justify-center" <div class="modal fade w-full h-full fixed top-0 left-0 right-0 z-50 overflow-y-auto overflow-hidden modal-add-new fade justify-center"
@click.self="closeModal" @click.self="closeModal"
:class="[{'show flex flex-wrap modal-background': show}, {'hidden': !show}]" :class="[modalPositionTop ? 'items-start' : 'items-center', {'show flex flex-wrap modal-background': show}, {'hidden': !show}]"
v-show="show" v-show="show"
tabindex="-1" tabindex="-1"
role="dialog" role="dialog"
@ -103,6 +103,11 @@ export default {
default: 800, default: 800,
description: "Modal transition duration" description: "Modal transition duration"
}, },
modalPositionTop: {
type: Boolean,
default: false,
description: "Modal Body position Class"
},
}, },
data() { data() {

View File

@ -1,8 +1,8 @@
<template> <template>
<SlideYUpTransition :duration="animationDuration"> <SlideYUpTransition :duration="animationDuration">
<div class="modal w-full h-full fixed top-0 left-0 right-0 z-50 overflow-y-auto overflow-hidden modal-add-new fade items-center justify-center" <div class="modal w-full h-full fixed top-0 left-0 right-0 z-50 overflow-y-auto overflow-hidden modal-add-new fade justify-center"
@click.self="closeModal" @click.self="closeModal"
:class="[{'show flex flex-wrap modal-background': show}, {'hidden': !show}]" :class="[modalPositionTop ? 'items-start' : 'items-center', {'show flex flex-wrap modal-background': show}, {'hidden': !show}]"
v-show="show" v-show="show"
tabindex="-1" tabindex="-1"
role="dialog" role="dialog"
@ -91,19 +91,16 @@ export default {
props: { props: {
show: Boolean, show: Boolean,
is_component: Boolean, is_component: Boolean,
title: { title: {
type: String, type: String,
default: '', default: '',
description: "Modal header title" description: "Modal header title"
}, },
message: { message: {
type: String, type: String,
default: '', default: '',
description: "Modal body message" description: "Modal body message"
}, },
buttons: { buttons: {
type: Object, type: Object,
default: function () { default: function () {
@ -120,18 +117,21 @@ export default {
}, },
description: "Modal footer button" description: "Modal footer button"
}, },
animationDuration: { animationDuration: {
type: Number, type: Number,
default: 800, default: 800,
description: "Modal transition duration" description: "Modal transition duration"
}, },
modalDialogClass: { modalDialogClass: {
type: String, type: String,
default: '', default: '',
description: "Modal Body size Class" description: "Modal Body size Class"
}, },
modalPositionTop: {
type: Boolean,
default: false,
description: "Modal Body position Class"
},
}, },
data() { data() {

View File

@ -585,7 +585,7 @@ const app = new Vue({
this.component = Vue.component('add-new-component', (resolve, reject) => { this.component = Vue.component('add-new-component', (resolve, reject) => {
resolve({ resolve({
template: '<div id="dynamic-payment-component"><akaunting-modal-add-new modal-dialog-class="max-w-md" :show="payment.modal" @submit="onSubmit" @cancel="onCancel" :buttons="payment.buttons" :title="payment.title" :is_component=true :message="payment.html"></akaunting-modal-add-new></div>', template: '<div id="dynamic-payment-component"><akaunting-modal-add-new modal-dialog-class="max-w-md" modal-position-top :show="payment.modal" @submit="onSubmit" @cancel="onCancel" :buttons="payment.buttons" :title="payment.title" :is_component=true :message="payment.html"></akaunting-modal-add-new></div>',
mixins: [ mixins: [
Global Global
@ -703,7 +703,7 @@ const app = new Vue({
this.component = Vue.component('add-new-component', (resolve, reject) => { this.component = Vue.component('add-new-component', (resolve, reject) => {
resolve({ resolve({
template: '<div id="dynamic-payment-component"><akaunting-modal-add-new modal-dialog-class="max-w-screen-lg" :show="payment.modal" @submit="onSubmit" @cancel="onCancel" :buttons="payment.buttons" :title="payment.title" :is_component=true :message="payment.html"></akaunting-modal-add-new></div>', template: '<div id="dynamic-payment-component"><akaunting-modal-add-new modal-dialog-class="max-w-md" modal-position-top :show="payment.modal" @submit="onSubmit" @cancel="onCancel" :buttons="payment.buttons" :title="payment.title" :is_component=true :message="payment.html"></akaunting-modal-add-new></div>',
mixins: [ mixins: [
Global Global

View File

@ -52,7 +52,7 @@
<div id="tab-other" data-tabs-content="other" x-show="active === 'other'"> <div id="tab-other" data-tabs-content="other" x-show="active === 'other'">
<div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5"> <div class="grid sm:grid-cols-6 gap-x-8 gap-y-6 my-3.5">
<x-form.group.textarea name="description" label="{{ trans('general.description') }}" rows="3" not-required form-group-class="col-span-6" /> <x-form.group.textarea name="description" label="{{ trans('general.description') }}" rows="2" not-required form-group-class="col-span-6" />
<x-form.group.text name="number" label="{{ trans_choice('general.numbers', 1) }}" value="{{ $number }}" form-group-class="col-span-6" /> <x-form.group.text name="number" label="{{ trans_choice('general.numbers', 1) }}" value="{{ $number }}" form-group-class="col-span-6" />