Skip to content

Commit

Permalink
Change Project Name from Zatca.EGS to ZatcaEGS
Browse files Browse the repository at this point in the history
  • Loading branch information
mabaega committed Sep 6, 2024
1 parent 7195843 commit 793cceb
Show file tree
Hide file tree
Showing 65 changed files with 104 additions and 128 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Get Version
id: get_version
run: |
VERSION=$(grep -oP '(?<=<AssemblyVersion>).*(?=</AssemblyVersion>)' Zatca.EGS/Zatca.EGS.csproj)
VERSION=$(grep -oP '(?<=<AssemblyVersion>).*(?=</AssemblyVersion>)' ZatcaEGS/ZatcaEGS.csproj)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Create Release
id: create_release
Expand Down Expand Up @@ -62,18 +62,18 @@ jobs:
- name: List Directory Contents
run: ls -R
- name: Restore dependencies
run: dotnet restore Zatca.EGS/Zatca.EGS.csproj
run: dotnet restore ZatcaEGS/ZatcaEGS.csproj
- name: Build
run: dotnet build Zatca.EGS/Zatca.EGS.csproj --configuration Release --no-restore
run: dotnet build ZatcaEGS/ZatcaEGS.csproj --configuration Release --no-restore
- name: Publish
run: dotnet publish Zatca.EGS/Zatca.EGS.csproj -c Release -o ./publish -r ${{ matrix.runtime }} --self-contained false
run: dotnet publish ZatcaEGS/ZatcaEGS.csproj -c Release -o ./publish -r ${{ matrix.runtime }} --self-contained false
- name: Create macOS App Bundle
if: matrix.os == 'macos-latest'
run: |
mkdir -p ZatcaEGS.app/Contents/{MacOS,Resources}
cp Zatca.EGS/wwwroot/images/apple-icon.icns ZatcaEGS.app/Contents/Resources/
cp ZatcaEGS/wwwroot/images/apple-icon.icns ZatcaEGS.app/Contents/Resources/
echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n <key>CFBundleExecutable</key>\n <string>ZatcaEGS</string>\n <key>CFBundleIconFile</key>\n <string>apple-icon</string>\n</dict>\n</plist>" > ZatcaEGS.app/Contents/Info.plist
cp ./publish/Zatca.EGS ZatcaEGS.app/Contents/MacOS/ZatcaEGS
cp ./publish/ZatcaEGS ZatcaEGS.app/Contents/MacOS/ZatcaEGS
chmod +x ZatcaEGS.app/Contents/MacOS/ZatcaEGS
- name: Zip Release
uses: thedoctor0/zip-release@master
Expand Down
56 changes: 0 additions & 56 deletions Zatca.EGS/Zatca.EGS.csproj

This file was deleted.

28 changes: 14 additions & 14 deletions Zatca.eInvoice.Test/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public class ZatcaService
private const string ComplianceCSIDUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/compliance";
private const string ProductionCSIDUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/production/csids";
private const string ComplianceCheckUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/compliance/invoices";
private const string ReportingUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/reporting/single";
private const string ClearanceUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/clearance/single";
//private const string ReportingUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/reporting/single";
//private const string ClearanceUrl = "https://gw-fatoora.zatca.gov.sa/e-invoicing/developer-portal/invoices/clearance/single";

private readonly HttpClient _httpClient;

Expand Down Expand Up @@ -102,7 +102,7 @@ public async Task<OnboardingResultDto> OnboardingDevice()
}


public async Task<SignedInvoiceResult> CreateSignedInvoice(string CSIDBinaryToken, string EcSecp256k1Privkeypem)
public static async Task<SignedInvoiceResult> CreateInvoiceXml(string CSIDBinaryToken, string EcSecp256k1Privkeypem)
{
try
{
Expand Down Expand Up @@ -406,17 +406,17 @@ public class SignedInvoiceResult
public string RequestApi { get; set; }
}

public class ZatcaRequestApi
{
[JsonProperty("uuid")]
public string Uuid { get; set; }
//public class ZatcaRequestApi
//{
// [JsonProperty("uuid")]
// public string Uuid { get; set; }

[JsonProperty("invoiceHash")]
public string InvoiceHash { get; set; }
// [JsonProperty("invoiceHash")]
// public string InvoiceHash { get; set; }

[JsonProperty("invoice")]
public string Invoice { get; set; }
}
// [JsonProperty("invoice")]
// public string Invoice { get; set; }
//}

public class ServerResult
{
Expand Down Expand Up @@ -547,8 +547,8 @@ static async Task Main(string[] args)
//Console.WriteLine($"PCSID Secret:\n{result.PCSIDSecret} \n\n");

//// Step 2: Create Signed Invoice
////var signedInvoiceResult = await zatcaService.CreateSignedInvoice(result.PCSIDBinaryToken, result.PrivateKey);
//var signedInvoiceResult = await zatcaService.CreateSignedInvoice(result.CCSIDBinaryToken, result.PrivateKey);
////var signedInvoiceResult = await zatcaService.CreateInvoiceXml(result.PCSIDBinaryToken, result.PrivateKey);
//var signedInvoiceResult = await zatcaService.CreateInvoiceXml(result.CCSIDBinaryToken, result.PrivateKey);

//Console.WriteLine("Signed Invoice Result:\n\n");
////Console.WriteLine($"Base64 Signed Invoice:\n{signedInvoiceResult.Base64SignedInvoice} \n");
Expand Down
2 changes: 1 addition & 1 deletion ZatcaEGS.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zatca.eInvoice", "Zatca.eIn
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zatca.eInvoice.Test", "Zatca.eInvoice.Test\Zatca.eInvoice.Test.csproj", "{2D1BCAFB-BB8F-4D44-A8D5-0889153DC1E3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Zatca.EGS", "Zatca.EGS\Zatca.EGS.csproj", "{89BD9AFD-AF48-4DA9-A7D6-25CE05A537A8}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZatcaEGS", "ZatcaEGS\ZatcaEGS.csproj", "{89BD9AFD-AF48-4DA9-A7D6-25CE05A537A8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc;

namespace Zatca.EGS.Controllers
namespace ZatcaEGS.Controllers
{
public class DisclaimerController : Controller
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
using Zatca.EGS.Models;
using ZatcaEGS.Models;

namespace Zatca.EGS.Controllers
namespace ZatcaEGS.Controllers
{
public class HomeController : Controller
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System.Net.Http.Headers;
using System.Text;
using System.Xml.Serialization;
using Zatca.EGS.Helpers;
using Zatca.EGS.Models;
using ZatcaEGS.Helpers;
using ZatcaEGS.Models;
using Zatca.eInvoice;
using Zatca.eInvoice.Models;

namespace Zatca.EGS.Controllers
namespace ZatcaEGS.Controllers
{
[ApiController]
public class RelayController : Controller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
using Zatca.EGS.Helpers;
using Zatca.EGS.Models;
using ZatcaEGS.Helpers;
using ZatcaEGS.Models;
using Zatca.eInvoice;
using Zatca.eInvoice.Helpers;
using Zatca.eInvoice.Models;

namespace Zatca.EGS.Controllers
namespace ZatcaEGS.Controllers
{
public class WizardController : Controller
{
Expand Down Expand Up @@ -140,7 +140,7 @@ public async Task<IActionResult> GenerateCustomFieldAsync([FromBody] AccessToken
string apiKey = token.ApiSecret;

// Load JSON data from resources
byte[] jsonDataBytes = Zatca.EGS.Properties.Resources.cfData;
byte[] jsonDataBytes = ZatcaEGS.Properties.Resources.cfData;
string jsonData = Encoding.UTF8.GetString(jsonDataBytes);

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ check_dotnet() {

# Fungsi untuk memberikan izin eksekusi
set_permissions() {
chmod +x Zatca.EGS
chmod +x ZatcaEGS
echo "Izin eksekusi diberikan ke ZatcaEGS"
}

# Fungsi untuk menjalankan aplikasi
run_app() {
if [ "$1" == "service" ]; then
echo "Menjalankan ZatcaEGS sebagai layanan..."
sudo ./Zatca.EGS
sudo ./ZatcaEGS
else
echo "Menjalankan ZatcaEGS dalam mode interaktif..."
./Zatca.EGS
./ZatcaEGS
fi
}

Expand All @@ -37,7 +37,7 @@ Description=Zatca EGS Service
After=network.target
[Service]
ExecStart=$(pwd)/Zatca.EGS
ExecStart=$(pwd)/ZatcaEGS
WorkingDirectory=$(pwd)
User=$(whoami)
Restart=always
Expand All @@ -49,7 +49,7 @@ EOL
echo "Mengaktifkan dan memulai layanan ZatcaEGS..."
sudo systemctl enable zatca-egs.service
sudo systemctl start zatca-egs.service
echo "Layanan Zatca.EGS telah diaktifkan dan dijalankan."
echo "Layanan ZatcaEGS telah diaktifkan dan dijalankan."
}

# Main script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ setlocal

REM Set the path to the executable and service name
set "serviceName=ZatcaEGS"
set "binPath=%~dp0Zatca.EGS.exe"
set "binPath=%~dp0ZatcaEGS.exe"

REM Check if the service already exists
sc query %serviceName% >nul 2>&1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//namespace Zatca.EGS.Extensions
//namespace ZatcaEGS.Extensions
//{
// public class DisclaimerMiddleware
// {
Expand All @@ -24,7 +24,7 @@
// }
//}

namespace Zatca.EGS.Extensions
namespace ZatcaEGS.Extensions
{
public class DisclaimerMiddleware
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text;
using Zatca.EGS.Models;
using ZatcaEGS.Models;
using Zatca.eInvoice;
using Zatca.eInvoice.Helpers;
using Zatca.eInvoice.Models;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class ComplianceTest
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Xml;
using System.Xml.Linq;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public static class DocumentFormatter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class GuidValidationAttribute : ValidationAttribute
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Newtonsoft.Json.Linq;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class JsonParser
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.IO.Compression;
using System.Text;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public static class ObjectCompressor
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Text;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class QrCodeDecoder
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Microsoft.VisualBasic;
using Zatca.EGS.Models;
using ZatcaEGS.Models;
using Zatca.eInvoice.Helpers;
using Zatca.eInvoice.Models;
using static Zatca.EGS.Helpers.VATInfoHelper;
using static ZatcaEGS.Helpers.VATInfoHelper;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class RelayToInvoiceMapper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

using Zatca.EGS.Models;
using ZatcaEGS.Models;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public static class UrlHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class VATInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Diagnostics;
using System.Reflection;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public static class VersionHelper
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using Newtonsoft.Json.Linq;
using System.Net.Http.Headers;
using System.Text;
using Zatca.EGS.Models;
using ZatcaEGS.Models;

namespace Zatca.EGS.Helpers
namespace ZatcaEGS.Helpers
{
public class ZatcaReference
{
Expand Down
Loading

0 comments on commit 793cceb

Please sign in to comment.