Page MenuHomePhorge

D1510.1775289741.diff
No OneTemporary

Authored By
Unknown
Size
7 KB
Referenced Files
None
Subscribers
None

D1510.1775289741.diff

diff --git a/src/resources/views/documents/receipt.blade.php b/src/resources/views/documents/receipt.blade.php
--- a/src/resources/views/documents/receipt.blade.php
+++ b/src/resources/views/documents/receipt.blade.php
@@ -26,7 +26,7 @@
{!! $customer['customer'] !!}
</td>
<td class="idents">
- <span class="gray">{{ __('documents.account-id') }}</span> {{ $customer['wallet_id'] }}<br>
+ {{--<span class="gray">{{ __('documents.account-id') }}</span> {{ $customer['wallet_id'] }}<br>--}}
<span class="gray">{{ __('documents.customer-no') }}</span> {{ $customer['id'] }}
</td>
</tr>
diff --git a/src/resources/vue/User/Profile.vue b/src/resources/vue/User/Profile.vue
--- a/src/resources/vue/User/Profile.vue
+++ b/src/resources/vue/User/Profile.vue
@@ -5,6 +5,12 @@
<div class="card-title">Your profile</div>
<div class="card-text">
<form @submit.prevent="submit">
+ <div class="form-group row plaintext">
+ <label class="col-sm-4 col-form-label">Customer No.</label>
+ <div class="col-sm-8">
+ <span class="form-control-plaintext" id="userid">{{ user_id }}</span>
+ </div>
+ </div>
<div class="form-group row">
<label for="first_name" class="col-sm-4 col-form-label">First name</label>
<div class="col-sm-8">
@@ -80,6 +86,7 @@
data() {
return {
profile: {},
+ user_id: null,
wallet_id: null,
countries: window.config.countries
}
@@ -87,6 +94,7 @@
created() {
this.wallet_id = this.$store.state.authInfo.wallet.id
this.profile = this.$store.state.authInfo.settings
+ this.user_id = this.$store.state.authInfo.id
},
mounted() {
$('#first_name').focus()
@@ -99,7 +107,7 @@
this.$root.clearFormValidation($('#user-profile form'))
- axios.put('/api/v4/users/' + this.$store.state.authInfo.id, this.profile)
+ axios.put('/api/v4/users/' + this.user_id, this.profile)
.then(response => {
delete this.profile.password
delete this.profile.password_confirm
diff --git a/src/tests/Browser/UserProfileTest.php b/src/tests/Browser/UserProfileTest.php
--- a/src/tests/Browser/UserProfileTest.php
+++ b/src/tests/Browser/UserProfileTest.php
@@ -71,26 +71,29 @@
->on(new UserProfile())
->assertSeeIn('#user-profile .button-delete', 'Delete account')
->whenAvailable('@form', function (Browser $browser) {
+ $user = User::where('email', 'john@kolab.org')->first();
// Assert form content
- $browser->assertFocused('div.row:nth-child(1) input')
- ->assertSeeIn('div.row:nth-child(1) label', 'First name')
- ->assertValue('div.row:nth-child(1) input[type=text]', $this->profile['first_name'])
- ->assertSeeIn('div.row:nth-child(2) label', 'Last name')
- ->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['last_name'])
- ->assertSeeIn('div.row:nth-child(3) label', 'Organization')
- ->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['organization'])
- ->assertSeeIn('div.row:nth-child(4) label', 'Phone')
- ->assertValue('div.row:nth-child(4) input[type=text]', $this->profile['phone'])
- ->assertSeeIn('div.row:nth-child(5) label', 'External email')
- ->assertValue('div.row:nth-child(5) input[type=text]', $this->profile['external_email'])
- ->assertSeeIn('div.row:nth-child(6) label', 'Address')
- ->assertValue('div.row:nth-child(6) textarea', $this->profile['billing_address'])
- ->assertSeeIn('div.row:nth-child(7) label', 'Country')
- ->assertValue('div.row:nth-child(7) select', $this->profile['country'])
- ->assertSeeIn('div.row:nth-child(8) label', 'Password')
- ->assertValue('div.row:nth-child(8) input[type=password]', '')
- ->assertSeeIn('div.row:nth-child(9) label', 'Confirm password')
+ $browser->assertFocused('div.row:nth-child(2) input')
+ ->assertSeeIn('div.row:nth-child(1) label', 'Customer No.')
+ ->assertSeeIn('div.row:nth-child(1) .form-control-plaintext', $user->id)
+ ->assertSeeIn('div.row:nth-child(2) label', 'First name')
+ ->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['first_name'])
+ ->assertSeeIn('div.row:nth-child(3) label', 'Last name')
+ ->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['last_name'])
+ ->assertSeeIn('div.row:nth-child(4) label', 'Organization')
+ ->assertValue('div.row:nth-child(4) input[type=text]', $this->profile['organization'])
+ ->assertSeeIn('div.row:nth-child(5) label', 'Phone')
+ ->assertValue('div.row:nth-child(5) input[type=text]', $this->profile['phone'])
+ ->assertSeeIn('div.row:nth-child(6) label', 'External email')
+ ->assertValue('div.row:nth-child(6) input[type=text]', $this->profile['external_email'])
+ ->assertSeeIn('div.row:nth-child(7) label', 'Address')
+ ->assertValue('div.row:nth-child(7) textarea', $this->profile['billing_address'])
+ ->assertSeeIn('div.row:nth-child(8) label', 'Country')
+ ->assertValue('div.row:nth-child(8) select', $this->profile['country'])
+ ->assertSeeIn('div.row:nth-child(9) label', 'Password')
->assertValue('div.row:nth-child(9) input[type=password]', '')
+ ->assertSeeIn('div.row:nth-child(10) label', 'Confirm password')
+ ->assertValue('div.row:nth-child(10) input[type=password]', '')
->assertSeeIn('button[type=submit]', 'Submit');
// Test form error handling
diff --git a/src/tests/Feature/Documents/ReceiptTest.php b/src/tests/Feature/Documents/ReceiptTest.php
--- a/src/tests/Feature/Documents/ReceiptTest.php
+++ b/src/tests/Feature/Documents/ReceiptTest.php
@@ -85,7 +85,7 @@
$customerExpected = "Firstname Lastname\nTest Unicode Straße 150\n10115 Berlin";
$this->assertSame($customerExpected, $this->getNodeContent($customerCells[0]));
$customerIdents = $this->getNodeContent($customerCells[1]);
- $this->assertTrue(strpos($customerIdents, "Account ID {$wallet->id}") !== false);
+ //$this->assertTrue(strpos($customerIdents, "Account ID {$wallet->id}") !== false);
$this->assertTrue(strpos($customerIdents, "Customer No. {$wallet->owner->id}") !== false);
// Company details in the footer

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 4, 8:02 AM (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18828604
Default Alt Text
D1510.1775289741.diff (7 KB)

Event Timeline