Implementação das ações incluir, atualizar e remover apontamentos de horas

This commit is contained in:
Paulo Porto
2026-05-05 01:27:07 -03:00
parent 4156b47506
commit a8e0e77aff
3 changed files with 899 additions and 41 deletions

View File

@@ -966,9 +966,14 @@ async function executeComcipFetch(tabId, requestUrl, method, payload, headers, r
headers: requestHeaders, headers: requestHeaders,
}; };
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") { if (
normalizedMethod !== "GET" &&
normalizedMethod !== "HEAD" &&
requestPayload !== undefined &&
requestPayload !== null
) {
requestHeaders["content-type"] = "application/json"; requestHeaders["content-type"] = "application/json";
fetchOptions.body = JSON.stringify(requestPayload || {}); fetchOptions.body = JSON.stringify(requestPayload);
} }
const response = await fetch(requestUrl, { const response = await fetch(requestUrl, {
@@ -1130,9 +1135,14 @@ async function executeComcipFetchFromFrame(
headers: requestHeaders, headers: requestHeaders,
}; };
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") { if (
normalizedMethod !== "GET" &&
normalizedMethod !== "HEAD" &&
requestPayload !== undefined &&
requestPayload !== null
) {
requestHeaders["content-type"] = "application/json"; requestHeaders["content-type"] = "application/json";
fetchOptions.body = JSON.stringify(requestPayload || {}); fetchOptions.body = JSON.stringify(requestPayload);
} }
const response = await fetch(requestUrl, fetchOptions); const response = await fetch(requestUrl, fetchOptions);
@@ -1264,9 +1274,14 @@ async function executeComcipDirectFetch(
headers: requestHeaders, headers: requestHeaders,
}; };
if (normalizedMethod !== "GET" && normalizedMethod !== "HEAD") { if (
normalizedMethod !== "GET" &&
normalizedMethod !== "HEAD" &&
payload !== undefined &&
payload !== null
) {
requestHeaders["content-type"] = "application/json"; requestHeaders["content-type"] = "application/json";
fetchOptions.body = JSON.stringify(payload || {}); fetchOptions.body = JSON.stringify(payload);
} }
const response = await fetch(requestUrl, fetchOptions); const response = await fetch(requestUrl, fetchOptions);

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Arch Panel Injector", "name": "Arch Panel Injector",
"version": "1.0.109", "version": "1.0.119",
"description": "Insere o botao Arch panel no header do Oracle Workload Workbench.", "description": "Insere o botao Arch panel no header do Oracle Workload Workbench.",
"permissions": [ "permissions": [
"cookies", "cookies",
@@ -153,6 +153,16 @@