forked from salesforce/offline-app-developer-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request salesforce#81 from Taost/customObject
Rename custom object
- Loading branch information
Showing
31 changed files
with
131 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../createVisitRecord/createVisitRecord.html → ...d/createStarterKitCustomObjectRecord.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../lwc/editVisitRecord/editVisitRecord.html → ...ord/editStarterKitCustomObjectRecord.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...VisitRecord/__tests__/data/getRecord.json → ...bjectRecord/__tests__/data/getRecord.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"fields": { | ||
"Name": { | ||
"value": "Mock Visit" | ||
"value": "Mock StarterKitCustomObject" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...app/main/default/lwc/viewStarterKitCustomObjectRecord/viewStarterKitCustomObjectRecord.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { LightningElement, api, wire } from "lwc"; | ||
import { getRecord } from "lightning/uiRecordApi"; | ||
import NAME_FIELD from "@salesforce/schema/StarterKitCustomObject__c.Name"; | ||
import START_TIME__C_FIELD from "@salesforce/schema/StarterKitCustomObject__c.Start_Time__c"; | ||
import END_TIME__C_FIELD from "@salesforce/schema/StarterKitCustomObject__c.End_Time__c"; | ||
import PRIORITY__C_FIELD from "@salesforce/schema/StarterKitCustomObject__c.Priority__c"; | ||
import STATUS__C_FIELD from "@salesforce/schema/StarterKitCustomObject__c.Status__c"; | ||
import ADDRESS__C_FIELD from "@salesforce/schema/StarterKitCustomObject__c.Address__c"; | ||
|
||
export default class ViewStarterKitCustomObject__cRecord extends LightningElement { | ||
@api recordId; | ||
@api objectApiName; | ||
|
||
get fields() { | ||
return [ | ||
NAME_FIELD, | ||
START_TIME__C_FIELD, | ||
END_TIME__C_FIELD, | ||
PRIORITY__C_FIELD, | ||
STATUS__C_FIELD, | ||
ADDRESS__C_FIELD, | ||
]; | ||
} | ||
|
||
@wire(getRecord, { recordId: "$recordId", fields: "$fields" }) | ||
record; | ||
|
||
get name() { | ||
return this.record?.data?.fields?.Name?.value ?? ""; | ||
} | ||
} |
Oops, something went wrong.