Fix for duplicate app, PR feedback. Update for View only UX in app row, ensure favourite is displayed
This commit is contained in:
parent
780e11af47
commit
c5753dab0a
|
@ -80,9 +80,9 @@
|
|||
<Body size="S">{app.deployed ? "Published" : "Unpublished"}</Body>
|
||||
</div>
|
||||
|
||||
{#if isBuilder}
|
||||
<div class="actions-wrap">
|
||||
<div class="app-row-actions">
|
||||
<div class="actions-wrap">
|
||||
<div class="app-row-actions">
|
||||
{#if isBuilder}
|
||||
<div class="row-action">
|
||||
<Button size="S" secondary on:click={lockedAction || goToBuilder}>
|
||||
Edit
|
||||
|
@ -99,17 +99,16 @@
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="favourite-icon">
|
||||
<FavouriteAppButton {app} noWrap />
|
||||
</div>
|
||||
{:else}
|
||||
<!-- this can happen if an app builder has app user access to an app -->
|
||||
<Button size="S" secondary>View</Button>
|
||||
{/if}
|
||||
</div>
|
||||
{:else if app.deployed}
|
||||
<!-- this can happen if an app builder has app user access to an app -->
|
||||
<div class="app-row-actions">
|
||||
<Button size="S" secondary>View</Button>
|
||||
|
||||
<div class="favourite-icon">
|
||||
<FavouriteAppButton {app} noWrap />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -59,6 +59,7 @@ import sdk from "../../sdk"
|
|||
import { builderSocket } from "../../websockets"
|
||||
import { sdk as sharedCoreSDK } from "@budibase/shared-core"
|
||||
import * as appMigrations from "../../appMigrations"
|
||||
import { cloneDeep } from "lodash"
|
||||
|
||||
// utility function, need to do away with this
|
||||
async function getLayouts() {
|
||||
|
@ -682,7 +683,10 @@ export async function duplicateApp(
|
|||
// Build a new request
|
||||
const createRequest = {
|
||||
roleId: ctx.roleId,
|
||||
user: ctx.user,
|
||||
user: {
|
||||
...cloneDeep(ctx.user),
|
||||
_id: dbCore.getGlobalIDFromUserMetadataID(ctx.user._id || ""),
|
||||
},
|
||||
request: {
|
||||
body: createRequestBody,
|
||||
},
|
||||
|
|
|
@ -199,12 +199,3 @@ export async function updateSelf(
|
|||
_rev: user._rev!,
|
||||
}
|
||||
}
|
||||
|
||||
// export default {
|
||||
// generateAPIKey,
|
||||
// fetchAPIKey,
|
||||
// getSelf,
|
||||
// syncAppFavourites,
|
||||
// fetchAppsByIds,
|
||||
// updateSelf,
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue