Skip to content

Commit

Permalink
fixed manifest permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitasare7 committed Jun 16, 2024
1 parent 538c559 commit 4c3893f
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 42 deletions.
2 changes: 1 addition & 1 deletion dist/app.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="/favicon.ico"/><title>App</title><script defer="defer" src="/js/chunk-vendors.c8257bd9.js"></script><script defer="defer" src="/js/app.0b4d2760.js"></script><link href="/css/chunk-vendors.201e2f5c.css" rel="stylesheet"><link href="/css/chunk-common.de8a1b8d.css" rel="stylesheet"><link href="/css/app.f2deb53f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but App doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="secondaryApp"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><link rel="icon" href="/favicon.ico"/><title>App</title><script defer="defer" src="/js/chunk-vendors.c8257bd9.js"></script><script defer="defer" src="/js/app.23b0bd92.js"></script><link href="/css/chunk-vendors.201e2f5c.css" rel="stylesheet"><link href="/css/chunk-common.de8a1b8d.css" rel="stylesheet"><link href="/css/app.f2deb53f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but App doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="secondaryApp"></div></body></html>
1 change: 0 additions & 1 deletion dist/js/app.0b4d2760.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion dist/js/app.0b4d2760.js → dist/js/app.23b0bd92.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/js/app.23b0bd92.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions dist/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"description": "Boost Salesforce OmniStudio Productivity with One-Click Access to IP, DR, Flexcards, and OmniScripts.",
"permissions": [
"storage",
"activeTab",
"tabs",
"cookies"
],
"host_permissions": [
Expand Down
2 changes: 0 additions & 2 deletions extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
"description": "Boost Salesforce OmniStudio Productivity with One-Click Access to IP, DR, Flexcards, and OmniScripts.",
"permissions": [
"storage",
"activeTab",
"tabs",
"cookies"
],
"host_permissions": [
Expand Down
89 changes: 54 additions & 35 deletions src/components/partial/SecondaryComp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { ref, onMounted, shallowRef } from "vue";
import { apiVersion, sfConn, formatDate } from "@/assets/helper";
import { fetchRecords } from "@/assets/storageUtil";
import { saveRecord } from "@/assets/storageUtil";
import { extractValue, getSalesforceURL, getComponentQuery } from "@/assets/globalUtil";
import {
extractValue,
getSalesforceURL,
getComponentQuery,
} from "@/assets/globalUtil";
import PrimaryButton from "../elements/PrimaryButton.vue";
import TextInput from "../elements/TextInput.vue";
import LoadingCircle from "../elements/LoadingCircle.vue";
Expand Down Expand Up @@ -43,26 +47,28 @@ const omniScriptLoaded = ref("OmniScripts Loaded" + " | " + pageTitle);
const flexCardsLoaded = ref("FlexCards Loaded" + " | " + pageTitle);
const IPloaded = ref("Integration Procedures Loaded" + " | " + pageTitle);
const DRloaded = ref("DataRaptors Loaded" + " | " + pageTitle);
const orgNameSpace = ref('');
const orgNameSpace = ref("");
const initData = (url) => {
return new Promise((resolve, reject) => {
sfConn
.getSession(sfHostURL.value)
.then(() => {
// set org namespace
if (!orgNameSpace.value && localStorage.getItem(sfHostURL.value + "_" + 'ns')) {
if (
!orgNameSpace.value &&
localStorage.getItem(sfHostURL.value + "_" + "ns")
) {
orgNameSpace.value = getOrgNamspace();
setMainTableHeaders(orgNameSpace.value);
}
})
.catch((error) => {
console.error("Error getting session: ", error);
reject(error); // Reject the promise if there is an error getting the session
});
});
}
};
const performAPIcallout = (url) => {
return new Promise((resolve, reject) => {
Expand All @@ -86,7 +92,6 @@ const performAPIcallout = (url) => {
reject(error); // Reject the promise if there is an error getting the session
});
});
};
const performPostAPIcallout = (url, obj) => {
Expand Down Expand Up @@ -121,13 +126,13 @@ const setMainTableHeaders = (nameSpace) => {
{ text: "LastModified By", value: "LastModifiedBy.Name" },
{ text: "LastModified Date", value: "LastModifiedDateNew", sortable: true },
{ text: "Actions", value: "Actions", width: 300 },
]
}
];
};
const ensureVersionHeader = () => {
let versionStr = 'VersionNumber';
if (orgNameSpace.value == 'vlocity_cmt') {
versionStr = 'vlocity_cmt__Version__c';
let versionStr = "VersionNumber";
if (orgNameSpace.value == "vlocity_cmt") {
versionStr = "vlocity_cmt__Version__c";
}
const versionHeader = { text: "Version", value: versionStr };
Expand All @@ -150,7 +155,10 @@ const getOmniScriptList = async (isIP) => {
queriedObject.value = "IntegrationProcedure";
processType = "Integration Procedure";
}
let url = "/services/data/v" + apiVersion + getComponentQuery(orgNameSpace.value, queriedObject.value);
let url =
"/services/data/v" +
apiVersion +
getComponentQuery(orgNameSpace.value, queriedObject.value);
// console.log('url --> '+url);
try {
const data = await performAPIcallout(url);
Expand All @@ -173,7 +181,10 @@ const getOmniScriptList = async (isIP) => {
const getFlexCardList = async () => {
dataLoading.value = true;
queriedObject.value = "FlexCard";
let url = "/services/data/v" + apiVersion + getComponentQuery(orgNameSpace.value, queriedObject.value);
let url =
"/services/data/v" +
apiVersion +
getComponentQuery(orgNameSpace.value, queriedObject.value);
try {
const data = await performAPIcallout(url);
//console.log('data --> ', JSON.stringify(data));
Expand All @@ -196,9 +207,12 @@ const getDataRaptorList = async () => {
dataLoading.value = true;
queriedObject.value = "DataRaptor";
let url = "/services/data/v" + apiVersion + getComponentQuery(orgNameSpace.value, queriedObject.value);
let url =
"/services/data/v" +
apiVersion +
getComponentQuery(orgNameSpace.value, queriedObject.value);
try {
let versionHeader = 'VersionNumber'; // standard os version
let versionHeader = "VersionNumber"; // standard os version
const data = await performAPIcallout(url);
//console.log('data --> ', JSON.stringify(data));
data?.records.forEach((record) => {
Expand All @@ -208,8 +222,8 @@ const getDataRaptorList = async () => {
recordList.value = data?.records;
recordTitle.value = DRloaded.value;
//set version header for vlocity
if (orgNameSpace.value == 'vlocity_cmt') {
versionHeader = 'vlocity_cmt__Version__c';
if (orgNameSpace.value == "vlocity_cmt") {
versionHeader = "vlocity_cmt__Version__c";
}
// remove version from header
tableHeaders.value = tableHeaders.value.filter(
Expand Down Expand Up @@ -282,13 +296,12 @@ const beautifyJSON = (jsonValue) => {
//get namespace
const getOrgNamspace = () => {
if (sfHostURL.value) {
const namespace = localStorage.getItem(sfHostURL.value + "_" + 'ns');
const namespace = localStorage.getItem(sfHostURL.value + "_" + "ns");
return namespace !== null ? namespace : null;
}
else {
} else {
return null;
}
}
};
//code editor
const responseJSON = ref(null);
const requestJSON = ref(null);
Expand All @@ -305,7 +318,7 @@ const hitAPIcallout = async () => {
let url;
let body;
let orgNameSpace = getOrgNamspace();
console.log('modalData.value -->'+JSON.stringify(modalData.value));
//console.log('modalData.value -->'+JSON.stringify(modalData.value));
try {
if (modalData.value?.queriedObject == "IntegrationProcedure") {
url = `/services/apexrest/${orgNameSpace}/v1/integrationprocedure/${modalData.value.Type}_${modalData.value.SubType}`;
Expand Down Expand Up @@ -392,12 +405,16 @@ onMounted(async () => {
<div class="flex justify-between mb-4">
<TextDesc v-if="sfHostURL">Current Org : <span class="font-semibold">{{ sfHostURL }}</span>
</TextDesc>
<TextDesc v-if="orgNameSpace" class="mr-3">Package : <span class="font-semibold">{{ orgNameSpace == 'omnistudio' ?
'Standard OmniStudio' : 'Vlocity OmniStudio' }}</span>
<TextDesc v-if="orgNameSpace" class="mr-3">Package :
<span class="font-semibold">{{
orgNameSpace == "omnistudio"
? "Standard OmniStudio"
: "Vlocity OmniStudio"
}}</span>
</TextDesc>
</div>
<div class="flex space-x-2 ">
<div class="flex space-x-2">
<PrimaryButton :isBlue="true" @click="getOmniScriptList(false)">
Load OmniScript
</PrimaryButton>
Expand Down Expand Up @@ -447,8 +464,10 @@ onMounted(async () => {
Id,
Name,
iconColor,
Type,vlocity_cmt__Type__c,
SubType,vlocity_cmt__SubType__c
Type,
vlocity_cmt__Type__c,
SubType,
vlocity_cmt__SubType__c,
}">
<div class="flex justify-center text-center items-center my-1.5">
<a :href="getSalesforceURL(orgIdentifier, sfHostURL, Id, queriedObject)
Expand All @@ -462,14 +481,14 @@ onMounted(async () => {
queriedObject == 'DataRaptor' ||
queriedObject == 'IntegrationProcedure'
" @click="
openModal(
queriedObject,
Id,
Type ?? vlocity_cmt__Type__c,
SubType ?? vlocity_cmt__SubType__c,
Name
)
" :icon="Icon_Execute" :isSquare="false" color="green" class="!p-1.5 ml-2"
openModal(
queriedObject,
Id,
Type ?? vlocity_cmt__Type__c,
SubType ?? vlocity_cmt__SubType__c,
Name
)
" :icon="Icon_Execute" :isSquare="false" color="green" class="!p-1.5 ml-2"
title="Execute with Payload" />
</div>
</template>
Expand Down

0 comments on commit 4c3893f

Please sign in to comment.