GWM merge code

This commit is contained in:
Gowtham M 2025-09-27 09:56:35 +05:30
parent c19eb10311
commit fe106c9365
7 changed files with 15 additions and 3096 deletions

BIN
pb.zip

Binary file not shown.

View File

@ -1,3 +0,0 @@
APP_SIGNATURE = fcsc.gov.ae.X7pL9qZm2A
BASE_URL = https://pocket.fcsc.gov.ae

2992
pb/main.go

File diff suppressed because it is too large Load Diff

View File

@ -1,97 +0,0 @@
<!DOCTYPE html>
<html lang="en" class="h-full bg-gray-50">
<head>
<meta charset="UTF-8">
<title>Privacy Policy - FCSC</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="h-full text-gray-800">
<div class="max-w-4xl mx-auto p-8">
<h1 class="text-3xl font-bold mb-6 text-gray-900">
Privacy Policy
</h1>
<p class="mb-4">
Welcome to the Federal Competitiveness and Statistics Centre (FCSC) Mobile Application.
We value your privacy and data protection and are committed to safeguarding your personal
information. This Privacy Policy explains how we collect, use, share, and protect your information
when using this App.
</p>
<p class="mb-6">
By using the App, you consent to the practices described in this Privacy Policy.
</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">1. Information We Collect</h2>
<h3 class="text-xl font-medium mt-4 mb-2">1.1 Personal Information</h3>
<ul class="list-disc pl-6 mb-4">
<li>Name, email address, phone number (when registering an account).</li>
<li>User credentials (such as username and password).</li>
<li>Demographic data (if provided by the user).</li>
</ul>
<h3 class="text-xl font-medium mt-4 mb-2">1.2 Usage Data</h3>
<ul class="list-disc pl-6 mb-4">
<li>Device information (IP address, operating system, device type).</li>
<li>App interactions (pages viewed, features used, actions performed).</li>
<li>Log data (error reports, login timestamps).</li>
</ul>
<h3 class="text-xl font-medium mt-4 mb-2">1.3 Location Data</h3>
<p class="mb-4">If enabled, we may collect location-based data (to enhance certain features).</p>
<h3 class="text-xl font-medium mt-4 mb-2">1.4 Cookies and Tracking Technologies</h3>
<p class="mb-6">We may use cookies, analytics tools, and tracking technologies to improve App functionality and user experience.</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">2. How We Use Your Information</h2>
<ul class="list-disc pl-6 mb-6">
<li>Provide and improve services.</li>
<li>Deliver insights, statistics, and reports.</li>
<li>Personalize user experience.</li>
<li>Ensure security and prevent unauthorized access.</li>
<li>Comply with UAE laws and regulations.</li>
<li>Communicate with users (inquiries, updates, support).</li>
</ul>
<h2 class="text-2xl font-semibold mt-8 mb-4">3. How We Share Your Information</h2>
<p class="mb-4">FCSC does not sell or trade your personal information. However, we may share data in the following cases:</p>
<ul class="list-disc pl-6 mb-6">
<li>Government and Legal Compliance (UAE authorities, legal obligations).</li>
<li>Third-Party Service Providers (hosting, analytics, technical support).</li>
<li>Security and Fraud Prevention.</li>
</ul>
<h2 class="text-2xl font-semibold mt-8 mb-4">4. Data Storage and Security</h2>
<ul class="list-disc pl-6 mb-6">
<li>AES-256 encryption to protect user data.</li>
<li>Stored on government-approved secure servers.</li>
<li>Access only by authorized personnel.</li>
<li>Data retained only as long as legally necessary.</li>
</ul>
<h2 class="text-2xl font-semibold mt-8 mb-4">5. User Rights and Choices</h2>
<ul class="list-disc pl-6 mb-6">
<li>Access & Review your stored personal data.</li>
<li>Correction & Deletion of personal data.</li>
<li>Opt-Out of marketing communications.</li>
<li>Disable location services via device settings.</li>
</ul>
<p class="mb-6">To exercise these rights, contact us at <strong>[Insert Official FCSC Email]</strong>.</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">6. Third-Party Links and Services</h2>
<p class="mb-6">The App may contain links to external websites or services (e.g., UAE government portals).
FCSC is not responsible for third-party privacy practices. Users should review their respective Privacy Policies.</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">7. Children's Privacy</h2>
<p class="mb-6">The App is not intended for children under 13 years. We do not knowingly collect data from minors.
Parents or guardians may request removal of a childs data by contacting FCSC.</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">8. Changes to This Privacy Policy</h2>
<p class="mb-6">We may update this Privacy Policy periodically to reflect changes in laws, technology, or user feedback.
The latest version will always be available in the App.</p>
<h2 class="text-2xl font-semibold mt-8 mb-4">9. Contact Information</h2>
<p class="mb-10">For privacy-related inquiries, you may contact: <strong>info@fcsc.gov.ae</strong></p>
</div>
</body>
</html>

Binary file not shown.

Binary file not shown.

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"math"
"regexp"
"sort"
"strconv"
"strings"
@ -467,14 +468,19 @@ func CalculateGroupedSum(observations []Observation, request ChartCalculationReq
// Sort by value in descending order or given key
sortByKey := request.SortBy
var nonDigit = regexp.MustCompile(`\D`)
if sortByKey != "" {
// Sort by given key
sort.Slice(valueList, func(i, j int) bool {
val1Str := valueList[i].ObsKey[sortByKey]
val2Str := valueList[j].ObsKey[sortByKey]
val1, _ := strconv.ParseFloat(val1Str, 64)
val2, _ := strconv.ParseFloat(val2Str, 64)
// remove non-digits
val1Digits := nonDigit.ReplaceAllString(val1Str, "")
val2Digits := nonDigit.ReplaceAllString(val2Str, "")
val1, _ := strconv.ParseInt(val1Digits, 10, 64)
val2, _ := strconv.ParseInt(val2Digits, 10, 64)
sortActionKey := request.SortAction
if sortActionKey == "DESC" {
@ -550,14 +556,19 @@ func CalculateGroupedSum(observations []Observation, request ChartCalculationReq
// Sort by value in descending order or given key
sortByKey := request.SortBy
var nonDigit = regexp.MustCompile(`\D`)
if sortByKey != "" {
// Sort by given key
sort.Slice(result, func(i, j int) bool {
val1Str := result[i].ObsKey[sortByKey]
val2Str := result[j].ObsKey[sortByKey]
val1, _ := strconv.ParseFloat(val1Str, 64)
val2, _ := strconv.ParseFloat(val2Str, 64)
// remove non-digits
val1Digits := nonDigit.ReplaceAllString(val1Str, "")
val2Digits := nonDigit.ReplaceAllString(val2Str, "")
val1, _ := strconv.ParseInt(val1Digits, 10, 64)
val2, _ := strconv.ParseInt(val2Digits, 10, 64)
sortActionKey := request.SortAction
if sortActionKey == "DESC" {