@homefile/components-v2 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/circle-face.svg +21 -0
- package/dist/assets/images/company.svg +34 -0
- package/dist/assets/images/index.d.ts +5 -1
- package/dist/assets/images/index.js +5 -1
- package/dist/assets/images/index.ts +7 -0
- package/dist/assets/images/location.jpg +0 -0
- package/dist/assets/images/logos/index.d.ts +2 -1
- package/dist/assets/images/logos/index.js +2 -1
- package/dist/assets/images/logos/index.ts +12 -1
- package/dist/assets/images/logos/shine.png +0 -0
- package/dist/assets/images/shine/gutter-cleaning.png +0 -0
- package/dist/assets/images/shine/holiday-lights.png +0 -0
- package/dist/assets/images/shine/home-cleaning.png +0 -0
- package/dist/assets/images/shine/index.d.ts +7 -0
- package/dist/assets/images/shine/index.js +7 -0
- package/dist/assets/images/shine/index.ts +15 -0
- package/dist/assets/images/shine/pressure.png +0 -0
- package/dist/assets/images/shine/roof-cleaning.png +0 -0
- package/dist/assets/images/shine/window.png +0 -0
- package/dist/assets/locales/en/index.json +23 -1
- package/dist/components/contacts/ContactCard.d.ts +1 -1
- package/dist/components/contacts/ContactCard.js +8 -3
- package/dist/components/contacts/ContactCardHeader.d.ts +1 -1
- package/dist/components/contacts/ContactCardHeader.js +5 -6
- package/dist/components/contacts/ContactHeaderMenu.d.ts +2 -0
- package/dist/components/contacts/ContactHeaderMenu.js +7 -0
- package/dist/components/contacts/ContactsContent.d.ts +1 -1
- package/dist/components/contacts/ContactsContent.js +2 -2
- package/dist/components/contacts/addEditPanel/AddEditContactPanel.d.ts +2 -0
- package/dist/components/contacts/addEditPanel/AddEditContactPanel.js +24 -0
- package/dist/components/contacts/addEditPanel/index.d.ts +1 -0
- package/dist/components/contacts/addEditPanel/index.js +1 -0
- package/dist/components/contacts/index.d.ts +3 -0
- package/dist/components/contacts/index.js +3 -0
- package/dist/components/contacts/viewPanel/CompanyInfoCard.d.ts +2 -0
- package/dist/components/contacts/viewPanel/CompanyInfoCard.js +13 -0
- package/dist/components/contacts/viewPanel/CompanyRating.d.ts +3 -0
- package/dist/components/contacts/viewPanel/CompanyRating.js +27 -0
- package/dist/components/contacts/viewPanel/ContactAddressCard.d.ts +2 -0
- package/dist/components/contacts/viewPanel/ContactAddressCard.js +12 -0
- package/dist/components/contacts/viewPanel/ContactNotes.d.ts +3 -0
- package/dist/components/contacts/viewPanel/ContactNotes.js +8 -0
- package/dist/components/contacts/viewPanel/PersonalInfoCard.d.ts +2 -0
- package/dist/components/contacts/viewPanel/PersonalInfoCard.js +8 -0
- package/dist/components/contacts/viewPanel/RoleTag.d.ts +2 -0
- package/dist/components/contacts/viewPanel/RoleTag.js +9 -0
- package/dist/components/contacts/viewPanel/ViewContactHeader.d.ts +2 -0
- package/dist/components/contacts/viewPanel/ViewContactHeader.js +11 -0
- package/dist/components/contacts/viewPanel/ViewContactPanel.d.ts +2 -0
- package/dist/components/contacts/viewPanel/ViewContactPanel.js +9 -0
- package/dist/components/contacts/viewPanel/index.d.ts +8 -0
- package/dist/components/contacts/viewPanel/index.js +8 -0
- package/dist/components/forms/dynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/forms/dynamicForm/DynamicForm.js +5 -5
- package/dist/components/forms/dynamicForm/SimpleDynamicForm.d.ts +2 -0
- package/dist/components/forms/dynamicForm/SimpleDynamicForm.js +29 -0
- package/dist/components/forms/dynamicForm/fields/FieldWithDelete.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/FieldWithDelete.js +2 -3
- package/dist/components/forms/dynamicForm/fields/GroupField.d.ts +1 -1
- package/dist/components/forms/dynamicForm/fields/GroupField.js +2 -2
- package/dist/components/forms/dynamicForm/index.d.ts +1 -1
- package/dist/components/forms/dynamicForm/index.js +1 -1
- package/dist/components/homeAssistant/panel/ApplianceSteps.d.ts +1 -1
- package/dist/components/homeAssistant/panel/ApplianceSteps.js +2 -2
- package/dist/components/homeAssistant/panel/HomeAssistantPanel.d.ts +1 -1
- package/dist/components/homeAssistant/panel/HomeAssistantPanel.js +14 -7
- package/dist/components/homeBoard/HomeBoard.js +1 -1
- package/dist/components/homeBoard/HomeCardWithRecipent.d.ts +1 -1
- package/dist/components/homeBoard/HomeCardWithRecipent.js +8 -2
- package/dist/components/onboarding/pages/SignIn.d.ts +1 -1
- package/dist/components/onboarding/pages/SignIn.js +5 -9
- package/dist/components/partner/customPartnerTiles/ShineTile.d.ts +2 -0
- package/dist/components/partner/customPartnerTiles/ShineTile.js +56 -0
- package/dist/components/partner/customPartnerTiles/index.d.ts +1 -0
- package/dist/components/partner/customPartnerTiles/index.js +1 -0
- package/dist/helpers/HomeRoles.helper.d.ts +1 -5
- package/dist/helpers/HomeRoles.helper.js +6 -0
- package/dist/helpers/forms/dynamicForm.helper.js +3 -1
- package/dist/hooks/forms/index.d.ts +1 -0
- package/dist/hooks/forms/index.js +1 -0
- package/dist/hooks/forms/useSimpleDynamicForm.d.ts +11 -0
- package/dist/hooks/forms/useSimpleDynamicForm.js +36 -0
- package/dist/hooks/myHomes/useMyHomeCard.d.ts +1 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/interfaces/contacts/AddEditContactPanel.interface.d.ts +12 -0
- package/dist/interfaces/contacts/ContactCard.interface.d.ts +15 -1
- package/dist/interfaces/contacts/ContactCardInfo.interface.d.ts +2 -1
- package/dist/interfaces/contacts/ContactsContent.interface.d.ts +4 -0
- package/dist/interfaces/contacts/ViewContactPanel.interface.d.ts +9 -0
- package/dist/interfaces/contacts/ViewContactPanel.interface.js +1 -0
- package/dist/interfaces/contacts/index.d.ts +2 -0
- package/dist/interfaces/contacts/index.js +2 -0
- package/dist/interfaces/forms/dynamicForm/DynamicForm.interface.d.ts +9 -7
- package/dist/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.d.ts +4 -0
- package/dist/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.js +1 -0
- package/dist/interfaces/forms/dynamicForm/fields/FieldWithDelete.interface.d.ts +1 -1
- package/dist/interfaces/forms/dynamicForm/fields/GroupField.interface.d.ts +1 -1
- package/dist/interfaces/forms/dynamicForm/index.d.ts +1 -1
- package/dist/interfaces/forms/dynamicForm/index.js +1 -1
- package/dist/interfaces/homeAssistant/ApplianceSteps.interface.d.ts +3 -0
- package/dist/interfaces/homeAssistant/HomeAssistantPanel.interface.d.ts +4 -1
- package/dist/interfaces/homeBoard/HomeCardWithRecipent.interface.d.ts +1 -0
- package/dist/interfaces/pages/SignIn.interface.d.ts +1 -1
- package/dist/mocks/contacts/contacts.mock.js +17 -5
- package/dist/mocks/forms/dynamicForm.mock.d.ts +1 -0
- package/dist/mocks/forms/dynamicForm.mock.js +155 -0
- package/dist/proxies/contacts/contactForm.proxy.d.ts +2 -0
- package/dist/proxies/contacts/contactForm.proxy.js +7 -0
- package/dist/proxies/contacts/index.d.ts +1 -0
- package/dist/proxies/contacts/index.js +1 -0
- package/dist/proxies/index.d.ts +1 -0
- package/dist/proxies/index.js +1 -0
- package/dist/stories/assets/Illustrations.stories.js +2 -2
- package/dist/stories/contacts/AddEditContactPanel.stories.d.ts +5 -0
- package/dist/stories/contacts/AddEditContactPanel.stories.js +22 -0
- package/dist/stories/contacts/ContactCardAddress.stories.d.ts +2 -0
- package/dist/stories/contacts/ContactCardInfo.stories.d.ts +2 -0
- package/dist/stories/contacts/ViewContactPanel.stories.d.ts +5 -0
- package/dist/stories/contacts/ViewContactPanel.stories.js +28 -0
- package/dist/stories/homeAssistant/panel/ApplianceSteps.stories.d.ts +1 -1
- package/dist/stories/homeAssistant/panel/ApplianceSteps.stories.js +1 -0
- package/dist/stories/homeAssistant/panel/HomeAssistantPanel.stories.js +1 -1
- package/dist/stories/partner/customPartnerTiles/ShineTile.stories.d.ts +5 -0
- package/dist/stories/partner/customPartnerTiles/ShineTile.stories.js +19 -0
- package/package.json +1 -1
- package/src/assets/images/circle-face.svg +21 -0
- package/src/assets/images/company.svg +34 -0
- package/src/assets/images/index.ts +7 -0
- package/src/assets/images/location.jpg +0 -0
- package/src/assets/images/logos/index.ts +12 -1
- package/src/assets/images/logos/shine.png +0 -0
- package/src/assets/images/shine/gutter-cleaning.png +0 -0
- package/src/assets/images/shine/holiday-lights.png +0 -0
- package/src/assets/images/shine/home-cleaning.png +0 -0
- package/src/assets/images/shine/index.ts +15 -0
- package/src/assets/images/shine/pressure.png +0 -0
- package/src/assets/images/shine/roof-cleaning.png +0 -0
- package/src/assets/images/shine/window.png +0 -0
- package/src/assets/locales/en/index.json +23 -1
- package/src/components/contacts/ContactCard.tsx +28 -25
- package/src/components/contacts/ContactCardHeader.tsx +5 -38
- package/src/components/contacts/ContactHeaderMenu.tsx +42 -0
- package/src/components/contacts/ContactsContent.tsx +3 -1
- package/src/components/contacts/addEditPanel/AddEditContactPanel.tsx +63 -0
- package/src/components/contacts/addEditPanel/index.ts +1 -0
- package/src/components/contacts/index.ts +3 -0
- package/src/components/contacts/viewPanel/CompanyInfoCard.tsx +58 -0
- package/src/components/contacts/viewPanel/CompanyRating.tsx +27 -0
- package/src/components/contacts/viewPanel/ContactAddressCard.tsx +39 -0
- package/src/components/contacts/viewPanel/ContactNotes.tsx +16 -0
- package/src/components/contacts/viewPanel/PersonalInfoCard.tsx +41 -0
- package/src/components/contacts/viewPanel/RoleTag.tsx +30 -0
- package/src/components/contacts/viewPanel/ViewContactHeader.tsx +26 -0
- package/src/components/contacts/viewPanel/ViewContactPanel.tsx +70 -0
- package/src/components/contacts/viewPanel/index.ts +8 -0
- package/src/components/forms/dynamicForm/DynamicForm.tsx +9 -6
- package/src/components/forms/dynamicForm/SimpleDynamicForm.tsx +57 -0
- package/src/components/forms/dynamicForm/fields/FieldWithDelete.tsx +2 -3
- package/src/components/forms/dynamicForm/fields/GroupField.tsx +7 -2
- package/src/components/forms/dynamicForm/index.ts +1 -1
- package/src/components/homeAssistant/panel/ApplianceSteps.tsx +5 -2
- package/src/components/homeAssistant/panel/HomeAssistantPanel.tsx +20 -7
- package/src/components/homeBoard/HomeBoard.tsx +3 -0
- package/src/components/homeBoard/HomeCardWithRecipent.tsx +15 -1
- package/src/components/onboarding/pages/SignIn.tsx +9 -18
- package/src/components/partner/customPartnerTiles/ShineTile.tsx +148 -0
- package/src/components/partner/customPartnerTiles/index.ts +1 -0
- package/src/helpers/HomeRoles.helper.ts +7 -1
- package/src/helpers/forms/dynamicForm.helper.ts +4 -0
- package/src/hooks/forms/index.ts +1 -0
- package/src/hooks/forms/useSimpleDynamicForm.ts +58 -0
- package/src/index.ts +3 -0
- package/src/interfaces/contacts/AddEditContactPanel.interface.ts +14 -0
- package/src/interfaces/contacts/ContactCard.interface.ts +20 -1
- package/src/interfaces/contacts/ContactCardInfo.interface.ts +3 -2
- package/src/interfaces/contacts/ContactsContent.interface.ts +3 -0
- package/src/interfaces/contacts/ViewContactPanel.interface.ts +10 -0
- package/src/interfaces/contacts/index.ts +2 -0
- package/src/interfaces/forms/dynamicForm/DynamicForm.interface.ts +10 -6
- package/src/interfaces/forms/dynamicForm/SimpleDynamicForm.interface.ts +5 -0
- package/src/interfaces/forms/dynamicForm/fields/FieldWithDelete.interface.ts +1 -1
- package/src/interfaces/forms/dynamicForm/fields/GroupField.interface.ts +1 -1
- package/src/interfaces/forms/dynamicForm/index.ts +1 -1
- package/src/interfaces/homeAssistant/ApplianceSteps.interface.ts +13 -2
- package/src/interfaces/homeAssistant/HomeAssistantPanel.interface.ts +4 -1
- package/src/interfaces/homeBoard/HomeCardWithRecipent.interface.ts +1 -0
- package/src/interfaces/pages/SignIn.interface.ts +2 -2
- package/src/mocks/contacts/contacts.mock.ts +17 -5
- package/src/mocks/forms/dynamicForm.mock.ts +156 -0
- package/src/proxies/contacts/contactForm.proxy.ts +9 -0
- package/src/proxies/contacts/index.ts +1 -0
- package/src/proxies/index.ts +1 -0
- package/src/stories/assets/Illustrations.stories.tsx +4 -0
- package/src/stories/contacts/AddEditContactPanel.stories.tsx +45 -0
- package/src/stories/contacts/ViewContactPanel.stories.tsx +35 -0
- package/src/stories/homeAssistant/panel/ApplianceSteps.stories.tsx +2 -1
- package/src/stories/homeAssistant/panel/HomeAssistantPanel.stories.tsx +2 -0
- package/src/stories/partner/customPartnerTiles/ShineTile.stories.tsx +26 -0
- package/dist/components/forms/dynamicForm/DynamicFormSimple.d.ts +0 -2
- package/dist/components/forms/dynamicForm/DynamicFormSimple.js +0 -32
- package/dist/interfaces/forms/dynamicForm/DynamicFormSimple.interface.d.ts +0 -4
- package/src/components/forms/dynamicForm/DynamicFormSimple.tsx +0 -66
- package/src/interfaces/forms/dynamicForm/DynamicFormSimple.interface.ts +0 -5
- /package/dist/interfaces/{forms/dynamicForm/DynamicFormSimple.interface.js → contacts/AddEditContactPanel.interface.js} +0 -0
|
@@ -36,5 +36,5 @@ export const HomeAssistantPanelComponent = (args) => {
|
|
|
36
36
|
return prev - 1;
|
|
37
37
|
});
|
|
38
38
|
const currentForm = forms[currentStep];
|
|
39
|
-
return (_jsx(HomeAssistantPanel, Object.assign({}, args, { currentStep: currentStep, currentForm: currentForm, onNext: handleFormChange, onBack: handleBack })));
|
|
39
|
+
return (_jsx(HomeAssistantPanel, Object.assign({}, args, { currentStep: currentStep, currentForm: currentForm, onNext: handleFormChange, onBack: handleBack, onSave: action('onSave') })));
|
|
40
40
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ShineTile } from '../../../components';
|
|
3
|
+
import { menuMock } from '../../../mocks';
|
|
4
|
+
import { Box } from '@chakra-ui/react';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'Components/Partner',
|
|
7
|
+
component: ShineTile,
|
|
8
|
+
args: {
|
|
9
|
+
menuItems: menuMock,
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
menuItems: {
|
|
13
|
+
control: { disable: true },
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
export const ShineTileComponent = (args) => {
|
|
18
|
+
return (_jsx(Box, { maxW: "326px", children: _jsx(ShineTile, Object.assign({}, args)) }));
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="27.292" height="27.295" viewBox="0 0 27.292 27.295">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="Rectangle_22561" data-name="Rectangle 22561" width="27.292" height="27.295" fill="none"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="Group_18754" data-name="Group 18754" clip-path="url(#clip-path)">
|
|
8
|
+
<path id="Path_14078" data-name="Path 14078" d="M35.441,22.423a6.682,6.682,0,0,1-6.651,6.154,6.713,6.713,0,0,1-1.73-.235,6.672,6.672,0,0,1,6.648-6.151c.186,0,.365.013.545.026a6.945,6.945,0,0,1,1.187.207" transform="translate(-20.064 -16.452)" fill="#40566b"/>
|
|
9
|
+
<path id="Path_14079" data-name="Path 14079" d="M57.189,25.353a6.625,6.625,0,0,0,.59-2.263,6.674,6.674,0,0,1,4.928,6.126,6.674,6.674,0,0,1-5.518-3.863" transform="translate(-42.401 -17.12)" fill="#323954"/>
|
|
10
|
+
<path id="Path_14080" data-name="Path 14080" d="M34.776,31.84A6.674,6.674,0,0,0,40.295,35.7c0,.106.015.209.015.315V38.49a6.675,6.675,0,0,1-13.35,0V36.019c0-.176.013-.349.026-.522a6.632,6.632,0,0,0,7.791-3.656" transform="translate(-19.989 -23.607)" fill="#daf1f3"/>
|
|
11
|
+
<path id="Path_14081" data-name="Path 14081" d="M26.045,83.189l.771,2.873A13.633,13.633,0,0,1,13,81.845l2.242-1.955a10.653,10.653,0,0,0,10.8,3.3" transform="translate(-9.639 -59.233)" fill="#e24c5d"/>
|
|
12
|
+
<path id="Path_14082" data-name="Path 14082" d="M61.877,3.486,59.891,5.7A10.626,10.626,0,0,0,52.77,2.974V0a13.589,13.589,0,0,1,9.107,3.486" transform="translate(-39.125)" fill="#f6cf76"/>
|
|
13
|
+
<path id="Path_14083" data-name="Path 14083" d="M86.837,23.642a13.574,13.574,0,0,1-.641,4.135L83.3,27.063a10.679,10.679,0,0,0-2.991-11.369L82.3,13.48a13.616,13.616,0,0,1,4.541,10.162" transform="translate(-59.545 -9.994)" fill="#e24c5d"/>
|
|
14
|
+
<path id="Path_14084" data-name="Path 14084" d="M7.183,68.746,4.941,70.7A13.61,13.61,0,0,1,2.13,65.576l2.891-.716a10.633,10.633,0,0,0,2.161,3.886" transform="translate(-1.579 -48.089)" fill="#f6cf76"/>
|
|
15
|
+
<path id="Path_14085" data-name="Path 14085" d="M73.776,66.642A13.668,13.668,0,0,1,64.3,75.689l-.771-2.873a10.694,10.694,0,0,0,7.351-6.888Z" transform="translate(-47.104 -48.881)" fill="#00c0b7"/>
|
|
16
|
+
<path id="Path_14086" data-name="Path 14086" d="M4,4.008a13.6,13.6,0,0,1,9.648-4V2.984a10.672,10.672,0,0,0-10.2,13.8L.551,17.5A13.65,13.65,0,0,1,4,4.008" transform="translate(0 -0.007)" fill="#00c0b7"/>
|
|
17
|
+
<path id="Path_14087" data-name="Path 14087" d="M48.382,68.16a2.9,2.9,0,0,1-1.5-.418l.4-.665a2.112,2.112,0,0,0,2.693-.424l.584.51a2.9,2.9,0,0,1-2.182,1" transform="translate(-34.763 -49.419)" fill="#40566b"/>
|
|
18
|
+
<path id="Path_14088" data-name="Path 14088" d="M41.266,52.4a.776.776,0,1,1-.776-.776.776.776,0,0,1,.776.776" transform="translate(-29.446 -38.272)" fill="#40566b"/>
|
|
19
|
+
<path id="Path_14089" data-name="Path 14089" d="M59.766,52.4a.776.776,0,1,1-.776-.776.776.776,0,0,1,.776.776" transform="translate(-43.162 -38.272)" fill="#40566b"/>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="27.2" height="21.5" viewBox="0 0 27.2 21.5">
|
|
2
|
+
<defs>
|
|
3
|
+
<clipPath id="clip-path">
|
|
4
|
+
<rect id="Rectangle_18088" data-name="Rectangle 18088" width="27.2" height="21.5" fill="none"/>
|
|
5
|
+
</clipPath>
|
|
6
|
+
</defs>
|
|
7
|
+
<g id="Group_16616" data-name="Group 16616" transform="translate(-1127.558 -2313.81)">
|
|
8
|
+
<rect id="Rectangle_18076" data-name="Rectangle 18076" width="7.966" height="7.071" transform="translate(1144.598 2324.792)" fill="#00c0b7"/>
|
|
9
|
+
<rect id="Rectangle_18077" data-name="Rectangle 18077" width="7.966" height="3.146" transform="translate(1144.598 2331.864)" fill="#f6cf76"/>
|
|
10
|
+
<path id="Path_11902" data-name="Path 11902" d="M33.78,44.66v2.047H10.97V44.66Z" transform="translate(1118.783 2278.086)" fill="#40566b"/>
|
|
11
|
+
<path id="Path_11903" data-name="Path 11903" d="M33.78,29.95v2.943H10.97V29.95H33.78Z" transform="translate(1118.783 2289.852)" fill="#f6cf76"/>
|
|
12
|
+
<path id="Path_11904" data-name="Path 11904" d="M35.8,0V3.81H48.674V0Z" transform="translate(1098.921 2313.81)" fill="#e24c5d"/>
|
|
13
|
+
<path id="Path_11905" data-name="Path 11905" d="M71.41,61.961v3.146H67.97V54.889H71.41Z" transform="translate(1073.188 2269.903)" fill="#00a1aa"/>
|
|
14
|
+
<path id="Path_11906" data-name="Path 11906" d="M54.219,54.889V65.106H50.78V54.889Z" transform="translate(1086.939 2269.903)" fill="#00a1aa"/>
|
|
15
|
+
<rect id="Rectangle_18078" data-name="Rectangle 18078" width="7.965" height="3.146" transform="translate(1129.753 2331.864)" fill="#f6cf76"/>
|
|
16
|
+
<rect id="Rectangle_18079" data-name="Rectangle 18079" width="7.965" height="7.071" transform="translate(1129.753 2324.792)" fill="#00c0b7"/>
|
|
17
|
+
<rect id="Rectangle_18080" data-name="Rectangle 18080" width="0.4" height="10.217" transform="translate(1140.958 2324.792)" fill="#40566b"/>
|
|
18
|
+
<rect id="Rectangle_18081" data-name="Rectangle 18081" width="0.6" height="2.183" transform="translate(1137.056 2317.619)" fill="#40566b"/>
|
|
19
|
+
<rect id="Rectangle_18082" data-name="Rectangle 18082" width="0.6" height="2.183" transform="translate(1144.66 2317.619)" fill="#40566b"/>
|
|
20
|
+
<rect id="Rectangle_18083" data-name="Rectangle 18083" width="2.286" height="0.4" transform="translate(1146.845 2328.267) rotate(-45)" fill="#fff"/>
|
|
21
|
+
<rect id="Rectangle_18084" data-name="Rectangle 18084" width="4.741" height="0.4" transform="translate(1147.044 2330.002) rotate(-45)" fill="#fff"/>
|
|
22
|
+
<rect id="Rectangle_18085" data-name="Rectangle 18085" width="2.288" height="0.4" transform="translate(1132.034 2328.266) rotate(-44.939)" fill="#fff"/>
|
|
23
|
+
<rect id="Rectangle_18086" data-name="Rectangle 18086" width="4.74" height="0.4" transform="translate(1132.235 2330.001) rotate(-45)" fill="#fff"/>
|
|
24
|
+
<rect id="Rectangle_18087" data-name="Rectangle 18087" width="27.2" height="0.6" transform="translate(1127.558 2334.709)" fill="#40566b"/>
|
|
25
|
+
<g id="Group_16615" data-name="Group 16615" transform="translate(1127.558 2313.81)">
|
|
26
|
+
<g id="Group_16614" data-name="Group 16614" clip-path="url(#clip-path)">
|
|
27
|
+
<path id="Path_11907" data-name="Path 11907" d="M44.83,5.842c.008.179.2.255.395.255.174,0,.375-.042.375-.246,0-.224-.241-.241-.428-.258-.356-.028-.714-.151-.714-.557,0-.434.356-.616.745-.616.367,0,.748.154.748.593h-.392c-.023-.159-.188-.227-.356-.227s-.333.089-.333.241c0,.173.171.215.375.235.415.039.77.129.77.588s-.4.608-.787.61-.8-.19-.8-.619Z" transform="translate(-35.54 -3.536)" fill="#fff"/>
|
|
28
|
+
<path id="Path_11908" data-name="Path 11908" d="M58.048,6.59V5.762H57.3V6.59h-.417V4.631H57.3v.747h.75V4.631h.42V6.59Z" transform="translate(-45.5 -3.704)" fill="#fff"/>
|
|
29
|
+
<path id="Path_11909" data-name="Path 11909" d="M70.329,6.5a.958.958,0,0,1-1-1.01,1,1,0,1,1,2,0A.963.963,0,0,1,70.329,6.5m.006-.381a.57.57,0,0,0,.582-.63.582.582,0,1,0-1.162,0,.564.564,0,0,0,.579.63" transform="translate(-55.459 -3.581)" fill="#fff"/>
|
|
30
|
+
<path id="Path_11910" data-name="Path 11910" d="M83.842,6.57V4.611c.28,0,.557,0,.837,0a.676.676,0,0,1,.7.714.667.667,0,0,1-.7.692h-.417V6.57Zm.837-.913a.315.315,0,0,0,.3-.344.309.309,0,0,0-.3-.336h-.426v.68Z" transform="translate(-67.066 -3.687)" fill="#fff"/>
|
|
31
|
+
</g>
|
|
32
|
+
</g>
|
|
33
|
+
</g>
|
|
34
|
+
</svg>
|
|
@@ -20,10 +20,12 @@ import Check from './check.svg'
|
|
|
20
20
|
import CheckInCircle from './check-in-circle.svg'
|
|
21
21
|
import CheckPen from './check-pen.svg'
|
|
22
22
|
import Chemistry from './chemistry.svg'
|
|
23
|
+
import CircleFace from './circle-face.svg'
|
|
23
24
|
import Cleaning from './cleaning.svg'
|
|
24
25
|
import Closet from './closet.svg'
|
|
25
26
|
import Clouds from './clouds.png'
|
|
26
27
|
import Co2 from './co2.svg'
|
|
28
|
+
import Company from './company.svg'
|
|
27
29
|
import ComputerReport from './computer-report.svg'
|
|
28
30
|
import Confirmation from './confirmation.svg'
|
|
29
31
|
import Construction from './construction.svg'
|
|
@@ -76,6 +78,7 @@ import Laundry from './laundry.svg'
|
|
|
76
78
|
import Light from './light.svg'
|
|
77
79
|
import LivingRoom from './living-room.svg'
|
|
78
80
|
import Loading from './loading.svg'
|
|
81
|
+
import Location from './location.jpg'
|
|
79
82
|
import LogoCompany from './logo-company.svg'
|
|
80
83
|
import LogoSmall from './logo-small.svg'
|
|
81
84
|
import MagnifyingGlassReport from './magnifying-glass-report.svg'
|
|
@@ -172,10 +175,12 @@ export {
|
|
|
172
175
|
CheckInCircle,
|
|
173
176
|
CheckPen,
|
|
174
177
|
Chemistry,
|
|
178
|
+
CircleFace,
|
|
175
179
|
Cleaning,
|
|
176
180
|
Closet,
|
|
177
181
|
Clouds,
|
|
178
182
|
Co2,
|
|
183
|
+
Company,
|
|
179
184
|
ComputerReport,
|
|
180
185
|
Confirmation,
|
|
181
186
|
Construction,
|
|
@@ -228,6 +233,7 @@ export {
|
|
|
228
233
|
Light,
|
|
229
234
|
LivingRoom,
|
|
230
235
|
Loading,
|
|
236
|
+
Location,
|
|
231
237
|
LogoCompany,
|
|
232
238
|
LogoSmall,
|
|
233
239
|
MagnifyingGlassReport,
|
|
@@ -308,3 +314,4 @@ export * from './form'
|
|
|
308
314
|
export * from './logos'
|
|
309
315
|
export * from './groups'
|
|
310
316
|
export * from './placeholders'
|
|
317
|
+
export * from './shine'
|
|
Binary file
|
|
@@ -5,6 +5,17 @@ import Lowes from './lowes.png'
|
|
|
5
5
|
import Walmart from './walmart.png'
|
|
6
6
|
import Prime from './prime.png'
|
|
7
7
|
import Sears from './sears.png'
|
|
8
|
+
import Shine from './shine.png'
|
|
8
9
|
import Terminix from './terminix.png'
|
|
9
10
|
|
|
10
|
-
export {
|
|
11
|
+
export {
|
|
12
|
+
APHW,
|
|
13
|
+
HomeDepot,
|
|
14
|
+
Homefile,
|
|
15
|
+
Lowes,
|
|
16
|
+
Walmart,
|
|
17
|
+
Prime,
|
|
18
|
+
Sears,
|
|
19
|
+
Shine,
|
|
20
|
+
Terminix,
|
|
21
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import GutterCleaning from './gutter-cleaning.png'
|
|
2
|
+
import HomeCleaning from './home-cleaning.png'
|
|
3
|
+
import HolidayLights from './holiday-lights.png'
|
|
4
|
+
import Pressure from './pressure.png'
|
|
5
|
+
import RoofCleaning from './roof-cleaning.png'
|
|
6
|
+
import WindowCleaning from './window.png'
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
GutterCleaning,
|
|
10
|
+
HomeCleaning,
|
|
11
|
+
HolidayLights,
|
|
12
|
+
Pressure,
|
|
13
|
+
RoofCleaning,
|
|
14
|
+
WindowCleaning,
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -109,7 +109,8 @@
|
|
|
109
109
|
"previous": "Previous",
|
|
110
110
|
"save": "Save",
|
|
111
111
|
"send": "Send",
|
|
112
|
-
"skip": "Skip for now"
|
|
112
|
+
"skip": "Skip for now",
|
|
113
|
+
"saveStep": "Save Step"
|
|
113
114
|
},
|
|
114
115
|
"createDocument": {
|
|
115
116
|
"tabs": {
|
|
@@ -139,11 +140,20 @@
|
|
|
139
140
|
},
|
|
140
141
|
"contacts": {
|
|
141
142
|
"addBtn": "Contact",
|
|
143
|
+
"addContact": "Add Contact",
|
|
144
|
+
"companyInfo": "Company Info",
|
|
145
|
+
"contactView": "View Contact",
|
|
146
|
+
"details": "Details",
|
|
147
|
+
"editContact": "Edit Contact",
|
|
142
148
|
"error": "Email should be from a valid Homefile account",
|
|
149
|
+
"homeAddress": "Home Address",
|
|
150
|
+
"notes": "Notes",
|
|
143
151
|
"shareContact": "Share Contact",
|
|
152
|
+
"permissions": "Permissions",
|
|
144
153
|
"placeholders": {
|
|
145
154
|
"email": "Enter Email"
|
|
146
155
|
},
|
|
156
|
+
"rating": "Homeowner Rating",
|
|
147
157
|
"title": "Contacts"
|
|
148
158
|
},
|
|
149
159
|
"daysOfWeek": {
|
|
@@ -601,6 +611,18 @@
|
|
|
601
611
|
},
|
|
602
612
|
"needImage": "Need image",
|
|
603
613
|
"noResults": "No results found",
|
|
614
|
+
"shine": {
|
|
615
|
+
"heroTitle": "We do windows and so much more!",
|
|
616
|
+
"scheduleService": "Schedule a Service",
|
|
617
|
+
"services": {
|
|
618
|
+
"home": "Home Cleaning",
|
|
619
|
+
"lights": "Holiday Lights",
|
|
620
|
+
"gutter": "Gutter Cleaning",
|
|
621
|
+
"roof": "Roof Cleaning",
|
|
622
|
+
"pressure": "Pressure Washing",
|
|
623
|
+
"window": "Window Cleaning"
|
|
624
|
+
}
|
|
625
|
+
},
|
|
604
626
|
"tabs": {
|
|
605
627
|
"code": "Code",
|
|
606
628
|
"content": "Content",
|
|
@@ -12,41 +12,44 @@ export const ContactCard = ({
|
|
|
12
12
|
contact,
|
|
13
13
|
index,
|
|
14
14
|
menuItems,
|
|
15
|
+
onClick,
|
|
15
16
|
onShare,
|
|
16
17
|
}: ContactCardI) => {
|
|
17
|
-
const
|
|
18
|
-
address,
|
|
19
|
-
city,
|
|
20
|
-
state,
|
|
21
|
-
zip,
|
|
22
|
-
company,
|
|
23
|
-
email,
|
|
24
|
-
firstName,
|
|
25
|
-
lastName,
|
|
26
|
-
phone,
|
|
27
|
-
} = contact
|
|
18
|
+
const hasOnClick = typeof onClick === 'function'
|
|
28
19
|
return (
|
|
29
|
-
<Container
|
|
30
|
-
|
|
20
|
+
<Container
|
|
21
|
+
maxW="none"
|
|
22
|
+
textAlign="start"
|
|
23
|
+
onClick={() => onClick?.({ ...contact, index })}
|
|
24
|
+
transition="background-color 0.3s"
|
|
25
|
+
_hover={{
|
|
26
|
+
bg: hasOnClick ? 'lightGreen.1' : 'transparent',
|
|
27
|
+
}}
|
|
28
|
+
cursor={hasOnClick ? 'pointer' : 'default'}
|
|
29
|
+
>
|
|
30
|
+
<Stack pb="base" pt="1" px="base" spacing="base">
|
|
31
31
|
<ContactCardHeader
|
|
32
32
|
apiError={apiError}
|
|
33
33
|
contact={contact}
|
|
34
34
|
menuItems={menuItems}
|
|
35
35
|
onShare={onShare}
|
|
36
36
|
/>
|
|
37
|
-
<
|
|
38
|
-
<ContactCardInfo
|
|
39
|
-
{...{ company, email, firstName, lastName, phone, index }}
|
|
40
|
-
/>
|
|
41
|
-
<Box
|
|
42
|
-
borderLeft={`1px solid ${colors.lightBlue[1]}`}
|
|
43
|
-
w="45%"
|
|
44
|
-
pl="base"
|
|
45
|
-
>
|
|
46
|
-
<ContactCardAddress {...{ company, address, city, state, zip }} />
|
|
47
|
-
</Box>
|
|
48
|
-
</Flex>
|
|
37
|
+
<CardBody {...{ contact, index }} />
|
|
49
38
|
</Stack>
|
|
50
39
|
</Container>
|
|
51
40
|
)
|
|
52
41
|
}
|
|
42
|
+
|
|
43
|
+
const CardBody = ({
|
|
44
|
+
contact,
|
|
45
|
+
index,
|
|
46
|
+
}: Pick<ContactCardI, 'contact' | 'index'>) => {
|
|
47
|
+
return (
|
|
48
|
+
<Flex justify="space-between" align="stretch" gap="base">
|
|
49
|
+
<ContactCardInfo {...{ ...contact, index }} />
|
|
50
|
+
<Box borderLeft={`1px solid ${colors.lightBlue[1]}`} w="45%" pl="base">
|
|
51
|
+
<ContactCardAddress {...contact} />
|
|
52
|
+
</Box>
|
|
53
|
+
</Flex>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { t } from 'i18next'
|
|
2
|
-
import { Flex,
|
|
2
|
+
import { Flex, Image, Text } from '@chakra-ui/react'
|
|
3
3
|
import { Contacts } from '@/assets/images'
|
|
4
|
-
import {
|
|
5
|
-
IconMenu,
|
|
6
|
-
MoreHorizontal,
|
|
7
|
-
ShareContactPopover,
|
|
8
|
-
ShareIcon,
|
|
9
|
-
} from '@/components'
|
|
4
|
+
import { ContactHeaderMenu } from '@/components'
|
|
10
5
|
import { ContactCardHeaderI } from '@/interfaces'
|
|
11
6
|
|
|
12
|
-
export const ContactCardHeader = ({
|
|
13
|
-
|
|
14
|
-
contact,
|
|
15
|
-
menuItems,
|
|
16
|
-
onShare,
|
|
17
|
-
}: ContactCardHeaderI) => {
|
|
18
|
-
const { category, title } = contact
|
|
19
|
-
const { isOpen, onOpen, onClose } = useDisclosure()
|
|
7
|
+
export const ContactCardHeader = (props: ContactCardHeaderI) => {
|
|
8
|
+
const { category, title } = props.contact
|
|
20
9
|
return (
|
|
21
10
|
<Flex align="center" justify="space-between">
|
|
22
11
|
<Flex align="center" gap="base">
|
|
@@ -35,29 +24,7 @@ export const ContactCardHeader = ({
|
|
|
35
24
|
<Text fontSize="xs">{title.toUpperCase()}</Text>
|
|
36
25
|
</Flex>
|
|
37
26
|
</Flex>
|
|
38
|
-
<
|
|
39
|
-
<IconButton
|
|
40
|
-
aria-label="share"
|
|
41
|
-
variant="menuIcon"
|
|
42
|
-
icon={<ShareIcon size={18} />}
|
|
43
|
-
onClick={onOpen}
|
|
44
|
-
w="fit-content"
|
|
45
|
-
/>
|
|
46
|
-
<ShareContactPopover
|
|
47
|
-
apiError={apiError}
|
|
48
|
-
contact={contact}
|
|
49
|
-
isOpen={isOpen}
|
|
50
|
-
onClose={onClose}
|
|
51
|
-
onShare={onShare}
|
|
52
|
-
/>
|
|
53
|
-
|
|
54
|
-
<IconMenu
|
|
55
|
-
icon={<MoreHorizontal size={32} />}
|
|
56
|
-
itemForm={contact}
|
|
57
|
-
menuItems={menuItems}
|
|
58
|
-
disabled={menuItems.length < 1}
|
|
59
|
-
/>
|
|
60
|
-
</Flex>
|
|
27
|
+
<ContactHeaderMenu {...props} />
|
|
61
28
|
</Flex>
|
|
62
29
|
)
|
|
63
30
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Flex, IconButton, useDisclosure } from '@chakra-ui/react'
|
|
2
|
+
import {
|
|
3
|
+
ShareIcon,
|
|
4
|
+
MoreHorizontal,
|
|
5
|
+
IconMenu,
|
|
6
|
+
ShareContactPopover,
|
|
7
|
+
} from '@/components'
|
|
8
|
+
import { ContactCardHeaderI } from '@/interfaces'
|
|
9
|
+
|
|
10
|
+
export const ContactHeaderMenu = ({
|
|
11
|
+
apiError,
|
|
12
|
+
contact,
|
|
13
|
+
menuItems,
|
|
14
|
+
onShare,
|
|
15
|
+
}: ContactCardHeaderI) => {
|
|
16
|
+
const { isOpen, onOpen, onClose } = useDisclosure()
|
|
17
|
+
return (
|
|
18
|
+
<Flex align="center" position="relative" gap="base">
|
|
19
|
+
<IconButton
|
|
20
|
+
aria-label="share"
|
|
21
|
+
variant="menuIcon"
|
|
22
|
+
icon={<ShareIcon size={18} />}
|
|
23
|
+
onClick={onOpen}
|
|
24
|
+
w="fit-content"
|
|
25
|
+
/>
|
|
26
|
+
<ShareContactPopover
|
|
27
|
+
apiError={apiError}
|
|
28
|
+
contact={contact}
|
|
29
|
+
isOpen={isOpen}
|
|
30
|
+
onClose={onClose}
|
|
31
|
+
onShare={onShare}
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<IconMenu
|
|
35
|
+
icon={<MoreHorizontal size={32} />}
|
|
36
|
+
itemForm={contact}
|
|
37
|
+
menuItems={menuItems}
|
|
38
|
+
disabled={menuItems.length < 1}
|
|
39
|
+
/>
|
|
40
|
+
</Flex>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -24,6 +24,7 @@ export const ContactsContent = ({
|
|
|
24
24
|
children,
|
|
25
25
|
handleAdd,
|
|
26
26
|
disabled,
|
|
27
|
+
onClick,
|
|
27
28
|
onShare,
|
|
28
29
|
}: ContactsContentI) => {
|
|
29
30
|
const { filteredContacts, handleChange, search } =
|
|
@@ -58,7 +59,7 @@ export const ContactsContent = ({
|
|
|
58
59
|
/>
|
|
59
60
|
</Flex>
|
|
60
61
|
</DrawerHeader>
|
|
61
|
-
<DrawerBody p="0">
|
|
62
|
+
<DrawerBody p="0" overflowX="hidden">
|
|
62
63
|
<Stack spacing="2" p="base" bg="lightBlue.2" minHeight="full">
|
|
63
64
|
{filteredContacts.map((contact, idx) => (
|
|
64
65
|
<ContactCard
|
|
@@ -66,6 +67,7 @@ export const ContactsContent = ({
|
|
|
66
67
|
key={contact._id}
|
|
67
68
|
contact={contact}
|
|
68
69
|
menuItems={menuItems}
|
|
70
|
+
onClick={onClick}
|
|
69
71
|
onShare={onShare}
|
|
70
72
|
index={idx}
|
|
71
73
|
/>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { t } from 'i18next'
|
|
2
|
+
import {
|
|
3
|
+
DrawerContent,
|
|
4
|
+
DrawerHeader,
|
|
5
|
+
DrawerBody,
|
|
6
|
+
Flex,
|
|
7
|
+
Box,
|
|
8
|
+
Text,
|
|
9
|
+
} from '@chakra-ui/react'
|
|
10
|
+
import { BackCircleButton, PanelHeader, TabsHeader } from '@/components'
|
|
11
|
+
import { Contacts } from '@/assets/images'
|
|
12
|
+
import { AddEditContactPanelI } from '@/interfaces'
|
|
13
|
+
import { dynamicFormProxy } from '@/proxies'
|
|
14
|
+
import { useSnapshot } from 'valtio'
|
|
15
|
+
|
|
16
|
+
export const AddEditContactPanel = ({
|
|
17
|
+
detailsComponent,
|
|
18
|
+
isEditing,
|
|
19
|
+
onBackClick,
|
|
20
|
+
permissionsComponent,
|
|
21
|
+
}: AddEditContactPanelI) => {
|
|
22
|
+
const { fields } = useSnapshot(dynamicFormProxy)
|
|
23
|
+
const name = fields?.[0]?.children?.[0].children
|
|
24
|
+
const fullName = `${name?.[0].value} ${name?.[1].value}`
|
|
25
|
+
const tabs = [
|
|
26
|
+
{
|
|
27
|
+
label: t('contacts.details'),
|
|
28
|
+
component: detailsComponent,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: t('contacts.permissions'),
|
|
32
|
+
component: permissionsComponent,
|
|
33
|
+
},
|
|
34
|
+
]
|
|
35
|
+
return (
|
|
36
|
+
<DrawerContent bg="lightBlue.1">
|
|
37
|
+
<DrawerHeader p="0">
|
|
38
|
+
<PanelHeader
|
|
39
|
+
handleCloseButton={() => null}
|
|
40
|
+
icon={Contacts}
|
|
41
|
+
title={
|
|
42
|
+
isEditing ? t('contacts.editContact') : t('contacts.addContact')
|
|
43
|
+
}
|
|
44
|
+
/>
|
|
45
|
+
<Flex align="center" gap="base" bg="lightBlue.2" p="base">
|
|
46
|
+
<BackCircleButton onClick={onBackClick} />
|
|
47
|
+
<Box
|
|
48
|
+
borderLeft="solid"
|
|
49
|
+
borderWidth="1px"
|
|
50
|
+
borderColor="lightBlue.6"
|
|
51
|
+
h="1.75rem"
|
|
52
|
+
/>
|
|
53
|
+
<Text fontSize="lg" fontWeight="medium" isTruncated>
|
|
54
|
+
{fullName}
|
|
55
|
+
</Text>
|
|
56
|
+
</Flex>
|
|
57
|
+
</DrawerHeader>
|
|
58
|
+
<DrawerBody p="0" overflowX="hidden" position="relative">
|
|
59
|
+
<TabsHeader tabList={tabs} />
|
|
60
|
+
</DrawerBody>
|
|
61
|
+
</DrawerContent>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AddEditContactPanel'
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export * from './addEditPanel'
|
|
1
2
|
export * from './shareContactForms'
|
|
3
|
+
export * from './viewPanel'
|
|
2
4
|
export * from './ContactCard'
|
|
3
5
|
export * from './ContactCardAddress'
|
|
4
6
|
export * from './ContactCardHeader'
|
|
5
7
|
export * from './ContactCardInfo'
|
|
8
|
+
export * from './ContactHeaderMenu'
|
|
6
9
|
export * from './ContactsContent'
|
|
7
10
|
export * from './ShareContactPopover'
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { t } from 'i18next'
|
|
2
|
+
import { Box, Center, Flex, Stack, Text, Image } from '@chakra-ui/react'
|
|
3
|
+
import { ViewContactPanelI } from '@/interfaces'
|
|
4
|
+
import { getImageAltText } from '@/utils'
|
|
5
|
+
import { Location } from '@/assets/images'
|
|
6
|
+
import { CompanyRating } from './CompanyRating'
|
|
7
|
+
|
|
8
|
+
export const CompanyInfoCard = ({
|
|
9
|
+
contact,
|
|
10
|
+
}: Pick<ViewContactPanelI, 'contact'>) => {
|
|
11
|
+
if (!contact.companyInfo) return null
|
|
12
|
+
const { company, phone, url, address, city, state, zip, rating } =
|
|
13
|
+
contact.companyInfo
|
|
14
|
+
const alt = getImageAltText(Location)
|
|
15
|
+
return (
|
|
16
|
+
<Box position="relative">
|
|
17
|
+
<CompanyRating
|
|
18
|
+
contact={contact}
|
|
19
|
+
position="absolute"
|
|
20
|
+
top="0"
|
|
21
|
+
right="0"
|
|
22
|
+
zIndex="1"
|
|
23
|
+
/>
|
|
24
|
+
<Stack spacing="base">
|
|
25
|
+
<Text textTransform="uppercase" fontSize="xs">
|
|
26
|
+
{t('contacts.companyInfo')}
|
|
27
|
+
</Text>
|
|
28
|
+
<Flex gap="base" minH="50px">
|
|
29
|
+
<Center h="78px" w="78px">
|
|
30
|
+
<Image src={Location} alt={alt} />
|
|
31
|
+
</Center>
|
|
32
|
+
<Stack spacing="6">
|
|
33
|
+
<Stack spacing="0.5">
|
|
34
|
+
<Text fontWeight="bold" fontSize="lg">
|
|
35
|
+
{company}
|
|
36
|
+
</Text>
|
|
37
|
+
<Box>
|
|
38
|
+
<Text fontSize="sm">{phone}</Text>
|
|
39
|
+
<Text variant="email" lineHeight="1" fontSize="sm">
|
|
40
|
+
{url}
|
|
41
|
+
</Text>
|
|
42
|
+
</Box>
|
|
43
|
+
</Stack>
|
|
44
|
+
<Box>
|
|
45
|
+
<Text fontSize="xs" lineHeight="16px">
|
|
46
|
+
{address}
|
|
47
|
+
</Text>
|
|
48
|
+
<Text
|
|
49
|
+
fontSize="xs"
|
|
50
|
+
lineHeight="16px"
|
|
51
|
+
>{`${city}, ${state} ${zip}`}</Text>
|
|
52
|
+
</Box>
|
|
53
|
+
</Stack>
|
|
54
|
+
</Flex>
|
|
55
|
+
</Stack>
|
|
56
|
+
</Box>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { t } from 'i18next'
|
|
2
|
+
import { StackProps, Flex, Stack, Text } from '@chakra-ui/react'
|
|
3
|
+
import { Star } from '@/components'
|
|
4
|
+
import { ViewContactPanelI } from '@/interfaces'
|
|
5
|
+
import { colors } from '@/theme/colors'
|
|
6
|
+
|
|
7
|
+
export const CompanyRating = ({
|
|
8
|
+
contact,
|
|
9
|
+
...props
|
|
10
|
+
}: Pick<ViewContactPanelI, 'contact'> & StackProps) => {
|
|
11
|
+
if (!contact.companyInfo?.rating) return null
|
|
12
|
+
const { rating, _id } = contact.companyInfo
|
|
13
|
+
return (
|
|
14
|
+
<Stack spacing="0" align="end" {...props}>
|
|
15
|
+
<Text textTransform="uppercase" fontSize="10px">
|
|
16
|
+
{t('contacts.rating')}
|
|
17
|
+
</Text>
|
|
18
|
+
<Flex align="center" gap="1">
|
|
19
|
+
{Array.from({ length: 5 }).map((_, index) => {
|
|
20
|
+
const starColor =
|
|
21
|
+
rating >= index ? colors.yellow['1'] : colors.gray['1']
|
|
22
|
+
return <Star key={`${_id}-${index}`} stroke={starColor} size={13} />
|
|
23
|
+
})}
|
|
24
|
+
</Flex>
|
|
25
|
+
</Stack>
|
|
26
|
+
)
|
|
27
|
+
}
|