Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117778883
D1624.1775245340.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
5 KB
Referenced Files
None
Subscribers
None
D1624.1775245340.diff
View Options
diff --git a/src/resources/js/app.js b/src/resources/js/app.js
--- a/src/resources/js/app.js
+++ b/src/resources/js/app.js
@@ -186,7 +186,10 @@
},
clickRecord(event) {
if (!/^(a|button|svg|path)$/i.test(event.target.nodeName)) {
- $(event.target).closest('tr').find('a')[0].click()
+ let link = $(event.target).closest('tr').find('a')[0]
+ if (link) {
+ link.click()
+ }
}
},
domainStatusClass(domain) {
diff --git a/src/resources/vue/Admin/User.vue b/src/resources/vue/Admin/User.vue
--- a/src/resources/vue/Admin/User.vue
+++ b/src/resources/vue/Admin/User.vue
@@ -244,7 +244,8 @@
<tr v-for="item in users" :id="'user' + item.id" :key="item.id" @click="$root.clickRecord">
<td>
<svg-icon icon="user" :class="$root.userStatusClass(item)" :title="$root.userStatusText(item)"></svg-icon>
- <router-link :to="{ path: '/user/' + item.id }">{{ item.email }}</router-link>
+ <router-link v-if="item.id != user.id" :to="{ path: '/user/' + item.id }">{{ item.email }}</router-link>
+ <span v-else>{{ item.email }}</span>
</td>
</tr>
</tbody>
@@ -479,9 +480,7 @@
// TODO: Multiple wallets
axios.get('/api/v4/users?owner=' + user_id)
.then(response => {
- this.users = response.data.list.filter(user => {
- return user.id != user_id;
- })
+ this.users = response.data.list;
})
// Fetch domains
diff --git a/src/tests/Browser/Admin/UserFinancesTest.php b/src/tests/Browser/Admin/UserFinancesTest.php
--- a/src/tests/Browser/Admin/UserFinancesTest.php
+++ b/src/tests/Browser/Admin/UserFinancesTest.php
@@ -125,7 +125,7 @@
$page = new UserPage($ned->id);
$browser->click('@nav #tab-users')
- ->click('@user-users tbody tr:nth-child(3) td:first-child a')
+ ->click('@user-users tbody tr:nth-child(4) td:first-child a')
->on($page)
->with('@user-finances', function (Browser $browser) {
$browser->waitUntilMissing('.app-loader')
diff --git a/src/tests/Browser/Admin/UserTest.php b/src/tests/Browser/Admin/UserTest.php
--- a/src/tests/Browser/Admin/UserTest.php
+++ b/src/tests/Browser/Admin/UserTest.php
@@ -102,7 +102,7 @@
->assertSeeIn('.row:nth-child(6) label', 'External email')
->assertMissing('.row:nth-child(6) #external_email a')
->assertSeeIn('.row:nth-child(7) label', 'Country')
- ->assertSeeIn('.row:nth-child(7) #country', 'United States of America');
+ ->assertSeeIn('.row:nth-child(7) #country', 'United States');
});
// Some tabs are loaded in background, wait a second
@@ -198,7 +198,7 @@
->assertSeeIn('.row:nth-child(8) label', 'Address')
->assertSeeIn('.row:nth-child(8) #billing_address', $john->getSetting('billing_address'))
->assertSeeIn('.row:nth-child(9) label', 'Country')
- ->assertSeeIn('.row:nth-child(9) #country', 'United States of America');
+ ->assertSeeIn('.row:nth-child(9) #country', 'United States');
});
// Some tabs are loaded in background, wait a second
@@ -243,16 +243,18 @@
});
// Assert Users tab
- $browser->assertSeeIn('@nav #tab-users', 'Users (3)')
+ $browser->assertSeeIn('@nav #tab-users', 'Users (4)')
->click('@nav #tab-users')
->with('@user-users table', function (Browser $browser) {
- $browser->assertElementsCount('tbody tr', 3)
+ $browser->assertElementsCount('tbody tr', 4)
->assertSeeIn('tbody tr:nth-child(1) td:first-child a', 'jack@kolab.org')
->assertVisible('tbody tr:nth-child(1) td:first-child svg.text-success')
->assertSeeIn('tbody tr:nth-child(2) td:first-child a', 'joe@kolab.org')
->assertVisible('tbody tr:nth-child(2) td:first-child svg.text-success')
- ->assertSeeIn('tbody tr:nth-child(3) td:first-child a', 'ned@kolab.org')
+ ->assertSeeIn('tbody tr:nth-child(3) td:first-child span', 'john@kolab.org')
->assertVisible('tbody tr:nth-child(3) td:first-child svg.text-success')
+ ->assertSeeIn('tbody tr:nth-child(4) td:first-child a', 'ned@kolab.org')
+ ->assertVisible('tbody tr:nth-child(4) td:first-child svg.text-success')
->assertMissing('tfoot');
});
});
@@ -262,7 +264,7 @@
$ned = $this->getTestUser('ned@kolab.org');
$page = new UserPage($ned->id);
- $browser->click('@user-users tbody tr:nth-child(3) td:first-child a')
+ $browser->click('@user-users tbody tr:nth-child(4) td:first-child a')
->on($page);
// Assert main info box content
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 7:42 PM (14 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823637
Default Alt Text
D1624.1775245340.diff (5 KB)
Attached To
Mode
D1624: Support: List all users including the wallet owner
Attached
Detach File
Event Timeline