Merge branch 'change_password_require_password' of github.com:gradido/gradido into change_password_require_password

This commit is contained in:
einhornimmond 2021-06-14 13:39:45 +02:00
commit 868c25ce02
4 changed files with 24 additions and 12 deletions

View File

@ -152,10 +152,7 @@ class AppRequestsController extends AppController
if($result !== true) {
return $this->returnJson($result);
}
$required_fields = $this->checkAndCopyRequiredFields(['target_date'], $params, $data);
if($required_fields !== true) {
return $this->returnJson($required_fields);
}
if(!isset($params['memo']) || strlen($params['memo']) < 5 || strlen($params['memo']) > 150) {
return $this->returnJson(['state' => 'error', 'msg' => 'memo is not set or not in expected range [5;150]']);
}

View File

@ -17,7 +17,6 @@
:email="transactionData.email"
:amount="transactionData.amount"
:memo="transactionData.memo"
:date="transactionData.target_date"
:loading="loading"
@send-transaction="sendTransaction"
@on-reset="onReset"
@ -54,7 +53,6 @@ const EMPTY_TRANSACTION_DATA = {
email: '',
amount: 0,
memo: '',
target_date: '',
}
export default {
@ -96,7 +94,6 @@ export default {
},
methods: {
setTransaction(data) {
data.target_date = new Date(Date.now()).toISOString()
this.transactionData = data
this.currentTransactionStep = 1
},

View File

@ -16,10 +16,6 @@
{{ memo ? memo : '-' }}
<b-badge variant="primary" pill>{{ $t('form.message') }}</b-badge>
</b-list-group-item>
<b-list-group-item class="d-flex justify-content-between align-items-center">
{{ $d($moment(date), 'long') }}
<b-badge variant="primary" pill>{{ $t('form.date') }}</b-badge>
</b-list-group-item>
</b-list-group>
</b-col>
</b-row>
@ -42,7 +38,6 @@ export default {
email: { type: String, default: '' },
amount: { type: Number, default: 0 },
memo: { type: String, default: '' },
date: { type: String, default: '' },
loading: { type: Boolean, default: false },
},
}

View File

@ -0,0 +1,23 @@
import { shallowMount } from '@vue/test-utils'
import UserProfile from './UserProfile'
const localVue = global.localVue
describe('UserProfile', () => {
let wrapper
const Wrapper = () => {
return shallowMount(UserProfile, { localVue })
}
describe('shallowMount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the component', () => {
expect(wrapper.findComponent({ name: 'user-card' }).exists()).toBeTruthy()
})
})
})