Skip to content

Commit

Permalink
Standardised some formatting of attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-baillie-ortoo committed Dec 16, 2021
1 parent fd78481 commit 164d22d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
14 changes: 9 additions & 5 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,26 @@ Licenses that are needed with the source code and binary:
* SObject Fabricator - https://github.com/bobalicious/SObjectFabricator/blob/master/LICENSE

Look at the use of 'MockDatabase' in fflib

Look at:
SobjectUtils.getSobjectName

* LWCs
* Complete testing of the form LWC
* Write up:
* Layout Constants
* View and Edit Form

* Write up Layout Constants
* Standards for:
* Edit Forms / Validation
* Edit Forms with Child Records

* Review:
* Self Configured Combobox - not sure it's needed

* Create exception rendering / error rendering

* Try parent and datatable referencing a DML Service


* Can the view and edit form call the validate method?

* Standards
* data-name to identify elements in a test
* e.g. [data-name="cancel"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
variant="default"
name="edit"
data-name="edit"
label={editButtonLabel}
label={editLabel}
onclick={handleEditClick}
></lightning-button>
</lightning-button-group>
</div>

<div class="slds-p-around_small">
<slot name="viewForm"></slot>
<slot name="view-form"></slot>
</div>
</lightning-card>

Expand All @@ -35,7 +35,7 @@
<div class="slds-p-around_small">
<lightning-messages></lightning-messages>

<slot name="editForm"></slot>
<slot name="edit-form"></slot>
</div>

<div slot="footer">
Expand All @@ -46,7 +46,7 @@
variant="default"
name="cancel"
data-name="cancel"
label={cancelButtonLabel}
label={cancelLabel}
onclick={handleCancelClick}
></lightning-button>

Expand All @@ -56,7 +56,7 @@
variant="brand"
name="save"
data-name="save"
label={saveButtonLabel}
label={saveLabel}
onclick={handleSaveClick}
></lightning-button>
</lightning-button-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
variant="default"
name="edit"
data-name="edit"
label={editButtonLabel}
label={editLabel}
onclick={handleEditClick}
></lightning-button>

</lightning-button-group>

<div slot="contents">
<template if:false={inEditMode}>
<slot name="viewForm"></slot>
<slot name="view-form"></slot>
</template>

<template if:true={inEditMode}>
<slot name="editForm"></slot>
<slot name="edit-form"></slot>
</template>
</div>

Expand All @@ -43,7 +43,7 @@
variant="default"
name="cancel"
data-name="cancel"
label={cancelButtonLabel}
label={cancelLabel}
onclick={handleCancelClick}
></lightning-button>

Expand All @@ -53,7 +53,7 @@
variant="brand"
name="save"
data-name="save"
label={saveButtonLabel}
label={saveLabel}
onclick={handleSaveClick}
></lightning-button>
</lightning-button-group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ export default class ViewAndEditForm extends LightningElement {
@api inEditMode = false;
@api visible = false;

@api editButtonLabel = EDIT_LABEL;
@api cancelButtonLabel = CANCEL_LABEL;
@api saveButtonLabel = SAVE_LABEL;
@api editLabel = EDIT_LABEL;
@api cancelLabel = CANCEL_LABEL;
@api saveLabel = SAVE_LABEL;

@api displayDensity;

get hideModalFooter() {
return ! this.inEditMode;
}

_mode = 'card';
@api get mode() {
return this._mode;
Expand Down Expand Up @@ -65,7 +61,7 @@ export default class ViewAndEditForm extends LightningElement {
}

handleCancelModalClick( event ) {
const newEvent = new CustomEvent( 'cancelModal' );
const newEvent = new CustomEvent( 'cancelmodal' );
this.dispatchEvent( newEvent );
}
}

0 comments on commit 164d22d

Please sign in to comment.