CSR-731 | Fix commenting - fix mock lineItems
This commit is contained in:
parent
a4d379d2f7
commit
882def70a7
2 changed files with 14 additions and 3 deletions
|
|
@ -276,11 +276,18 @@ export function doesCopyContainTextLink(copy) {
|
|||
return copy.includes(dynamicStrings.TEXT_LINK);
|
||||
}
|
||||
|
||||
/**
|
||||
* splits copy on { ... } such as {routerlink: ...}
|
||||
* @returns array of strings
|
||||
*/
|
||||
export function splitCopyOnCMSPlaceHolder(copy){
|
||||
// splits copy on { ... } such as {routerlink: ...}
|
||||
return copy.split(/{(.*?)}/g);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string2 of input following this pattern: {string1:string2,string3}
|
||||
* @returns string
|
||||
*/
|
||||
export function getLinkTargetFromCopy(copy){
|
||||
// sample input: {routerLink:estimate,provide your VIN}
|
||||
// first split would return 'estimate,provide your VIN'
|
||||
|
|
@ -288,6 +295,10 @@ export function getLinkTargetFromCopy(copy){
|
|||
return copy.split(':')[1].split(',')[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns string3 of input following this pattern: {string1:string2,string3}
|
||||
* @returns string
|
||||
*/
|
||||
export function getLinkDisplayTextFromCopy(copy){
|
||||
// sample input: {routerLink:estimate,provide your VIN}
|
||||
// first split would return 'estimate,provide your VIN'
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default {
|
|||
vm.selectedPackage = vm.getDefaultSelectedPackageValue();
|
||||
vm.lineItems = [
|
||||
{
|
||||
PartNumber : "001",
|
||||
partNumber : "001",
|
||||
Description : "Windshield with Recal",
|
||||
partType : "Windshield",
|
||||
Quantity : "1",
|
||||
|
|
@ -139,7 +139,7 @@ export default {
|
|||
"price": 35.50,
|
||||
},
|
||||
{
|
||||
PartNumber : "005",
|
||||
partNumber : "RECAL STATIC",
|
||||
Description : "Recalibration",
|
||||
partType : "recalibration",
|
||||
Quantity : "1",
|
||||
|
|
|
|||
Loading…
Reference in a new issue