Compare commits

..

No commits in common. "e728c4995bd84aa3c0903286251942e7285beaad" and "b1b36240b6b0f3b52d7bcea84bc385fb0a534fa0" have entirely different histories.

5 changed files with 31 additions and 537 deletions

485
.gitignore vendored
View File

@ -1,488 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from `dotnet new gitignore`
# dotenv files
.env
bin/
obj/
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
publish/
wwwroot/lib/
appsettings.Development.json
*.user
*.db
.vscode
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET
project.lock.json
project.fragment.lock.json
artifacts/
# Tye
.tye/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
# but not Directory.Build.rsp, as it configures directory-level build defaults
!Directory.Build.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
.idea/
##
## Visual studio for Mac
##
# globs
Makefile.in
*.userprefs
*.usertasks
config.make
config.status
aclocal.m4
install-sh
autom4te.cache/
*.tar.gz
tarballs/
test-results/
# content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# Vim temporary swap files
*.swp
*.vs

View File

@ -823,10 +823,10 @@ namespace eSPJ.Controllers.SpjDriverUpstController
return BadRequest(new { success = false, message = "Ukuran foto terlalu besar. Maksimal 5MB." });
}
var apiKey = _configuration["9Router:OCRkey"];
var apiKey = _configuration["OpenRouter:OCRkey"];
if (string.IsNullOrWhiteSpace(apiKey))
{
return StatusCode(500, new { success = false, message = "9Router API key belum diset." });
return StatusCode(500, new { success = false, message = "OpenRouter API key belum diset." });
}
byte[] fileBytes;
@ -843,7 +843,7 @@ namespace eSPJ.Controllers.SpjDriverUpstController
var payload = new
{
model = "image-combo",
model = "openai/gpt-5-image-mini",
messages = new object[]
{
new
@ -854,7 +854,14 @@ namespace eSPJ.Controllers.SpjDriverUpstController
new
{
type = "text",
text = @"Baca angka pada display timbangan digital dari gambar ini. Fokus hanya pada digit display, abaikan refleksi, cahaya merah, dan teks lain. Keluarkan tepat satu baris angka saja. Format output wajib NNN,NN (gunakan koma sebagai desimal dua digit). Jika tidak yakin atau angka tidak terbaca, keluarkan 0,00. Jangan tambahkan kata, kalimat, atau simbol lain."
text = @"
Baca angka pada display timbangan digital dari gambar ini.
Fokus hanya pada digit display, abaikan refleksi, cahaya merah, dan teks lain.
Keluarkan tepat satu baris angka saja.
Format output wajib NNN,NN (gunakan koma sebagai desimal dua digit).
Jika tidak yakin atau angka tidak terbaca, keluarkan 0,00.
Jangan tambahkan kata, kalimat, atau simbol lain.
"
},
new
{
@ -868,7 +875,7 @@ namespace eSPJ.Controllers.SpjDriverUpstController
var json = JsonSerializer.Serialize(payload);
var request = new HttpRequestMessage(HttpMethod.Post, "http://10.50.50.61:20128/v1/chat/completions");
var request = new HttpRequestMessage(HttpMethod.Post, "https://openrouter.ai/api/v1/chat/completions");
request.Headers.TryAddWithoutValidation("Authorization", $"Bearer {apiKey}");
request.Headers.TryAddWithoutValidation("Accept", "application/json");
request.Headers.TryAddWithoutValidation("HTTP-Referer", "https://pesapakawan.dinaslhdki.id");

View File

@ -29,25 +29,15 @@
</div>
</div>
<div class="absolute -top-4 left-1/2 transform -translate-x-1/2 flex flex-col items-center">
@* <a href="@Url.Action("Index", "Submit")"
id="odoBtn"
class="hover:cursor-pointer w-14 h-14 bg-blue-800 rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 hover:rotate-6 border-4 border-white ring-2 ring-gray-200">
<div class="absolute -top-4 left-1/2 transform -translate-x-1/2">
<a href="@Url.Action("Index", "Submit")" id="odoBtn" class="hover:cursor-pointer w-14 h-14 bg-upst rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 hover:rotate-6 border-4 border-white ring-2 ring-gray-200">
<i class="w-6 h-6 text-white" data-lucide="truck"></i>
</a>
<span class="bg-blue-800 px-2 py-1 rounded-full text-xs text-white font-medium mt-2 text-center">
Upload Muatan
</span> *@
<!-- ini untuk yang struk -->
<a href="@Url.Action("Struk", "Submit")" id="strukBtn" class="hover:cursor-pointer w-14 h-14 bg-green-700 rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 hover:rotate-6 border-4 border-white ring-2 ring-green-200">
@* <!-- ini untuk yang struk -->
<a href="@Url.Action("Struk", "Submit")" id="strukBtn" class="hover:cursor-pointer w-14 h-14 bg-upst rounded-full shadow-xl flex items-center justify-center transition-all duration-300 hover:scale-110 hover:rotate-6 border-4 border-white ring-2 ring-orange-200">
<i class="w-6 h-6 text-white" data-lucide="file-text"></i>
</a>
<span class="bg-green-700 px-2 py-1 rounded-full text-xs text-white font-medium mt-2 text-center">
Upload Struk
</span>
</a> *@
</div>
</div>

View File

@ -11,9 +11,6 @@
"OpenRouter": {
"OCRkey": "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"
},
"9Router": {
"OCRkey": "sk-50d5eecff8b7f7dc-6gwrum-312a1b07"
},
"Mapbox": {
"Apikey": "pk.eyJ1IjoibWFyc3pheW4iLCJhIjoiY21sajUyMDd0MDllcjNncGdna3NzeTR4ZyJ9.Wvbh5J94j9sF_8KNPp9FYQ"
},

View File

@ -1,4 +1,4 @@
/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
@layer properties;
@layer theme, base, components, utilities;
@layer theme {
@ -66,7 +66,6 @@
--color-blue-600: oklch(54.6% 0.245 262.881);
--color-blue-700: oklch(48.8% 0.243 264.376);
--color-blue-800: oklch(42.4% 0.199 265.638);
--color-blue-950: oklch(28.2% 0.091 267.935);
--color-indigo-50: oklch(96.2% 0.018 272.314);
--color-indigo-100: oklch(93% 0.034 272.788);
--color-indigo-300: oklch(78.5% 0.115 274.713);
@ -336,15 +335,6 @@
.inset-x-4 {
inset-inline: calc(var(--spacing) * 4);
}
.\!start {
inset-inline-start: var(--spacing) !important;
}
.-start {
inset-inline-start: calc(var(--spacing) * -1);
}
.start {
inset-inline-start: var(--spacing);
}
.start-0 {
inset-inline-start: calc(var(--spacing) * 0);
}
@ -354,12 +344,6 @@
.start-100 {
inset-inline-start: calc(var(--spacing) * 100);
}
.-end {
inset-inline-end: calc(var(--spacing) * -1);
}
.end {
inset-inline-end: var(--spacing);
}
.end-0 {
inset-inline-end: calc(var(--spacing) * 0);
}
@ -382,7 +366,7 @@
top: calc(var(--spacing) * 1);
}
.top-1\/2 {
top: calc(1 / 2 * 100%);
top: calc(1/2 * 100%);
}
.top-2 {
top: calc(var(--spacing) * 2);
@ -484,7 +468,7 @@
left: calc(var(--spacing) * 0);
}
.left-1\/2 {
left: calc(1 / 2 * 100%);
left: calc(1/2 * 100%);
}
.left-2 {
left: calc(var(--spacing) * 2);
@ -1009,13 +993,13 @@
width: calc(var(--spacing) * 1);
}
.w-1\/3 {
width: calc(1 / 3 * 100%);
width: calc(1/3 * 100%);
}
.w-2 {
width: calc(var(--spacing) * 2);
}
.w-2\/3 {
width: calc(2 / 3 * 100%);
width: calc(2/3 * 100%);
}
.w-3 {
width: calc(var(--spacing) * 3);
@ -1162,7 +1146,7 @@
border-collapse: collapse;
}
.-translate-x-1\/2 {
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
--tw-translate-x: calc(calc(1/2 * 100%) * -1);
translate: var(--tw-translate-x) var(--tw-translate-y);
}
.-translate-x-12 {
@ -1174,7 +1158,7 @@
translate: var(--tw-translate-x) var(--tw-translate-y);
}
.-translate-y-1\/2 {
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
--tw-translate-y: calc(calc(1/2 * 100%) * -1);
translate: var(--tw-translate-x) var(--tw-translate-y);
}
.-translate-y-16 {
@ -1741,9 +1725,6 @@
.bg-blue-600 {
background-color: var(--color-blue-600);
}
.bg-blue-800 {
background-color: var(--color-blue-800);
}
.bg-cyan-400\/10 {
background-color: color-mix(in srgb, oklch(78.9% 0.154 211.53) 10%, transparent);
@supports (color: color-mix(in lab, red, red)) {
@ -1804,9 +1785,6 @@
.bg-green-600 {
background-color: var(--color-green-600);
}
.bg-green-700 {
background-color: var(--color-green-700);
}
.bg-indigo-300 {
background-color: var(--color-indigo-300);
}
@ -2850,9 +2828,6 @@
.ring-green-100 {
--tw-ring-color: var(--color-green-100);
}
.ring-green-200 {
--tw-ring-color: var(--color-green-200);
}
.ring-orange-200 {
--tw-ring-color: var(--color-orange-200);
}
@ -2886,6 +2861,10 @@
--tw-drop-shadow: drop-shadow(var(--drop-shadow-lg));
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
}
.grayscale {
--tw-grayscale: grayscale(100%);
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
}
.invert {
--tw-invert: invert(100%);
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);