diff --git a/ServiceDocumentSampleComponents/.eslintignore b/ServiceDocumentSamples/.eslintignore similarity index 100% rename from ServiceDocumentSampleComponents/.eslintignore rename to ServiceDocumentSamples/.eslintignore diff --git a/ServiceDocumentSampleComponents/.forceignore b/ServiceDocumentSamples/.forceignore similarity index 100% rename from ServiceDocumentSampleComponents/.forceignore rename to ServiceDocumentSamples/.forceignore diff --git a/ServiceDocumentSampleComponents/.gitignore b/ServiceDocumentSamples/.gitignore similarity index 100% rename from ServiceDocumentSampleComponents/.gitignore rename to ServiceDocumentSamples/.gitignore diff --git a/ServiceDocumentSampleComponents/.husky/pre-commit b/ServiceDocumentSamples/.husky/pre-commit similarity index 100% rename from ServiceDocumentSampleComponents/.husky/pre-commit rename to ServiceDocumentSamples/.husky/pre-commit diff --git a/ServiceDocumentSampleComponents/.prettierignore b/ServiceDocumentSamples/.prettierignore similarity index 75% rename from ServiceDocumentSampleComponents/.prettierignore rename to ServiceDocumentSamples/.prettierignore index f3720b2..1575a31 100755 --- a/ServiceDocumentSampleComponents/.prettierignore +++ b/ServiceDocumentSamples/.prettierignore @@ -7,4 +7,8 @@ .sfdx .vscode +# Ignore apex cls and apex trigger files: +**/*.cls +**/*.trigger + coverage/ \ No newline at end of file diff --git a/ServiceDocumentSampleComponents/.prettierrc b/ServiceDocumentSamples/.prettierrc similarity index 100% rename from ServiceDocumentSampleComponents/.prettierrc rename to ServiceDocumentSamples/.prettierrc diff --git a/ServiceDocumentSampleComponents/.vscode/extensions.json b/ServiceDocumentSamples/.vscode/extensions.json similarity index 100% rename from ServiceDocumentSampleComponents/.vscode/extensions.json rename to ServiceDocumentSamples/.vscode/extensions.json diff --git a/ServiceDocumentSampleComponents/.vscode/launch.json b/ServiceDocumentSamples/.vscode/launch.json similarity index 100% rename from ServiceDocumentSampleComponents/.vscode/launch.json rename to ServiceDocumentSamples/.vscode/launch.json diff --git a/ServiceDocumentSampleComponents/.vscode/settings.json b/ServiceDocumentSamples/.vscode/settings.json similarity index 100% rename from ServiceDocumentSampleComponents/.vscode/settings.json rename to ServiceDocumentSamples/.vscode/settings.json diff --git a/ServiceDocumentSampleComponents/README.md b/ServiceDocumentSamples/README.md similarity index 83% rename from ServiceDocumentSampleComponents/README.md rename to ServiceDocumentSamples/README.md index 544525e..9162905 100644 --- a/ServiceDocumentSampleComponents/README.md +++ b/ServiceDocumentSamples/README.md @@ -1,6 +1,6 @@ -# Service Document Sample Components +# Service Document Samples -This project contains sample components can be used on the service document template. Through Salesforce DX project, these sample components can be pushed to your org and used on service document templates. +This project contains sample codes for LWC components and Apex triggers which can be used on the service document template. Through Salesforce DX project, these sample components and triggers can be pushed to your org and used on service document templates. ## Salesforce DX Project: Next Steps diff --git a/ServiceDocumentSampleComponents/config/project-scratch-def.json b/ServiceDocumentSamples/config/project-scratch-def.json similarity index 100% rename from ServiceDocumentSampleComponents/config/project-scratch-def.json rename to ServiceDocumentSamples/config/project-scratch-def.json diff --git a/ServiceDocumentSampleComponents/force-app/main/default/aura/.eslintrc.json b/ServiceDocumentSamples/force-app/main/default/aura/.eslintrc.json similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/aura/.eslintrc.json rename to ServiceDocumentSamples/force-app/main/default/aura/.eslintrc.json diff --git a/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls b/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls new file mode 100644 index 0000000..01b23e8 --- /dev/null +++ b/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls @@ -0,0 +1,76 @@ +public with sharing class FireCreateServiceDocumentInvocableAction { + private static final String API_VERSION = 'v58.0'; + + private static final String CREATE_SERVICE_DOCUMENT_ACTION_PATH = + '/services/data/' + + API_VERSION + + '/actions/standard/createServiceDocument'; + + private static final String AUTHORIZATION_HEADER = 'Authorization'; + private static final String AUTHORIZATION_BEARER_PREFIX = 'Bearer '; + + private static final String CONTENT_TYPE_HEADER = 'Content-Type'; + private static final String CONTENT_TYPE_JSON = 'application/json'; + + private static final String ACCEPT_HEADER = 'Accept'; + + /** + * recordId: recordId to generate service document for. WO/WOLI/SA id + * templateId: The ID of Service document template to generate document for. The ID starts with '0M0' + * locale: (Optional) Locale to generate the document in. Example valid formats: 'ru', 'ru_PL' + * title: (Optional) Used to name the document saved + */ + @future(callout=true) + public static void TriggerCreateServiceDocumentInvocableAction( + String recordId, + String templateId, + String locale, + String title + ) { + // System.debug('Attempting to queue Create Service Document'); + // System.debug('RecordId: ' + recordId); + // System.debug('TemplateId: ' + templateId); + // System.debug('Locale: ' + locale); + // System.debug('Title: ' + title); + + String sessionId = UserInfo.getSessionId(); + + HttpRequest httpRequest = new HttpRequest(); + + httpRequest.setMethod('POST'); + httpRequest.setEndpoint( + URL.getOrgDomainUrl().toExternalForm() + + CREATE_SERVICE_DOCUMENT_ACTION_PATH + ); + httpRequest.setHeader( + AUTHORIZATION_HEADER, + AUTHORIZATION_BEARER_PREFIX + sessionId + ); + httpRequest.setHeader(CONTENT_TYPE_HEADER, CONTENT_TYPE_JSON); + httpRequest.setHeader(ACCEPT_HEADER, CONTENT_TYPE_JSON); + + JSONGenerator jg = JSON.createGenerator(false); + jg.writeStartObject(); + jg.writeFieldName('inputs'); + jg.writeStartArray(); + + jg.writeStartObject(); + jg.writeObjectField('recordId', recordId); + jg.writeObjectField('templateId', templateId); + if (locale != null) { + jg.writeObjectField('locale', locale); + } + if (title != null) { + jg.writeObjectField('title', title); + } + jg.writeEndObject(); + jg.writeEndArray(); + jg.writeEndObject(); + + httpRequest.setBody(jg.getAsString()); + + Http http = new Http(); + HttpResponse response = http.send(httpRequest); + System.debug(response.getBody()); + } +} diff --git a/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls-meta.xml b/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls-meta.xml new file mode 100644 index 0000000..133fce1 --- /dev/null +++ b/ServiceDocumentSamples/force-app/main/default/classes/FireCreateServiceDocumentInvocableAction.cls-meta.xml @@ -0,0 +1,5 @@ + + + 58.0 + Active + diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/.eslintrc.json b/ServiceDocumentSamples/force-app/main/default/lwc/.eslintrc.json similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/.eslintrc.json rename to ServiceDocumentSamples/force-app/main/default/lwc/.eslintrc.json diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.css b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.css similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.css rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.css diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.html b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.html similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.html rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.html diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js-meta.xml b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js-meta.xml similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js-meta.xml rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkPlan/demoWorkPlan.js-meta.xml diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.css b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.css similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.css rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.css diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.html b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.html similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.html rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.html diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js-meta.xml b/ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js-meta.xml similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js-meta.xml rename to ServiceDocumentSamples/force-app/main/default/lwc/demoWorkStepPresentation/demoWorkStepPresentation.js-meta.xml diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.html b/ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.html similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.html rename to ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.html diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js b/ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js rename to ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js-meta.xml b/ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js-meta.xml similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js-meta.xml rename to ServiceDocumentSamples/force-app/main/default/lwc/mediumHeaderText/mediumHeaderText.js-meta.xml diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.html b/ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.html similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.html rename to ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.html diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.js b/ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.js similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.js rename to ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.js diff --git a/ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.js-meta.xml b/ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.js-meta.xml similarity index 100% rename from ServiceDocumentSampleComponents/force-app/main/default/lwc/staticImage/staticImage.js-meta.xml rename to ServiceDocumentSamples/force-app/main/default/lwc/staticImage/staticImage.js-meta.xml diff --git a/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger b/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger new file mode 100644 index 0000000..9651f23 --- /dev/null +++ b/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger @@ -0,0 +1,201 @@ +trigger ServiceDocumentCreation on DocumentRecipient(after insert) { + //TODO: + //1. based on the number of signatures in your template, add the template id to a set below. + //2. if you have a template with more than 4 signatures + // a. add another Set of templates following the pattern below. + // b. add the corresponding branch in the if-else branch starting at line 56 + //3. example: Set SA_TEMPLATES_WITH_SIGNATURES_3 = new Set{'0M0xx0000004CFUCA2'}; + Set WO_TEMPLATES_WITH_1_SIGNATURES = new Set{ '' }; + Set WO_TEMPLATES_WITH_2_SIGNATURES = new Set{ '' }; + Set WO_TEMPLATES_WITH_3_SIGNATURES = new Set{ '' }; + Set WO_TEMPLATES_WITH_4_SIGNATURES = new Set{ '' }; + + Set WOLI_TEMPLATES_WITH_1_SIGNATURES = new Set{ '' }; + Set WOLI_TEMPLATES_WITH_2_SIGNATURES = new Set{ '' }; + Set WOLI_TEMPLATES_WITH_3_SIGNATURES = new Set{ '' }; + Set WOLI_TEMPLATES_WITH_4_SIGNATURES = new Set{ '' }; + + Set SA_TEMPLATES_WITH_1_SIGNATURES = new Set{ '' }; + Set SA_TEMPLATES_WITH_2_SIGNATURES = new Set{ '' }; + Set SA_TEMPLATES_WITH_3_SIGNATURES = new Set{ '' }; + Set SA_TEMPLATES_WITH_4_SIGNATURES = new Set{ '' }; + + // TODO: Set threshold for when you want to fire the trigger for when a template not added to an above sets + // Eg: If you set this to 3, then if we cannot match the template being used, we'll automatically + // fire the createServiceDocument invocable action when 3 signatures are collected + final Integer DEFAULT_NUM_SIGNATURES = 3; + + for (DocumentRecipient dr : Trigger.new) { + ID documentId = dr.DocumentId; + if (documentId.getSobjectType() == Schema.ServiceReport.SObjectType) { + List serviceReports = [ + SELECT Id, ParentId, DocumentTemplate + FROM ServiceReport + WHERE Id = :documentId + ]; + String templateId = serviceReports.get(0).DocumentTemplate; + // System.debug('Service Report Identified: ' + documentId); + // System.debug('Template Id: ' + templateId); + + ID baseRecordId = serviceReports.get(0).ParentId; + // System.debug('Base record Id: ' + baseRecordId); + + //currently already collected signatures + List collectedSignaturesRelatedDRs = [ + SELECT Id + FROM DocumentRecipient + WHERE DocumentId = :documentId + ]; + // System.debug('Number of collected signatures related DocumentRecipients: ' + collectedSignaturesRelatedDRs.size()); + + // There is currently no way to retrieve the number of signatures + // on a template. Thus, for now we need to hardcode associations of + // template IDs and the number of signature records to collect before automatic + // invocation of PDFication. + + // Below, we've provided an example organized by template entity, but more + // if conditions could be added within the switch blocks. If no specific template + // matches, we also have a default condition which will always submit the service + // document once DEFAULT_NUM_SIGNATURES document recipients have been collected. + + // Work Order Templates + // The if-else branches can be combined by the number of signatures to reduce the number of branches, + // but, in that case, it will not be able to add debug information for each different entity + if (WO_TEMPLATES_WITH_1_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Template block'); + //only when all the signatures have been collected, then fire the trigger + if (collectedSignaturesRelatedDRs.size() == 1) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WO_TEMPLATES_WITH_2_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Template block'); + if (collectedSignaturesRelatedDRs.size() == 2) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WO_TEMPLATES_WITH_3_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Template block'); + if (collectedSignaturesRelatedDRs.size() == 3) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WO_TEMPLATES_WITH_4_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Template block'); + if (collectedSignaturesRelatedDRs.size() == 4) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WOLI_TEMPLATES_WITH_1_SIGNATURES.contains(templateId)) { + // Work Order Line Item Templates + // System.debug('Work Order Line Item Template block'); + if (collectedSignaturesRelatedDRs.size() == 1) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WOLI_TEMPLATES_WITH_2_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Line Item Template block'); + if (collectedSignaturesRelatedDRs.size() == 2) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WOLI_TEMPLATES_WITH_3_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Line Item Template block'); + if (collectedSignaturesRelatedDRs.size() == 3) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (WOLI_TEMPLATES_WITH_4_SIGNATURES.contains(templateId)) { + // System.debug('Work Order Line Item Template block'); + if (collectedSignaturesRelatedDRs.size() == 4) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (SA_TEMPLATES_WITH_1_SIGNATURES.contains(templateId)) { + // Service Appointment Templates + // System.debug('Service Appointment Template block'); + if (collectedSignaturesRelatedDRs.size() == 1) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (SA_TEMPLATES_WITH_2_SIGNATURES.contains(templateId)) { + // System.debug('Service Appointment Template block'); + if (collectedSignaturesRelatedDRs.size() == 2) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (SA_TEMPLATES_WITH_3_SIGNATURES.contains(templateId)) { + // System.debug('Service Appointment Template block'); + if (collectedSignaturesRelatedDRs.size() == 3) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else if (SA_TEMPLATES_WITH_4_SIGNATURES.contains(templateId)) { + // System.debug('Service Appointment Template block'); + if (collectedSignaturesRelatedDRs.size() == 4) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } else { + // default case + // System.debug('Default block'); + if (collectedSignaturesRelatedDRs.size() == DEFAULT_NUM_SIGNATURES) { + FireCreateServiceDocumentInvocableAction.TriggerCreateServiceDocumentInvocableAction( + baseRecordId, + templateId, + null, + null + ); + } + } + } + } +} diff --git a/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger-meta.xml b/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger-meta.xml new file mode 100644 index 0000000..d0466b4 --- /dev/null +++ b/ServiceDocumentSamples/force-app/main/default/triggers/ServiceDocumentCreation.trigger-meta.xml @@ -0,0 +1,5 @@ + + + 58.0 + Active + diff --git a/ServiceDocumentSampleComponents/jest.config.js b/ServiceDocumentSamples/jest.config.js similarity index 100% rename from ServiceDocumentSampleComponents/jest.config.js rename to ServiceDocumentSamples/jest.config.js diff --git a/ServiceDocumentSampleComponents/package.json b/ServiceDocumentSamples/package.json similarity index 77% rename from ServiceDocumentSampleComponents/package.json rename to ServiceDocumentSamples/package.json index 2c25da5..5dc4928 100644 --- a/ServiceDocumentSampleComponents/package.json +++ b/ServiceDocumentSamples/package.json @@ -4,12 +4,7 @@ "version": "1.0.0", "description": "Salesforce App", "scripts": { - "lint": "eslint **/{aura,lwc}/**", - "test": "npm run test:unit", - "test:unit": "sfdx-lwc-jest", - "test:unit:watch": "sfdx-lwc-jest --watch", - "test:unit:debug": "sfdx-lwc-jest --debug", - "test:unit:coverage": "sfdx-lwc-jest --coverage", + "lint": "eslint **/lwc/**", "prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", "prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", "precommit": "lint-staged" @@ -26,7 +21,7 @@ "eslint-plugin-jest": "^26.1.2", "husky": "^7.0.4", "prettier": "^2.6.0", - "prettier-plugin-apex": "^1.10.0" + "prettier-plugin-apex": "^1.8.0" }, "lint-staged": { "**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ diff --git a/ServiceDocumentSampleComponents/sfdx-project.json b/ServiceDocumentSamples/sfdx-project.json similarity index 100% rename from ServiceDocumentSampleComponents/sfdx-project.json rename to ServiceDocumentSamples/sfdx-project.json diff --git a/ServiceDocumentSampleComponents/yarn.lock b/ServiceDocumentSamples/yarn.lock similarity index 100% rename from ServiceDocumentSampleComponents/yarn.lock rename to ServiceDocumentSamples/yarn.lock