Skip to content

Commit

Permalink
Merge pull request #650 from SalesforceFoundation/feature/242__mobile…
Browse files Browse the repository at this point in the history
…-app-cleanup

BSDT Small Factor Message
  • Loading branch information
AndersonTarren authored Sep 8, 2022
2 parents 3081df9 + b58bbfc commit 0013a02
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 47 deletions.
7 changes: 7 additions & 0 deletions force-app/main/default/labels/CustomLabels.labels-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1089,4 +1089,11 @@
<shortDescription>Action</shortDescription>
<value>Action</value>
</labels>
<labels>
<fullName>Feature_Only_Webapp</fullName>
<language>en_US</language>
<protected>true</protected>
<shortDescription>This feature is only available on the web application</shortDescription>
<value>This feature is only available on the web application.</value>
</labels>
</CustomLabels>
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,60 @@

<template>
<div class="bsdt">
<div class="wizard" if:true={showWizard}>
<c-group-service-deliveries
onfinish={handleFinishWizard}
></c-group-service-deliveries>
<div if:true={isPhone}>
{labels.featureOnlyWebApp}
</div>

<lightning-card if:false={showWizard}>
<div class="slds-var-p-horizontal_medium">
{labels.serviceFieldMessage}
<div if:false={isPhone}>
<div class="wizard" if:true={showWizard}>
<c-group-service-deliveries
onfinish={handleFinishWizard}
></c-group-service-deliveries>
</div>
<div class="slds-var-p-horizontal_medium">
<template if:true={serviceDeliveryFieldSets}>
<template for:each={serviceDeliveries} for:item="delivery">
<div
key={delivery.index}
class="slds-box small-box slds-var-m-bottom_medium bsdt-shadow"
>
<c-service-delivery-row
default-values={delivery}
service-delivery-field-sets={serviceDeliveryFieldSets}
index={delivery.index}
onsuccess={handleRowSuccess}
ondelete={handleRowDelete}
onerror={handleRowError}
row-count={rowCount}
should-focus={delivery.shouldFocus}
></c-service-delivery-row>
</div>

<lightning-card if:false={showWizard}>
<div class="slds-var-p-horizontal_medium">
{labels.serviceFieldMessage}
</div>
<div class="slds-var-p-horizontal_medium">
<template if:true={serviceDeliveryFieldSets}>
<template for:each={serviceDeliveries} for:item="delivery">
<div
key={delivery.index}
class="slds-box small-box slds-var-m-bottom_medium bsdt-shadow"
>
<c-service-delivery-row
default-values={delivery}
service-delivery-field-sets={serviceDeliveryFieldSets}
index={delivery.index}
onsuccess={handleRowSuccess}
ondelete={handleRowDelete}
onerror={handleRowError}
row-count={rowCount}
should-focus={delivery.shouldFocus}
></c-service-delivery-row>
</div>
</template>
</template>
</template>
</div>
</div>

<div slot="footer" class="slds-text-align_right">
<lightning-button
variant="brand-outline"
icon-name="utility:add"
label={labels.addEntry}
onclick={addDelivery}
class="slds-var-p-right_medium"
disabled={isAddEntryDisabled}
></lightning-button>
<lightning-button
onclick={handleSave}
variant="brand"
label={labels.save}
disabled={isSaveDisabled}
title={labels.save}
></lightning-button>
</div>
</lightning-card>
<div slot="footer" class="slds-text-align_right">
<lightning-button
variant="brand-outline"
icon-name="utility:add"
label={labels.addEntry}
onclick={addDelivery}
class="slds-var-p-right_medium"
disabled={isAddEntryDisabled}
></lightning-button>
<lightning-button
onclick={handleSave}
variant="brand"
label={labels.save}
disabled={isSaveDisabled}
title={labels.save}
></lightning-button>
</div>
</lightning-card>
</div>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import { LightningElement, api, track, wire } from "lwc";
import { NavigationMixin } from "lightning/navigation";
import { format, handleError, showToast } from "c/util";
import { loadStyle } from "lightning/platformResourceLoader";
import FORM_FACTOR_NAME from "@salesforce/client/formFactor";

import { ServiceDeliveryFieldSets } from "./serviceDeliveryFieldSets";

import addServiceDelivery from "@salesforce/label/c.Add_Service_Delivery";
import addEntry from "@salesforce/label/c.Add_Entry";
import featureOnlyWebApp from "@salesforce/label/c.Feature_Only_Webapp";
import save from "@salesforce/label/c.Save";
import saved from "@salesforce/label/c.Saved";
import saving from "@salesforce/label/c.Saving";
Expand Down Expand Up @@ -58,6 +60,7 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
labels = {
addEntry,
addServiceDelivery,
featureOnlyWebApp,
saved,
saving,
required,
Expand Down Expand Up @@ -131,7 +134,9 @@ export default class BulkServiceDeliveryUI extends NavigationMixin(LightningElem
url => (this.url = url)
);
}

get isPhone() {
return FORM_FACTOR_NAME === "Small";
}
get isModal() {
return this.hideFooter; // reusing old api property name
}
Expand Down

0 comments on commit 0013a02

Please sign in to comment.