From 513da5b960393e58a91d872ee8c2526332d3d825 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Sun, 16 Jun 2024 13:19:57 +0530 Subject: [PATCH 1/3] Added AddToCart Functionality! --- sfdxsrc/errorHandling/classes/Logger.cls | 14 +++++++++-- .../main/default/classes/AddToCart.cls | 5 ++++ .../default/classes/AddToCart.cls-meta.xml | 5 ++++ .../default/classes/CartDetailService.cls | 5 ++++ .../classes/CartDetailService.cls-meta.xml | 5 ++++ .../__tests__/cartDetailPage.test.js | 25 +++++++++++++++++++ .../lwc/cartDetailPage/cartDetailPage.html | 3 +++ .../lwc/cartDetailPage/cartDetailPage.js | 3 +++ .../cartDetailPage/cartDetailPage.js-meta.xml | 5 ++++ 9 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 sfdxsrc/unmanaged/main/default/classes/AddToCart.cls create mode 100644 sfdxsrc/unmanaged/main/default/classes/AddToCart.cls-meta.xml create mode 100644 sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls create mode 100644 sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls-meta.xml create mode 100644 sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/__tests__/cartDetailPage.test.js create mode 100644 sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.html create mode 100644 sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js create mode 100644 sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js-meta.xml diff --git a/sfdxsrc/errorHandling/classes/Logger.cls b/sfdxsrc/errorHandling/classes/Logger.cls index dab4aca..0ba3457 100644 --- a/sfdxsrc/errorHandling/classes/Logger.cls +++ b/sfdxsrc/errorHandling/classes/Logger.cls @@ -2,8 +2,8 @@ * @description : * @author : Amit Singh * @group : - * @last modified on : 03-23-2021 - * @last modified by : Amit Singh + * @last modified on : 06-16-2024 + * @last modified by : Amit Singh - PantherSchools * Modifications Log * Ver Date Author Modification * 1.0 03-23-2021 Amit Singh Initial Version @@ -121,10 +121,20 @@ global without sharing class Logger { List permissionSets = getPermissionSets(); + //logRecord.Permission_Set_Group__c = permissionSets.get(1); + //logRecord.Permission_Set__c = permissionSets.get(0); logRecord.Permission_Set_Group__c = permissionSets.get(1); logRecord.Permission_Set__c = permissionSets.get(0); return logRecord; } + + public static void logAsync(){ + + } + + public static void log(){ + + } global class ErrorLog { @InvocableVariable(required=true) diff --git a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls new file mode 100644 index 0000000..dc1fa75 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls @@ -0,0 +1,5 @@ +public with sharing class AddToCart { + public AddToCart() { + + } +} \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls-meta.xml b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls-meta.xml new file mode 100644 index 0000000..7d5f9e8 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls-meta.xml @@ -0,0 +1,5 @@ + + + 61.0 + Active + \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls b/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls new file mode 100644 index 0000000..553ca63 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls @@ -0,0 +1,5 @@ +public with sharing class CartDetailService { + public CartDetailService() { + + } +} \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls-meta.xml b/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls-meta.xml new file mode 100644 index 0000000..7d5f9e8 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/classes/CartDetailService.cls-meta.xml @@ -0,0 +1,5 @@ + + + 61.0 + Active + \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/__tests__/cartDetailPage.test.js b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/__tests__/cartDetailPage.test.js new file mode 100644 index 0000000..cdc658f --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/__tests__/cartDetailPage.test.js @@ -0,0 +1,25 @@ +import { createElement } from 'lwc'; +import CartDetailPage from 'c/cartDetailPage'; + +describe('c-cart-detail-page', () => { + afterEach(() => { + // The jsdom instance is shared across test cases in a single file so reset the DOM + while (document.body.firstChild) { + document.body.removeChild(document.body.firstChild); + } + }); + + it('TODO: test case generated by CLI command, please fill in test logic', () => { + // Arrange + const element = createElement('c-cart-detail-page', { + is: CartDetailPage + }); + + // Act + document.body.appendChild(element); + + // Assert + // const div = element.shadowRoot.querySelector('div'); + expect(1).toBe(1); + }); +}); \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.html b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.html new file mode 100644 index 0000000..27e0f69 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js new file mode 100644 index 0000000..b4d04cc --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js @@ -0,0 +1,3 @@ +import { LightningElement } from 'lwc'; + +export default class CartDetailPage extends LightningElement {} \ No newline at end of file diff --git a/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js-meta.xml b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js-meta.xml new file mode 100644 index 0000000..f2aff92 --- /dev/null +++ b/sfdxsrc/unmanaged/main/default/lwc/cartDetailPage/cartDetailPage.js-meta.xml @@ -0,0 +1,5 @@ + + + 61.0 + false + \ No newline at end of file From 4a10fdad24b913bb2c84c21648b740d0487efbe4 Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Sun, 16 Jun 2024 13:22:03 +0530 Subject: [PATCH 2/3] Added addCart & fetchActiveCart method. --- .../unmanaged/main/default/classes/AddToCart.cls | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls index dc1fa75..7f6e0b7 100644 --- a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls +++ b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls @@ -1,5 +1,19 @@ +/** + * @description : + * @author : Amit Singh - PantherSchools + * @group : + * @last modified on : 06-16-2024 + * @last modified by : Amit Singh - PantherSchools +**/ public with sharing class AddToCart { public AddToCart() { } + + public static void addCart(){ + + } + public static void fetchActiveCart(){ + + } } \ No newline at end of file From efaf4863ac7b44e0152a0f5a03df00ba0aa9f03d Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Sun, 16 Jun 2024 13:37:42 +0530 Subject: [PATCH 3/3] Added part cart method Added part cart method --- sfdxsrc/unmanaged/main/default/classes/AddToCart.cls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls index 7f6e0b7..223e9f8 100644 --- a/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls +++ b/sfdxsrc/unmanaged/main/default/classes/AddToCart.cls @@ -6,9 +6,6 @@ * @last modified by : Amit Singh - PantherSchools **/ public with sharing class AddToCart { - public AddToCart() { - - } public static void addCart(){ @@ -16,4 +13,7 @@ public with sharing class AddToCart { public static void fetchActiveCart(){ } -} \ No newline at end of file + public static void fetchPastCart(){ + + } +}