Merge branch 'master' of https://github.com/brkcvn/akaunting into form-elements
This commit is contained in:
@ -385,12 +385,11 @@ export default {
|
||||
},
|
||||
|
||||
onOptionSelected(value) {
|
||||
this.show_icon = false;
|
||||
this.current_value = value;
|
||||
this.range = false;
|
||||
|
||||
this.dynamicPlaceholder = this.selectPlaceholder;
|
||||
|
||||
this.onChangeSearchAndFilterText(this.selectPlaceholder, false);
|
||||
|
||||
let option = false;
|
||||
let option_url = false;
|
||||
|
||||
@ -522,7 +521,7 @@ export default {
|
||||
this.show_close_icon = true;
|
||||
let select_value = false;
|
||||
|
||||
this.dynamicPlaceholder = this.enterPlaceholder;
|
||||
this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
|
||||
|
||||
for (let i = 0; i < this.values.length; i++) {
|
||||
if (this.values[i].key == value) {
|
||||
@ -582,7 +581,9 @@ export default {
|
||||
this.show_date = false;
|
||||
|
||||
if (this.filter_index == 0) {
|
||||
this.dynamicPlaceholder = this.defaultPlaceholder;
|
||||
this.onChangeSearchAndFilterText(this.defaultPlaceholder, true);
|
||||
} else {
|
||||
this.show_icon = false;
|
||||
}
|
||||
|
||||
this.filter_last_step = 'options';
|
||||
@ -597,6 +598,11 @@ export default {
|
||||
this.onInputConfirm();
|
||||
},
|
||||
|
||||
onChangeSearchAndFilterText(arg, param) {
|
||||
this.dynamicPlaceholder = arg;
|
||||
this.show_icon = param;
|
||||
},
|
||||
|
||||
convertOption(options) {
|
||||
let values = [];
|
||||
|
||||
@ -765,6 +771,9 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if (this.filter_index > 0) {
|
||||
this.onChangeSearchAndFilterText(this.enterPlaceholder, false);
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
@ -260,7 +260,7 @@
|
||||
v-for="n in 12"
|
||||
v-bind:disabled="n < minCardMonth"
|
||||
v-bind:key="n"
|
||||
>{{generateMonthValue(n)}}</option>
|
||||
>{{ generateMonthValue(n) }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -278,7 +278,7 @@
|
||||
v-bind:value="$index + minCardYear"
|
||||
v-for="(n, $index) in 12"
|
||||
v-bind:key="n"
|
||||
>{{$index + minCardYear}}</option>
|
||||
>{{ $index + minCardYear }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button class="relative flex items-center justify-center px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" v-on:click="invaildCard" :disabled="loading">
|
||||
<button v-if="! hideButton" class="relative flex items-center justify-center px-6 py-1.5 bg-green hover:bg-green-700 text-white rounded-lg" v-on:click="invaildCard" :disabled="loading">
|
||||
<i
|
||||
v-if="loading"
|
||||
class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"
|
||||
@ -371,7 +371,9 @@ export default {
|
||||
props: {
|
||||
cards: {
|
||||
type: [Array, Object],
|
||||
default: [],
|
||||
default: function () {
|
||||
return [];
|
||||
},
|
||||
description: "Add Card Style"
|
||||
},
|
||||
|
||||
@ -454,6 +456,12 @@ export default {
|
||||
description: "Placeholder Card CVV Text"
|
||||
},
|
||||
|
||||
hideButton: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: "Confirm button"
|
||||
},
|
||||
|
||||
textButton: {
|
||||
type: String,
|
||||
default: 'Confirm',
|
||||
@ -554,7 +562,6 @@ export default {
|
||||
this.register_card = null;
|
||||
},
|
||||
|
||||
|
||||
onSelectedCard(card_id) {
|
||||
this.card_id = card_id;
|
||||
this.formData.card_id = card_id;
|
||||
@ -623,7 +630,8 @@ export default {
|
||||
|
||||
this.unMaskCardNumber();
|
||||
|
||||
/*for (let i = number.length - 1; i >= 0; i--) {
|
||||
/*
|
||||
for (let i = number.length - 1; i >= 0; i--) {
|
||||
let num = number.charAt(i);
|
||||
|
||||
if (isOdd) {
|
||||
@ -639,7 +647,8 @@ export default {
|
||||
}
|
||||
|
||||
isOdd = !isOdd;
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
this.formData.card_id = this.card_id;
|
||||
|
||||
|
12
resources/assets/js/mixins/global.js
vendored
12
resources/assets/js/mixins/global.js
vendored
@ -24,6 +24,7 @@ import AkauntingConnectTransactions from './../components/AkauntingConnectTransa
|
||||
import AkauntingSwitch from './../components/AkauntingSwitch';
|
||||
import AkauntingSlider from './../components/AkauntingSlider';
|
||||
import AkauntingColor from './../components/AkauntingColor';
|
||||
import CardForm from './../components/CreditCard/CardForm';
|
||||
|
||||
import NProgress from 'nprogress';
|
||||
import 'nprogress/nprogress.css';
|
||||
@ -61,6 +62,7 @@ export default {
|
||||
AkauntingSwitch,
|
||||
AkauntingSlider,
|
||||
AkauntingColor,
|
||||
CardForm,
|
||||
[Select.name]: Select,
|
||||
[Option.name]: Option,
|
||||
[Steps.name]: Steps,
|
||||
@ -91,6 +93,16 @@ export default {
|
||||
currency: {},
|
||||
documents: [],
|
||||
},
|
||||
|
||||
cardData: {
|
||||
cardName: '',
|
||||
cardNumber: '',
|
||||
cardMonth: '',
|
||||
cardYear: '',
|
||||
cardCvv: '',
|
||||
storeCard: false,
|
||||
card_id: 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user