Skip to content

Commit

Permalink
Fixing:: Some Code Fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
bachtiarpanjaitan committed Oct 4, 2024
1 parent 02babbd commit 00f1c95
Show file tree
Hide file tree
Showing 23 changed files with 52 additions and 34 deletions.
2 changes: 1 addition & 1 deletion App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace IhandCashier;

public partial class App : Application
public partial class App
{
public App()
{
Expand Down
2 changes: 1 addition & 1 deletion AppShell.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace IhandCashier;

public partial class AppShell : Shell
public partial class AppShell
{
public AppShell()
{
Expand Down
5 changes: 1 addition & 4 deletions Bepe/Components/DetailPreviewPopup.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using System.Globalization;
using System.Text.RegularExpressions;
using CommunityToolkit.Maui.Views;
using IhandCashier.Bepe.Types;
using Syncfusion.Maui.Data;
using Syncfusion.Maui.DataGrid;
using Syncfusion.Maui.DataSource;

namespace IhandCashier.Bepe.Components;

Expand Down Expand Up @@ -61,7 +58,7 @@ public void SetData(object data)
};

_datagrid.ItemsSource = data;
grid.Add(_datagrid,0,0);
grid.Add(_datagrid,0);
grid.Add(_btnClose,0,1);
_datagrid.AutoGeneratingColumn += (sender, args) =>
{
Expand Down
2 changes: 1 addition & 1 deletion Bepe/Components/FilterOne.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static void SearchHandler(EventHandler<TextChangedEventArgs> searchHandle
Search.TextChanged -= _entrySearchChangedHandler;
}
_entrySearchChangedHandler = searchHandler;
Search.DebounceTextChanged(OnSearchTextChanged, 1000);
Search.DebounceTextChanged(OnSearchTextChanged);
}

public static void AddFormClickHandler(EventHandler handler)
Expand Down
3 changes: 1 addition & 2 deletions Bepe/Components/ImagePreviewPopup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using CommunityToolkit.Maui.Core;
using CommunityToolkit.Maui.Views;
using Grid = Microsoft.Maui.Controls.Grid;

Expand Down Expand Up @@ -43,7 +42,7 @@ public ImagePreviewPopup()
};

Color = Colors.Transparent;
grid.Add(image,0,0);
grid.Add(image,0);
grid.Add(_btnClose,0,1);
Content = grid;
}
Expand Down
6 changes: 3 additions & 3 deletions Bepe/Helpers/ContentLayoutTwoColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public ContentLayoutTwoColumn()
}
}
};
grid.Add(ContentPlaceholder, 2, 0);
grid.Add(ContentPlaceholder, 2);
}

public void SetSideMenu(VerticalStackLayout sm)
{
grid.Add(sm, 0, 0);
grid.Add(sm, 0);
}

public void SetContent(ContentView c)
Expand All @@ -66,7 +66,7 @@ public void SetContent(ContentView c)
public Frame GenerateFrame()
{
var splitter = new BoxView { Color = Color.FromArgb("#592f02"), WidthRequest = 1 };
grid.Add(splitter,1,0);
grid.Add(splitter,1);
var frame = new Frame
{
Content = grid,
Expand Down
2 changes: 1 addition & 1 deletion Bepe/Helpers/Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void Create(View content)
footer.Add(BtnClose);
footer.Add(BtnSave);

grid.Add(header,0,0);
grid.Add(header,0);
grid.Add(content,0,1);
grid.Add(footer,0,2);
Content = grid;
Expand Down
2 changes: 1 addition & 1 deletion Bepe/Services/ProductReceiptService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public async Task SoftDeleteAsync(ProductReceipt item)

private void CalculateStock(AppDbContext _context,ProductReceiptDetail newData, StockStatus status = StockStatus.Addition, ProductReceiptDetail oldData = null)
{
ProductStock oldStock = null;
ProductStock oldStock;
oldStock = _context.ProductStocks
.AsNoTracking()
.Where(x => x.product_id == newData.product_id)
Expand Down
2 changes: 1 addition & 1 deletion Bepe/ViewModels/ProductReceiptDetailViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public ProductReceiptDetail ToEntity()
product_receipt_id = _product_receipt_id,
product_id = _product_id,
unit_id = _unit_id,
jumlah = (decimal) _jumlah,
jumlah = _jumlah,
harga_satuan = (decimal) _harga_satuan,
};
}
Expand Down
4 changes: 2 additions & 2 deletions Layouts/MainLayout.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace IhandCashier.Layouts;

public partial class MainLayout : ContentPage
public partial class MainLayout
{
public Dictionary<string, MenuFlyoutItem> ListMenu = new ();

Expand Down Expand Up @@ -63,7 +63,7 @@ public MainLayout()
{
try
{
var data = menuBarItem?.CommandParameter as String;
var data = menuBarItem?.CommandParameter as string;
var type = Type.GetType(AppConfig.PAGES_NAMESPACE + "." + data);
if (type == null) return;
var instance = Activator.CreateInstance(type);
Expand Down
2 changes: 1 addition & 1 deletion Pages/PageDataBarang.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace IhandCashier.Pages;

public partial class PageDataBarang : PageController
public partial class PageDataBarang
{
public PageDataBarang()
{
Expand Down
2 changes: 1 addition & 1 deletion Pages/PageDataPengguna.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace IhandCashier.Pages;

public partial class PageDataPengguna : PageController
public partial class PageDataPengguna
{
public PageDataPengguna()
{
Expand Down
4 changes: 2 additions & 2 deletions Pages/PageHome.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Collections.ObjectModel;
using System.Collections.ObjectModel;
using IhandCashier.Bepe.Controllers;
using Syncfusion.Maui.DataGrid;

namespace IhandCashier.Pages;

public partial class PageHome : PageController
public partial class PageHome
{
public PageHome()
{
Expand Down
2 changes: 1 addition & 1 deletion Pages/PagePenerimaanBarang.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace IhandCashier.Pages;

public partial class PagePenerimaanBarang : PageController
public partial class PagePenerimaanBarang
{
public PagePenerimaanBarang()
{
Expand Down
1 change: 0 additions & 1 deletion Pages/PageProfile.xaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<local:PageController
xmlns:local="clr-namespace:IhandCashier.Bepe.Controllers"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.DataGrid;assembly=Syncfusion.Maui.DataGrid"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="IhandCashier.Pages.PageProfile">
Expand Down
2 changes: 1 addition & 1 deletion Pages/PageProfile.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using IhandCashier.Bepe.Controllers;
namespace IhandCashier.Pages;

public partial class PageProfile : PageController
public partial class PageProfile
{
public PageProfile()
{
Expand Down
2 changes: 1 addition & 1 deletion Pages/PageSetting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace IhandCashier.Pages;

public partial class PageSetting : PageController
public partial class PageSetting
{
public PageSetting()
{
Expand Down
5 changes: 0 additions & 5 deletions Pages/Views/GridDataSatuanBarang.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,4 @@ private void OnEditClicked(object sender, EventArgs e)

}
}

private void OnRefreshClicked(object sender, EventArgs e)
{
_pagination.RefreshData();
}
}
1 change: 0 additions & 1 deletion Pages/Views/GridDataSatuanDasarBarang.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<views:BaseView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:components="clr-namespace:IhandCashier.Bepe.Components"
xmlns:views="clr-namespace:IhandCashier.Pages.Views"
x:Class="IhandCashier.Pages.Views.GridDataSatuanDasarBarang">
<FlyoutBase.ContextFlyout>
Expand Down
2 changes: 1 addition & 1 deletion Pages/Views/SettingAcl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace IhandCashier.Pages.Views;

public partial class SettingAcl : ContentView
public partial class SettingAcl
{
public SettingAcl()
{
Expand Down
2 changes: 1 addition & 1 deletion Pages/Windows/LoginForm.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace IhandCashier.Pages.Windows;

public partial class LoginForm : ContentPage
public partial class LoginForm
{
private SfDataForm _form = new();
private DataLogin _dataLogin = new();
Expand Down
2 changes: 1 addition & 1 deletion Pages/Windows/SetupDatabase.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace IhandCashier.Pages.Windows;

public partial class SetupDatabase : ContentPage
public partial class SetupDatabase
{
private AppSetting _setting = new();
private IcSqLite _sqlite = new();
Expand Down
29 changes: 29 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify IDE code to run analysis without container (Applied in CI/CD pipeline)
ide: QDNET

#Specify inspection profile for code analysis
profile:
name: qodana.starter

#Enable inspections
#include:
# - name: <SomeEnabledInspectionId>

#Disable inspections
#exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>

#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
#bootstrap: sh ./prepare-qodana.sh

#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
#plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)

0 comments on commit 00f1c95

Please sign in to comment.