Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bachtiarpanjaitan committed Jul 30, 2024
0 parents commit b88bfef
Show file tree
Hide file tree
Showing 40 changed files with 1,139 additions and 0 deletions.
15 changes: 15 additions & 0 deletions App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IhandCashier"
x:Class="IhandCashier.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

14 changes: 14 additions & 0 deletions App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using IhandCashier.Layouts;

namespace IhandCashier;

public partial class App : Application
{
public App()
{
InitializeComponent();

MainPage = new MainLayout();
}
}

15 changes: 15 additions & 0 deletions AppShell.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="IhandCashier.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:IhandCashier"
Shell.FlyoutBehavior="Disabled">

<!--<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:Ma}"
Route="MainLayout" />-->

</Shell>

10 changes: 10 additions & 0 deletions AppShell.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace IhandCashier;

public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
}
}

71 changes: 71 additions & 0 deletions IhandCashier.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>IhandCashier</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

<!-- Display name -->
<ApplicationTitle>Ihand Cashier</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.basapadi.ihandcashier</ApplicationId>
<ApplicationIdGuid>ec0348d5-6dd4-4540-b239-f63ec5fe0d1e</ApplicationIdGuid>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-ios|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0-maccatalyst|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-maccatalyst|AnyCPU'">
<CreatePackage>false</CreatePackage>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />

<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<None Remove="Layouts\" />
<None Remove="Pages\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Layouts\" />
<Folder Include="Pages\" />
</ItemGroup>
</Project>
32 changes: 32 additions & 0 deletions IhandCashier.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IhandCashier", "IhandCashier.csproj", "{4F2570B0-6B36-4040-8272-C9E0FBC401C5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Release|Any CPU.Build.0 = Release|Any CPU
{4F2570B0-6B36-4040-8272-C9E0FBC401C5}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = PrefixedHierarchical
EndGlobalSection
EndGlobal
9 changes: 9 additions & 0 deletions Layouts/MainLayout.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IhandCashier.Layouts.MainLayout"
Title="Beranda" Visual="Default">
<ContentPage.MenuBarItems Order="Secondary">

</ContentPage.MenuBarItems>
</ContentPage>
79 changes: 79 additions & 0 deletions Layouts/MainLayout.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
using Microsoft.Maui;
using Microsoft.Maui.Controls;

namespace IhandCashier.Layouts;

public partial class MainLayout : ContentPage
{
public MainLayout()
{
InitializeComponent();
setupMenu();

}

private void setupMenu()
{
//SAYA
var mbMe = new MenuBarItem { Text = "Saya" };
var meProfile = new MenuFlyoutItem { Text = "Profil" };
var meSetting = new MenuFlyoutItem { Text = "Pengaturan" };
var meExit = new MenuFlyoutItem { Text = "Keluar" };
mbMe.Add(meProfile);
mbMe.Add(meSetting);
mbMe.Add(meExit);

//MASTER
var mbMaster = new MenuBarItem { Text = "Master" };
var masterBarang = new MenuFlyoutItem { Text = "Data Barang" };
var masterKasir = new MenuFlyoutItem { Text = "Data Kasir" };
var masterPemasok = new MenuFlyoutItem { Text = "Data Pemasok" };
var masterPelanggan = new MenuFlyoutItem { Text = "Data Pelanggan" };
mbMaster.Add(masterBarang);
mbMaster.Add(masterKasir);
mbMaster.Add(masterPemasok);
mbMaster.Add(masterPelanggan);

//TRANSAKSI
var mbTransaksi = new MenuBarItem { Text = "Transaksi" };
var transPenerimaan = new MenuFlyoutItem { Text = "Penerimaan Barang" };
var transPenjualan = new MenuFlyoutItem { Text = "Penjualan Barang" };
var transStok = new MenuFlyoutSubItem { Text = "Stok" };
var cTransStok = new MenuFlyoutItem { Text = "Stok Barang" };
var cTransAddjusment = new MenuFlyoutItem { Text = "Penyesuaian Barang" };
var transRet = new MenuFlyoutSubItem { Text = "Retur" };
var cRetJual= new MenuFlyoutItem { Text = "Retur Jual" };
var cRetBeli= new MenuFlyoutItem { Text = "Retur Beli" };

transStok.Add(cTransStok);
transStok.Add(cTransAddjusment);

transRet.Add(cRetBeli);
transRet.Add(cRetJual);


mbTransaksi.Add(transPenerimaan);
mbTransaksi.Add(transPenjualan);
mbTransaksi.Add(transStok);
mbTransaksi.Add(transRet);

//REPORT
var mbReport = new MenuBarItem { Text = "Laporan" };
var rep_1 = new MenuFlyoutItem { Text = "Laporan Ringkasan Bisnis" };
var rep_2 = new MenuFlyoutItem { Text = "Laporan Jual Beli" };
var rep_3 = new MenuFlyoutItem { Text = "Laporan Hutang Piutang" };
var rep_4 = new MenuFlyoutItem { Text = "Laporan Stok Barang" };
var rep_5 = new MenuFlyoutItem { Text = "Laporan Lainnya" };
mbReport.Add(rep_1);
mbReport.Add(rep_2);
mbReport.Add(rep_3);
mbReport.Add(rep_4);
mbReport.Add(rep_5);

this.MenuBarItems.Add(mbMe);
this.MenuBarItems.Add(mbMaster);
this.MenuBarItems.Add(mbTransaksi);
this.MenuBarItems.Add(mbReport);
}

}
19 changes: 19 additions & 0 deletions MauiProgram.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
namespace IhandCashier;

public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});

return builder.Build();
}
}

12 changes: 12 additions & 0 deletions Pages/Home.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IhandCashier.Pages.Home"
Title="Home">
<VerticalStackLayout>
<Label
Text="HOME"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ContentPage>
9 changes: 9 additions & 0 deletions Pages/Home.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace IhandCashier.Pages;

public partial class Home : ContentPage
{
public Home()
{
InitializeComponent();
}
}
6 changes: 6 additions & 0 deletions Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
11 changes: 11 additions & 0 deletions Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Android.App;
using Android.Content.PM;
using Android.OS;

namespace IhandCashier;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}

16 changes: 16 additions & 0 deletions Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Android.App;
using Android.Runtime;

namespace IhandCashier;

[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

7 changes: 7 additions & 0 deletions Platforms/Android/Resources/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

10 changes: 10 additions & 0 deletions Platforms/MacCatalyst/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Foundation;

namespace IhandCashier;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

30 changes: 30 additions & 0 deletions Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Platforms/MacCatalyst/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using ObjCRuntime;
using UIKit;

namespace IhandCashier;

public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}

Loading

0 comments on commit b88bfef

Please sign in to comment.