Merge branch 'develop' into feature/CSR-1742-ajc

This commit is contained in:
Adam Caouette 2024-04-24 09:06:29 -04:00
commit b3944f2ab4
15 changed files with 309 additions and 105 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -11,7 +11,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>

View file

@ -1,8 +1,6 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 231.2 71" xml:space="preserve">
<svg version="1.1" id="SafeliteLogo" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 451.2 73.6" style="enable-background:new 0 0 451.2 73.6" xml:space="preserve">
<style>
.st0{fill:#d92d27}
.st0{fill:#db0020}
</style>
<path class="st0" d="M159.7 0c-20 .5-42.5 11.7-53.1 20 0 0 13.8-2.6 33.2 1.9 0 0 .3-6.2 5-13.1 3.5-5 14.9-8.8 14.9-8.8"/>
<path d="M94.2 20.8s21-14.3 49.4-20.3c0 0-19.6.5-39.8 7.9-26.7 9.8-33.2 17.2-33.2 17.2 17.2-5.1 23.6-4.8 23.6-4.8" fill="#020202"/>
<path class="st0" d="M219.5 65.1c0-3.2 2.6-5.8 5.9-5.8 3.2 0 5.8 2.6 5.8 5.8 0 3.3-2.6 5.9-5.8 5.9-3.3 0-5.9-2.7-5.9-5.9m10.7 0c0-2.6-2.1-4.8-4.8-4.8-2.7 0-4.8 2.2-4.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1 7.4-1.4.9-.1 1.6.5 1.6 1.4v4.9c0 5.3-2.2 8.1-8 8.1zM364.2 34.3h7.3c.8 0 1.4-.6 1.4-1.4v-8.1c0-.8-.6-1.4-1.4-1.4h-7.3c-.8 0-1.4-.6-1.4-1.4l-.1-20.4v-.4c0-.6-.5-1.1-1.1-1.1-.2 0-.3 0-.4.1h-.1l-22.6 13.4c-1 .6-1.4.7-1.4 1.4v45.4c0 10.9 6.1 12.5 21.8 12.5 3.9 0 8.3-.2 12.7-.4.7-.1 1.3-.7 1.3-1.4v-6.8c0-.8-.6-1.4-1.4-1.4h-2.6c-4.1 0-6.1-1-6.1-3.8V35.8c0-.9.6-1.5 1.4-1.5z"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 3 KiB

View file

@ -94,6 +94,7 @@ export default {
}
.logo-image {
max-width: 78px;
max-width: 114px;
height: auto;
}
</style>

View file

@ -258,8 +258,13 @@ export default {
this.displayNonServiceableZipAlert = false;
const payment = this.$store.getters.payment;
const policy = this.$store.getters.policy;
const vehicleChangedDuringPolicyLookupInHeritage =
payment.isInsurance && payment.insuranceCoverage.coverageStatus;
payment.isInsurance &&
payment.insuranceCoverage.coverageStatus &&
policy.policyNumber !== "";
if (vehicleChangedDuringPolicyLookupInHeritage) {
navigateToHeritageFunnel({
shouldSaveSession: true,

View file

@ -1,6 +1,6 @@
<template>
<textboxQuestion
v-model="selectedAccountNumber"
v-model="selectedAccountName"
customInputId="autocomplete"
class="mb-4 mt-5"
cmsWidgetName="InsuranceCoQuestionWidget"
@ -12,12 +12,6 @@
import textboxQuestion from "@/digital-components/textbox-question/textbox-question";
// Supporting files
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
import { storeActions } from "@/constants/store-actions";
import { Form, defineRule } from "vee-validate";
import baseMixin from "@/mixins/base-mixin.js";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import $ from "jquery";
// MAPPNG
@ -50,14 +44,10 @@ export default {
computed: {
selectedAccountNumber: {
get: function () {
if (this.selectedAccountName.length > 0) {
return this.selectedAccountName;
} else {
return this.modelValue?.toString();
}
return this.modelValue?.toString();
},
set: function (newValue) {
this.$emit("update:modelValue", newValue);
this.$emit("update:modelValue", newValue); // send data up to v-model on parent, s/b account number
},
},
searchableInsuranceCompanyList() {
@ -79,6 +69,30 @@ export default {
},
},
methods: {
getParentAccountNumber(name) {
const matchedItems = this.searchableInsuranceCompanyList?.filter((item) => {
return item.accountName?.toString() === name.toString();
});
if (matchedItems.length > 0) {
return matchedItems[0].parentAccountNumber;
} else {
console.error("Error locating accountNumber");
return;
}
},
getParentAccountName(number) {
const matchedItems = this.searchableInsuranceCompanyList?.filter((item) => {
return item.parentAccountNumber?.toString() === number.toString();
});
if (matchedItems.length > 0) {
return matchedItems[0].accountName;
} else {
console.error("Error locating accountName");
return;
}
},
findMatches(request, response) {
const matches = [];
const term = request?.term?.toUpperCase();
@ -92,26 +106,23 @@ export default {
});
response(matches);
},
selectParentAccountNumber(parentAccountName) {
selectInsuranceCompany(parentAccountName) {
// this runs upon user selection within jQueryUI Autocomplete
if (!this.searchableInsuranceCompanyList) {
console.error("No insurance companies found");
return;
}
const selectedItem = this.searchableInsuranceCompanyList.filter((item) => {
return item.accountName === parentAccountName;
});
if (selectedItem) {
this.selectedAccountName = parentAccountName;
this.selectedAccountNumber = selectedItem[0].parentAccountNumber;
} else {
console.error("Error locating " + parentAccountName);
}
const parentAccountNumber = this.getParentAccountNumber(parentAccountName);
this.selectedAccountNumber = parentAccountNumber;
this.selectedAccountName = this.getParentAccountName(parentAccountNumber);
},
},
mounted() {
const select = this.selectParentAccountNumber;
if (this.modelValue.length > 0) {
this.selectedAccountName = this.getParentAccountName(this.modelValue?.toString());
}
const select = this.selectInsuranceCompany;
setTimeout(() => {
$("#autocomplete").autocomplete({
source: this.findMatches,

View file

@ -11,9 +11,11 @@
<div class="col-md-6 col-xl-4">
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" class="mt-4" />
<insurance-company-question
v-model="parentAccountNumber"
:originalList="originalList" />
<div v-if="originalList.length > 0">
<insurance-company-question
v-model="parentAccountNumber"
:originalList="originalList" />
</div>
<navbar
cmsWidgetName="FunnelFooterWidget"
@ -84,7 +86,8 @@ export default {
},
methods: {
parentAccountNumberFromStore() {
return store?.order?.payment?.parentAccountNumber;
const accountNumber = store.getters.order?.payment?.parentAccountNumber.toString();
return accountNumber;
},
arePagePrerequisitesValid() {
return store.getters.order.payment.isInsurance === true;
@ -99,7 +102,7 @@ export default {
await this.dispatchStoreAction(
this.storeActions.SAVE_PARENT_ACCOUNT_NUMBER,
this.parentAccountNumber,
this.parentAccountNumber.toString(),
false
);
navigateToHeritageFunnel({

View file

@ -718,18 +718,6 @@ describe("vehicle-damage.vue", () => {
);
});
describe("hide back button", () => {
test("if claim registration is delayed => should hide back button", () => {
// Arrange
const { wrapper } = setupMocks({
funnelCookie: {
HasDelayedClaimRegistration: true,
},
});
// Assert
expect(wrapper.vm.shouldHideBackButton).toBe(true);
});
test("if claim is verified => should hide back button", () => {
// Arrange
const { wrapper } = setupMocks({

View file

@ -93,6 +93,7 @@ import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-que
import alert from "@/ux-components/alert/alert";
// Supporting files
import { skipVinLookup } from "@/helpers/heritage-integration/navigation-helper";
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
import { storeActions } from "@/constants/store-actions";
@ -365,25 +366,38 @@ export default {
return this.navigateForward();
},
navigateForward() {
async navigateForward() {
const payment = this.$store.getters.payment;
const policy = this.$store.getters.policy;
const vehicleChangedDuringPolicyLookupInHeritage =
payment.isInsurance &&
payment.insuranceCoverage.coverageStatus &&
payment.insuranceCoverage.coverageStatus !== "";
payment.insuranceCoverage.coverageStatus !== "" &&
policy.policyNumber !== "";
if (vehicleChangedDuringPolicyLookupInHeritage) {
if (store.getters.damage.isRepair) {
const skipVin = await skipVinLookup();
if (skipVin) {
this.$router.navigateWithSaving(
this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN,
this.$route
);
} else {
this.$router.navigateWithSaving(
this.navigationScenarios
.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
this.$route
);
if (store.getters.damage.isRepair) {
this.$router.navigateWithSaving(
this.navigationScenarios
.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
this.$route
);
} else {
this.$router.navigateWithSaving(
this.navigationScenarios
.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
this.$route
);
}
}
}
// If vin already exists, navigate directly to vin-lookup
@ -527,10 +541,7 @@ export default {
return this.$route.params[this.routerParams.DISPLAY_VEHICLE_CHANGE_ALERT];
},
shouldHideBackButton() {
return (
this.$store.getters.payment.insuranceCoverage.isVerified ||
getFunnelCookie()?.HasDelayedClaimRegistration
);
return this.$store.getters.payment.insuranceCoverage.isVerified;
},
},

View file

@ -12,7 +12,7 @@
<vehicleQuestion
ref="vehicleYearQuestion"
v-model="selectedYear"
:isDisabled="!yearOptions.length"
:isDisabled="isYearDisabled"
:options="yearOptions"
cmsWidgetName="VehicleYearQuestion"
validationRules="year-required"
@ -22,7 +22,7 @@
<vehicleQuestion
ref="vehicleMakeQuestion"
v-model="selectedMake"
:isDisabled="!makeOptions.length"
:isDisabled="isMakeDisabled"
:options="makeOptions"
cmsWidgetName="VehicleMakeQuestion"
validationRules="make-required"
@ -33,7 +33,7 @@
ref="vehicleModelQuestion"
v-model="selectedModel"
cmsWidgetName="VehicleModelQuestion"
:isDisabled="!modelOptions.length"
:isDisabled="isModelDisabled"
:options="modelOptions"
validationRules="model-required"
placeHolderText="Select model"
@ -43,7 +43,7 @@
ref="vehicleStyleQuestion"
v-model="selectedStyle"
cmsWidgetName="VehicleStyleQuestion"
:isDisabled="!styleOptions.length"
:isDisabled="isStyleDisabled"
:options="styleOptions"
validationRules="style-required"
placeHolderText="Select style"
@ -97,6 +97,7 @@ import { errorMessages } from "@/constants/error-messages";
import store from "@/store";
import { storeActions } from "@/constants/store-actions.js";
import baseMixin from "@/mixins/base-mixin.js";
import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper";
//define validation rules
defineRule("year-required", required(errorMessages.YEAR_REQUIRED));
@ -311,6 +312,18 @@ export default {
},
},
computed: {
isYearDisabled() {
return this.isDisabled(this.yearOptions);
},
isMakeDisabled() {
return this.isDisabled(this.makeOptions);
},
isModelDisabled() {
return this.isDisabled(this.modelOptions);
},
isStyleDisabled() {
return this.isDisabled(this.styleOptions);
},
unmatchedVehicleIcon() {
if (this.imageUrl == null && this.carId !== null) return true;
else return false;
@ -332,6 +345,17 @@ export default {
},
},
methods: {
isDisabled(options) {
if (
!options.length ||
store.getters.payment?.insuranceCoverage?.isVerified ||
getFunnelCookie()?.HasDelayedClaimRegistration
) {
return true;
} else {
return false;
}
},
getVehicle(year, make, model, style) {
return this.dispatchStoreActionWithLogging(
this.storeActions.GET_VEHICLE,

View file

@ -262,7 +262,24 @@ export default {
isPricingAvailable &&
combinedLineItems.every((lineItem) => isDefined(lineItem.salesTax));
if (isPricingAvailable) {
//unverified (in scenarios we dont display the price)
if (
order.payment.isInsurance &&
isDefined(order.payment.insuranceCoverage.isVerified) &&
!order.payment.insuranceCoverage.isVerified
) {
payload.priceSubTotal = "";
}
//deductible (in scenarios we dont display the price)
else if (
order.payment.isInsurance &&
isDefined(order.payment.insuranceCoverage.isVerified) &&
order.payment.insuranceCoverage.isVerified &&
isDefined(order.policy.currentDeductible) &&
order.policy.currentDeductible == 0
) {
payload.priceSubTotal = "";
} else if (isPricingAvailable) {
const subtotal = baseMixin.methods
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
.toFixed(2);
@ -271,8 +288,24 @@ export default {
} else {
payload.priceSubTotal = "";
}
if (isTaxAvailable) {
//unverified (in scenarios we dont display the price)
if (
order.payment.isInsurance &&
isDefined(order.payment.insuranceCoverage.isVerified) &&
!order.payment.insuranceCoverage.isVerified
) {
payload.priceTotal = "";
}
//deductible (in scenarios we dont display the price)
else if (
order.payment.isInsurance &&
isDefined(order.payment.insuranceCoverage.isVerified) &&
order.payment.insuranceCoverage.isVerified &&
isDefined(order.policy.currentDeductible) &&
order.policy.currentDeductible == 0
) {
payload.priceTotal = "";
} else if (isTaxAvailable) {
const total = baseMixin.methods
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, true)
.toFixed(2);
@ -295,6 +328,31 @@ export default {
} else {
payload.appointmentType = "";
}
//Insurance
if (order.payment.isInsurance) {
payload.isInsuranceVerified = order.payment.insuranceCoverage.isVerified ?? "";
if (!order.payment.insuranceCoverage.isVerified) {
payload.isInsuranceItac = "";
payload.isInsuranceNoComp = "";
} else {
payload.isInsuranceItac = order.policy.isItac ?? "";
payload.isInsuranceNoComp = order.policy.isNoComp ?? "";
}
if (
order.policy.isItac ||
order.policy.isNoComp ||
!order.payment.insuranceCoverage.isVerified
) {
payload.insuranceDeductible = "";
} else {
payload.insuranceDeductible = order.policy.currentDeductible ?? "";
}
} else {
payload.isInsuranceVerified = "";
payload.insuranceDeductible = "";
payload.isInsuranceItac = "";
payload.isInsuranceNoComp = "";
}
pushToDataLayerIfDefined(payload);
},

View file

@ -454,7 +454,15 @@ describe("analyticsMixin.js", () => {
// Assert
console.log(result);
const allFieldsPopulated = Object.keys(result).every(
(key) => result[key] === false || !!result[key]
(key) =>
result[key] === false ||
!!result[key] ||
(result["accountType"] === "cash"
? result["isInsuranceVerified"] === "" &&
result["insuranceDeductible"] === "" &&
result["isInsuranceItac"] === "" &&
result["isInsuranceNoComp"] === ""
: false)
);
expect(allFieldsPopulated).toBe(true);
});
@ -543,7 +551,15 @@ describe("analyticsMixin.js", () => {
// Assert
console.log(result);
const allFieldsPopulated = Object.keys(result).every(
(key) => result[key] === false || !!result[key]
(key) =>
result[key] === false ||
!!result[key] ||
(result["accountType"] === "cash"
? result["isInsuranceVerified"] === "" &&
result["insuranceDeductible"] === "" &&
result["isInsuranceItac"] === "" &&
result["isInsuranceNoComp"] === ""
: false)
);
expect(allFieldsPopulated).toBe(true);
});

View file

@ -12,7 +12,11 @@ import { singleWindshieldCarIds } from "@/constants/single-windshield-carids";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js";
import { deepEqual } from "@/helpers/object-helper";
import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/schedule-constants";
import {
AppointmentTypeStrings,
PREMIUM_FEE_PART_TYPE,
RouteCodeFlags,
} from "@/constants/schedule-constants";
import { getQuerystringParameter } from "@/helpers/querystring-helper";
import { deepClone } from "@/helpers/object-helper";
import { queryStrings } from "@/constants/query-strings";
@ -577,7 +581,7 @@ export const mutations = {
state.order.customer.emailAddress = sessionInformation.order.customer.emailAddress;
state.order.customer.firstName = sessionInformation.order.customer.firstName;
state.order.customer.lastName = sessionInformation.order.customer.lastName;
state.order.customer.phoneNumber = sessionInformation.order.customer.phoneNumber;
state.order.customer.phoneNumber = sessionInformation.order.customer.homePhone;
state.order.customer.isSmsOptIn = sessionInformation.order.customer.isSmsOptIn;
state.applicationUser.experiments = sessionInformation.applicationUser.experiments;
@ -641,6 +645,9 @@ export const getters = {
isDropOffAppointment: (state) => {
return state.order.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF;
},
isOvernightDropOffAppointment: (state) => {
return state.order.schedule.routeCode?.includes(RouteCodeFlags.OVERNIGHT_DROP_OFF);
},
isRecalibrationOnOrder: (state) => {
return getHasRecalibrationPart(state);
},
@ -1498,17 +1505,9 @@ export const actions = {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
let lineItems = [
...(order.lineItems.supportingItems ?? []),
...(order.lineItems.vaps ?? []),
...getFlattenedArrayOfLineItemsWithChildParts(order.lineItems.glassParts),
];
lineItems = lineItems.map((lineItem) => {
return {
partNumber: lineItem.partNumber,
partType: lineItem.partType,
};
});
const lineItems = getFlattenedLineItemsWithGlassPartTag(order.lineItems);
const glassPieces = order.damage.glassToReplace
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
: [];
@ -1567,17 +1566,7 @@ export const actions = {
const order = context.state.order;
const vehicle = context.state.order.vehicle;
const payment = context.state.order.payment;
let lineItems = [
...(order.lineItems.supportingItems ?? []),
...(order.lineItems.vaps ?? []),
...getFlattenedArrayOfLineItemsWithChildParts(order.lineItems.glassParts),
];
lineItems = lineItems.map((lineItem) => {
return {
partNumber: lineItem.partNumber,
partType: lineItem.partType,
};
});
const lineItems = getFlattenedLineItemsWithGlassPartTag(order.lineItems);
const glassPieces = order.damage.glassToReplace
? convertGlassPieceToBackEndCompatibleFormat(order.damage.glassToReplace)
: [];
@ -1748,7 +1737,10 @@ export const actions = {
lastFour: order.payment.ccToken.lastFour,
},
},
policy: {},
policy: {
isItac: order.policy?.isItac,
isNoComp: order.policy?.isNoComp,
},
serviceLocation: {
streetAddress: order.serviceLocation.address,
streetAddress2: order.serviceLocation.address2,
@ -1819,7 +1811,7 @@ export const actions = {
savedSessionId: savedSessionId?.toString(),
referralNumber: referralNumber?.toString(),
referralDate: referralDate?.toString(),
parentAccountNumber: parentAccountNumber,
parentAccountNumber: parentAccountNumber?.toString(),
referralCorrelationId: referralCorrelationId,
},
logApiCall: true,
@ -1837,7 +1829,10 @@ export const actions = {
});
// clear the state if the existing EON does not equal what is returned from loadSession
if (context.state.order.eon && context.state.order.eon != response.data.eon) {
if (
context.state.order.eon &&
context.state.order.eon != response.data.order.eon
) {
context.commit(storeMutations.RESET_STATE);
}
@ -2893,6 +2888,28 @@ function getFlattenedArrayOfLineItemsWithChildParts(lineItems) {
return flattenedArray;
}
function getFlattenedLineItemsWithGlassPartTag(lineItems) {
const nonGlassLineItems = [...(lineItems.supportingItems ?? []), ...(lineItems.vaps ?? [])];
const mappedNonGlassLineItems = nonGlassLineItems.map((lineItem) => {
return {
partNumber: lineItem.partNumber,
partType: lineItem.partType,
isGlassPart: false,
};
});
const glassLineItems = [...getFlattenedArrayOfLineItemsWithChildParts(lineItems.glassParts)];
const mappedGlassLineItems = glassLineItems.map((lineItem) => {
return {
partNumber: lineItem.partNumber,
partType: lineItem.partType,
isGlassPart: true,
};
});
return [...mappedNonGlassLineItems, ...mappedGlassLineItems];
}
function buildQueryStringParameterFromArrayOfComplexObjects(arrayOfObjects, parameterName) {
let queryStringParameter = "";
for (let i = 0; i < arrayOfObjects.length; i++) {
@ -3075,7 +3092,8 @@ async function resetScheduleIfUnavailable(context, order, pageNameToLog) {
});
});
if (!routeCodeFound) {
//reset schedule if jobMin is null because when switching from cash to insurance dynamo returns null for jobMin
if (!routeCodeFound || order.schedule.jobMinMinutes == null) {
context.commit(storeMutations.RESET_SCHEDULE);
return;
}

View file

@ -13,26 +13,31 @@ h1,
line-height: 1.325;
font-weight: 300;
}
h2,
.h2 {
line-height: 1.325;
font-weight: 300;
}
h3,
.h3 {
line-height: 1.375;
font-weight: 300;
}
h4,
.h4 {
line-height: 1.6;
font-weight: 300;
}
h5,
.h5 {
line-height: 1.325;
font-weight: 400;
}
h6,
.h6 {
line-height: 1.7;
@ -70,3 +75,69 @@ caption,
line-height: 1.4;
font-weight: 500;
}
// Poppins styles from Google Fonts
// Regular styles
.poppins-light {
font-family: "Poppins", sans-serif;
font-weight: 300;
font-style: normal;
}
.poppins-regular {
font-family: "Poppins", sans-serif;
font-weight: 400;
font-style: normal;
}
.poppins-medium {
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: normal;
}
.poppins-semibold {
font-family: "Poppins", sans-serif;
font-weight: 600;
font-style: normal;
}
.poppins-bold {
font-family: "Poppins", sans-serif;
font-weight: 700;
font-style: normal;
}
// Italic styles
.poppins-light-italic {
font-family: "Poppins", sans-serif;
font-weight: 300;
font-style: italic;
}
.poppins-regular-italic {
font-family: "Poppins", sans-serif;
font-weight: 400;
font-style: italic;
}
.poppins-medium-italic {
font-family: "Poppins", sans-serif;
font-weight: 500;
font-style: italic;
}
.poppins-semibold-italic {
font-family: "Poppins", sans-serif;
font-weight: 600;
font-style: italic;
}
.poppins-bold-italic {
font-family: "Poppins", sans-serif;
font-weight: 700;
font-style: italic;
}

View file

@ -10,7 +10,7 @@ $blue-200: #c1dfee;
$blue-300: #9fcee6;
$blue-400: #69adcf; // Used in theme
$blue-500: #3b8fb8;
$blue: #1574a1; // Default Blue
$blue: #0070d1; // Default Blue
$blue-700: #06577c;
$blue-800: #003d58;
$blue-900: #002433; // Used in theme
@ -20,7 +20,7 @@ $red-100: #ffe6e4;
$red-200: #fcbfbb;
$red-300: #f89892;
$red-400: #e65c53;
$red: #d4281c; // Default Red
$red: #db0020; // Default Red
$red-600: #ac160b;
$red-700: #840900;
$red-800: #5b0600;
@ -115,7 +115,7 @@ $theme-colors: (
$body-color: $gray-600;
//Fonts
$font-family-sans-serif: Roboto, Arial, Helvetica, sans-serif;
$font-family-sans-serif: Poppins, Arial, Helvetica, sans-serif;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
monospace;
// stylelint-enable value-keyword-case