Update
This commit is contained in:
parent
52421e9693
commit
0bf343b65d
@ -44,7 +44,7 @@
|
||||
<div class="text-danger" role="alert"></div>
|
||||
<div class="form-floating mb-3">
|
||||
<input v-model="ldapLoginInfo.username" id="ldapUsername" class="form-control" autocomplete="username" aria-required="true" placeholder="name@example.com" />
|
||||
<label id="ldapEmailLabel" class="form-label">Email</label>
|
||||
<label id="ldapEmailLabel" class="form-label">Windows Login</label>
|
||||
<span id="ldapEmailError" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-floating mb-3">
|
||||
|
||||
@ -22,6 +22,7 @@ using PSTW_CentralSystem.Models;
|
||||
|
||||
namespace PSTW_CentralSystem.Areas.Identity.Pages.Account
|
||||
{
|
||||
[Authorize]
|
||||
public class RegisterModel : PageModel
|
||||
{
|
||||
private readonly SignInManager<UserModel> _signInManager;
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
namespace PSTW_CentralSystem.Areas.Inventory.Controllers.Admin
|
||||
{
|
||||
[Area("Inventory")]
|
||||
public class InventoryAdminController : Controller
|
||||
//[Authorize(Policy = "RoleModulePolicy")]
|
||||
public class InventoryMasterController : Controller
|
||||
{
|
||||
public IActionResult AdminDashboard()
|
||||
{
|
||||
@ -25,29 +25,5 @@ namespace PSTW_CentralSystem.Areas.Inventory.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Details/5
|
||||
public ActionResult Details(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Edit/5
|
||||
public ActionResult Edit(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Delete/5
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,29 +23,5 @@ namespace PSTW_CentralSystem.Areas.Inventory.Controllers
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Details/5
|
||||
public ActionResult Details(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Create
|
||||
public ActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Edit/5
|
||||
public ActionResult Edit(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
// GET: Inventory/Delete/5
|
||||
public ActionResult Delete(int id)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,12 +14,12 @@ namespace PSTW_CentralSystem.Areas.Inventory.Models
|
||||
public int? ToUser { get; set; }
|
||||
[Comment("Repair, Calibration, Faulty, Ready To Deploy, On Delivery")]
|
||||
public string? ToOther { get; set; }
|
||||
[Comment("StockIn, Stock Out")]
|
||||
[Comment("Register, StockIn, Stock Out")]
|
||||
public string? Action { get; set; }
|
||||
public int? Quantity { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public string? ConsignmentNote { get; set; }
|
||||
public DateTime? Date { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public int? LastUser { get; set; }
|
||||
public int? LastStore{ get; set; }
|
||||
public int? LastStation{ get; set; }
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
@{
|
||||
ViewData["Title"] = "PSTW Centralized System";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Inventory Admin Dashboard</h1>
|
||||
<p>Learn about <a href="https://learn.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
@await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml");
|
||||
116
Areas/Inventory/Views/InventoryMaster/AdminDashboard.cshtml
Normal file
116
Areas/Inventory/Views/InventoryMaster/AdminDashboard.cshtml
Normal file
@ -0,0 +1,116 @@
|
||||
@{
|
||||
ViewData["Title"] = "Dashboard";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
<div class="container" id="invAdmin">
|
||||
<div class="row">
|
||||
<div class="text-center">
|
||||
<p><h1 class="display-4">Inventory Admin Dashboard</h1></p>
|
||||
<p v-show="currentUserCompanyDept.departmentName"><h2 class="display-6">Store: {{ currentUserCompanyDept.departmentName }}</h2></p>
|
||||
</div>
|
||||
</div>
|
||||
@await Html.PartialAsync("~/Areas/Inventory/Views/_InventoryPartial.cshtml");
|
||||
<div class="row card">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Inventory Report</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div v-if="reportData">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-3">
|
||||
<h4>Statistic</h4>
|
||||
<p>Total Number of Item Registered: {{ reportData.itemCountRegistered }}</p>
|
||||
<p>Total Number of Item Still in Stock: {{ reportData.itemCountStillInStock }}</p>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<h4>Item Registered </h4>
|
||||
<p>This Month: {{ reportData.itemCountRegisteredThisMonth }}</p>
|
||||
<p>Last Month: {{ reportData.itemCountRegisteredLastMonth }}</p>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<h4>Item Stock Out </h4>
|
||||
<p>This Month: {{ reportData.itemCountStockOutThisMonth }}</p>
|
||||
<p>Last Month: {{ reportData.itemCountStockOutLastMonth }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@{
|
||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||
}
|
||||
<script>
|
||||
$(function () {
|
||||
app.mount('#invAdmin');
|
||||
|
||||
$('.closeModal').on('click', function () {
|
||||
// Show the modal with the ID 'addManufacturerModal'.
|
||||
$('.modal').modal('hide');
|
||||
});
|
||||
});
|
||||
const app = Vue.createApp({
|
||||
data() {
|
||||
return {
|
||||
currentUser: null,
|
||||
currentUserCompanyDept: {
|
||||
departmentName: null,
|
||||
departmentId: null
|
||||
},
|
||||
reportData: null,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchUser();
|
||||
},
|
||||
methods: {
|
||||
async fetchUser() {
|
||||
try {
|
||||
const response = await fetch(`/IdentityAPI/GetUserInformation/`, {
|
||||
method: 'POST',
|
||||
});
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
this.currentUser = data?.userInfo || null;
|
||||
const companyDeptData = await this.currentUser.department;
|
||||
const userRole = this.currentUser.role;
|
||||
if(userRole == "SuperAdmin" || userRole == "SystemAdmin"){
|
||||
this.currentUserCompanyDept = {departmentId : 0, departmentName : "All"}
|
||||
this.fetchInventoryReport(0);
|
||||
}
|
||||
else{
|
||||
this.currentUserCompanyDept = companyDeptData;
|
||||
this.fetchInventoryReport(companyDeptData.departmentId);
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.error(`Failed to fetch user: ${response.statusText}`);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
}
|
||||
},
|
||||
async fetchInventoryReport(deptId){
|
||||
try {
|
||||
const response = await fetch(`/InvMainAPI/GetInventoryReport/` + deptId, {
|
||||
method: 'POST',
|
||||
});
|
||||
if (response.ok) {
|
||||
const data = await response.json();
|
||||
this.reportData = data;
|
||||
}
|
||||
else {
|
||||
console.error(`Failed to fetch user: ${response.statusText}`);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.error('There was a problem with the fetch operation:', error);
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@ -108,7 +108,7 @@
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-4 col-form-label">Department:</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedDepartment" required>
|
||||
<select class="btn btn-primary dropdown-toggle col-md-10" v-model="selectedDepartment" :disabled="currentUserCompanyDept != null" required>
|
||||
<option class="btn-light" value="" disabled selected>Select Department</option>
|
||||
<option class="btn-light" v-for="(dept, index) in filteredDepartments" :key="index" :value="dept.departmentId">{{ dept.departmentName }}</option>
|
||||
</select>
|
||||
@ -440,7 +440,7 @@
|
||||
return []; // No company selected, return empty list
|
||||
}
|
||||
const company = this.companies.find(c => c.companyId === this.selectedCompany);
|
||||
this.selectedDepartment = '';
|
||||
// this.selectedDepartment = '';
|
||||
return company ? company.departments : [];
|
||||
},
|
||||
showProduct() {
|
||||
@ -617,7 +617,7 @@
|
||||
const containerId = `qr${data.uniqueID}`;
|
||||
const container = $(`#${containerId}`);
|
||||
container.empty();
|
||||
container.append(`${data.uniqueID}<a href="#" target="_blank">`);
|
||||
container.append(`${data.uniqueID}`);
|
||||
// console.log(container[0]);
|
||||
if (container) {
|
||||
// Generate QR code only if not already generated
|
||||
@ -630,6 +630,9 @@
|
||||
correctLevel: QRCode.CorrectLevel.M
|
||||
});
|
||||
}
|
||||
container.on('click', function() {
|
||||
window.open(data.qrString, '_blank');
|
||||
});
|
||||
});
|
||||
},
|
||||
})
|
||||
@ -893,6 +896,7 @@
|
||||
const companyDeptData = await this.currentUser.department;
|
||||
this.currentUserCompanyDept = companyDeptData;
|
||||
this.selectedCompany = companyDeptData?.companyId || "";
|
||||
this.selectedDepartment = companyDeptData?.departmentId || "";
|
||||
}
|
||||
else {
|
||||
console.error(`Failed to fetch user: ${response.statusText}`);
|
||||
@ -933,7 +937,7 @@
|
||||
<div class="col-7 d-flex align-items-center justify-content-center">
|
||||
<div class="row-fluid">
|
||||
<div class="col-12 h4"><b>${this.thisQRInfo.departmentName}</b></div>
|
||||
<div class="col-12 h4"><b>${this.thisQRInfo.serialNumber}</b></div>
|
||||
<div class="col-12 h4"><b>${this.thisQRInfo.serialNumber??"-"}</b></div>
|
||||
<div class="col-12 h4"><b>${this.thisQRInfo.productName}</b></div>
|
||||
<div class="col-12 h4"><b>${this.thisQRInfo.endWDate}</b></div>
|
||||
</div>
|
||||
|
||||
@ -8,6 +8,7 @@ using PSTW_CentralSystem.Areas.Inventory.Models;
|
||||
using PSTW_CentralSystem.DBContext;
|
||||
using PSTW_CentralSystem.Models;
|
||||
using System.ComponentModel.Design;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
|
||||
@ -385,7 +386,8 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory
|
||||
LastStore = inventoryMaster.StoreId,
|
||||
LastUser = inventoryMaster.UserId,
|
||||
LatestStatus = "Ready To Deploy",
|
||||
Action= "Stock In",
|
||||
Quantity = item.Quantity,
|
||||
Action= "Register",
|
||||
Date = DateTime.Now,
|
||||
MovementComplete = true,
|
||||
};
|
||||
@ -498,5 +500,97 @@ namespace PSTW_CentralSystem.Controllers.API.Inventory
|
||||
}
|
||||
|
||||
#endregion Item
|
||||
|
||||
#region ItemReport
|
||||
|
||||
[HttpPost("GetInventoryReport/{deptId}")]
|
||||
public async Task<IActionResult> GetInventoryReport(int deptId)
|
||||
{
|
||||
try{
|
||||
var user = await _userManager.GetUserAsync(User);
|
||||
|
||||
var userRole = await _userManager.GetRolesAsync(user ?? new UserModel());
|
||||
List<ItemModel> items = new List<ItemModel>();
|
||||
if (userRole.Contains("SuperAdmin") && userRole.Contains("SystemAdmin"))
|
||||
{
|
||||
items = await _centralDbContext.Items
|
||||
.Include("CreatedBy")
|
||||
.Include("Department")
|
||||
.Include("Product")
|
||||
.ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
items = await _centralDbContext.Items
|
||||
.Include("CreatedBy")
|
||||
.Include("Department")
|
||||
.Include("Product")
|
||||
.Where(i => i.DepartmentId == deptId)
|
||||
.ToListAsync();
|
||||
}
|
||||
var itemListWithDetails = items.Where(i => i.Quantity > 0).Select(item => new
|
||||
{
|
||||
item.ItemID,
|
||||
item.UniqueID,
|
||||
item.CompanyId,
|
||||
item.DepartmentId,
|
||||
item.ProductId,
|
||||
item.SerialNumber,
|
||||
item.Quantity,
|
||||
item.Supplier,
|
||||
PurchaseDate = item.PurchaseDate.ToString("dd/MM/yyyy"),
|
||||
item.PONo,
|
||||
item.Currency,
|
||||
item.DefaultPrice,
|
||||
item.CurrencyRate,
|
||||
item.ConvertPrice,
|
||||
item.DODate,
|
||||
item.Warranty,
|
||||
EndWDate = item.EndWDate.ToString("dd/MM/yyyy"),
|
||||
InvoiceDate = item.InvoiceDate?.ToString("dd/MM/yyyy"),
|
||||
item.Department?.DepartmentName,
|
||||
CreatedBy = item.CreatedBy!.UserName,
|
||||
item.Product!.ProductName,
|
||||
item.Product!.Category,
|
||||
//CurrentUser = item.Movement?.FromUser?.UserName,
|
||||
CurrentUser = item.Movement?.FromUser?.UserName,
|
||||
CurrentStore = item.Movement?.FromStore?.StoreName,
|
||||
CurrentStation = item.Movement?.FromStation?.StationName,
|
||||
|
||||
QRString = $"{HttpContext.Request.Scheme}://{HttpContext.Request.Host.Value}/I/{item.UniqueID}" // Generate QR String
|
||||
}).ToList();
|
||||
|
||||
int itemCountRegistered = items.Count;
|
||||
int itemCountStillInStock = items.Where(i => i.Quantity > 0).Count();
|
||||
var itemsMovementsThisMonth = _centralDbContext.ItemMovements
|
||||
.Where(i => i.Date.Month == DateTime.Now.Month);
|
||||
int itemCountRegisteredThisMonth = itemsMovementsThisMonth.Count(i => i.Action == "Register");
|
||||
int itemCountStockOutThisMonth = itemsMovementsThisMonth.Count(i => i.Action == "Stock Out");
|
||||
|
||||
var lastMonth = DateTime.Now.AddMonths(-1).Month;
|
||||
var itemsMovementsLastMonth = _centralDbContext.ItemMovements
|
||||
.Where(i => i.Date.Month == lastMonth);
|
||||
int itemCountRegisteredLastMonth = itemsMovementsLastMonth.Count(i => i.Action == "Register");
|
||||
int itemCountStockOutLastMonth = itemsMovementsLastMonth.Count(i => i.Action == "Stock Out");
|
||||
|
||||
var report = new
|
||||
{
|
||||
itemListWithDetails,
|
||||
itemCountRegistered,
|
||||
itemCountStillInStock,
|
||||
itemCountRegisteredThisMonth,
|
||||
itemCountStockOutThisMonth,
|
||||
itemCountRegisteredLastMonth,
|
||||
itemCountStockOutLastMonth
|
||||
};
|
||||
return Json(report);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return BadRequest(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ namespace PSTW_CentralSystem.Controllers
|
||||
|
||||
[Authorize]
|
||||
[HttpPost("/i/{id}")]
|
||||
public IActionResult ItemInformation(string id, [FromBody] ItemModel item)
|
||||
public IActionResult ItemRecognization(string id, [FromBody] ItemModel item)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
@ -115,7 +115,6 @@ namespace PSTW_CentralSystem.CustomPolicy
|
||||
// Load all ModuleSettings and process them in memory
|
||||
var moduleSettings = _authDBContext.ModuleSettings.AsEnumerable();
|
||||
|
||||
// Check if the method exists in the module settings
|
||||
// Check if the method exists in the module settings
|
||||
var isMethodExist = moduleSettings.FirstOrDefault(m => m.MethodAllowedUserType?.Any(mt => mt.MethodName == pageName) == true);
|
||||
|
||||
|
||||
@ -39,7 +39,8 @@ namespace PSTW_CentralSystem.DBContext
|
||||
new RoleModel { Id = 2, Name = "SystemAdmin", NormalizedName = "SystemAdmin".ToUpper(), Description = "Can access some admin pages" },
|
||||
new RoleModel { Id = 3, Name = "Engineer", NormalizedName = "Engineer".ToUpper(), Description = "Can access operation pages" },
|
||||
new RoleModel { Id = 4, Name = "Observer", NormalizedName = "Observer".ToUpper(), Description = "Can access data viewer pages" },
|
||||
new RoleModel { Id = 5, Name = "Inventory Master", NormalizedName = "Inventory Master".ToUpper(), Description = "Handle inventory module" });
|
||||
new RoleModel { Id = 5, Name = "Inventory Master", NormalizedName = "Inventory Master".ToUpper(), Description = "Handle inventory module" },
|
||||
new RoleModel { Id = 6, Name = "Finance", NormalizedName = "Finance".ToUpper(), Description = "Involve in inventory transaction" });
|
||||
|
||||
var passwordHasher = new PasswordHasher<UserModel>();
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ using PSTW_CentralSystem.DBContext;
|
||||
namespace PSTW_CentralSystem.Migrations
|
||||
{
|
||||
[DbContext(typeof(CentralSystemContext))]
|
||||
[Migration("20241230074733_Initiate")]
|
||||
[Migration("20250106062312_Initiate")]
|
||||
partial class Initiate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
@ -200,10 +200,6 @@ namespace PSTW_CentralSystem.Migrations
|
||||
b.Property<string>("InvoiceNo")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ItemLocation")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("ItemStatus")
|
||||
.HasColumnType("int")
|
||||
.HasComment("1 = In stock; 2 = Item Moving; 3 = Item Out; 4 = Item Broken; 5 = Item Lost; 6 = Item Stolen; 7 = Item Damaged; 8 = Item Discarded; 9 = Item Destroyed; 10 = Item Finished;");
|
||||
@ -267,12 +263,12 @@ namespace PSTW_CentralSystem.Migrations
|
||||
|
||||
b.Property<string>("Action")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("StockIn, Stock Out");
|
||||
.HasComment("Register, StockIn, Stock Out");
|
||||
|
||||
b.Property<string>("ConsignmentNote")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("Date")
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("ItemId")
|
||||
@ -600,6 +596,13 @@ namespace PSTW_CentralSystem.Migrations
|
||||
Description = "Handle inventory module",
|
||||
Name = "Inventory Master",
|
||||
NormalizedName = "INVENTORY MASTER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
Description = "Involve in inventory transaction",
|
||||
Name = "Finance",
|
||||
NormalizedName = "FINANCE"
|
||||
});
|
||||
});
|
||||
|
||||
@ -685,16 +688,16 @@ namespace PSTW_CentralSystem.Migrations
|
||||
{
|
||||
Id = 1,
|
||||
AccessFailedCount = 0,
|
||||
ConcurrencyStamp = "cedbd3af-4aa6-41cc-a71f-f85ac3a7c6ac",
|
||||
ConcurrencyStamp = "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011",
|
||||
Email = "admin@pstw.com.my",
|
||||
EmailConfirmed = true,
|
||||
FullName = "MAAdmin",
|
||||
LockoutEnabled = false,
|
||||
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
||||
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEEsEPaF/WtRT6js4zpE9wiOXZXn+Vq29o4nc8esBsMmSE3Sm5q636DZeu7ECQlQ0RA==",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==",
|
||||
PhoneNumberConfirmed = false,
|
||||
SecurityStamp = "a7be7fa2-a275-4646-a387-2d1d1042878d",
|
||||
SecurityStamp = "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222",
|
||||
TwoFactorEnabled = false,
|
||||
UserInfoStatus = 1,
|
||||
UserName = "admin@pstw.com.my"
|
||||
@ -703,16 +706,16 @@ namespace PSTW_CentralSystem.Migrations
|
||||
{
|
||||
Id = 2,
|
||||
AccessFailedCount = 0,
|
||||
ConcurrencyStamp = "948106ca-aeaa-49fa-87c9-018445595c12",
|
||||
ConcurrencyStamp = "bcc1500e-9ae2-4704-9997-dbe646d2fa7a",
|
||||
Email = "sysadmin@pstw.com.my",
|
||||
EmailConfirmed = true,
|
||||
FullName = "SysAdmin",
|
||||
LockoutEnabled = false,
|
||||
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
||||
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEL/iXkcbIqa5+OnqaBOBuG2KiSvkxA2shZYl0XQVtmadQnaO2eARuKwyGQqlWu9NqQ==",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==",
|
||||
PhoneNumberConfirmed = false,
|
||||
SecurityStamp = "04aeb405-81f6-4ca0-9ed8-ce10c2e5dd6e",
|
||||
SecurityStamp = "7c582e0d-8237-4605-8fec-449bbe78f6c9",
|
||||
TwoFactorEnabled = false,
|
||||
UserInfoStatus = 1,
|
||||
UserName = "sysadmin@pstw.com.my"
|
||||
@ -417,14 +417,14 @@ namespace PSTW_CentralSystem.Migrations
|
||||
ToUser = table.Column<int>(type: "int", nullable: true),
|
||||
ToOther = table.Column<string>(type: "longtext", nullable: true, comment: "Repair, Calibration, Faulty, Ready To Deploy, On Delivery")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Action = table.Column<string>(type: "longtext", nullable: true, comment: "StockIn, Stock Out")
|
||||
Action = table.Column<string>(type: "longtext", nullable: true, comment: "Register, StockIn, Stock Out")
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Quantity = table.Column<int>(type: "int", nullable: true),
|
||||
Remark = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
ConsignmentNote = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
Date = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||
LastUser = table.Column<int>(type: "int", nullable: true),
|
||||
LastStore = table.Column<int>(type: "int", nullable: true),
|
||||
LastStation = table.Column<int>(type: "int", nullable: true),
|
||||
@ -503,8 +503,6 @@ namespace PSTW_CentralSystem.Migrations
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
InvoiceDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
||||
ItemStatus = table.Column<int>(type: "int", nullable: false, comment: "1 = In stock; 2 = Item Moving; 3 = Item Out; 4 = Item Broken; 5 = Item Lost; 6 = Item Stolen; 7 = Item Damaged; 8 = Item Discarded; 9 = Item Destroyed; 10 = Item Finished;"),
|
||||
ItemLocation = table.Column<string>(type: "longtext", nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
MovementId = table.Column<int>(type: "int", nullable: true),
|
||||
CreatedByUserId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
@ -552,7 +550,8 @@ namespace PSTW_CentralSystem.Migrations
|
||||
{ 2, null, "Can access some admin pages", "SystemAdmin", "SYSTEMADMIN" },
|
||||
{ 3, null, "Can access operation pages", "Engineer", "ENGINEER" },
|
||||
{ 4, null, "Can access data viewer pages", "Observer", "OBSERVER" },
|
||||
{ 5, null, "Handle inventory module", "Inventory Master", "INVENTORY MASTER" }
|
||||
{ 5, null, "Handle inventory module", "Inventory Master", "INVENTORY MASTER" },
|
||||
{ 6, null, "Involve in inventory transaction", "Finance", "FINANCE" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
@ -560,8 +559,8 @@ namespace PSTW_CentralSystem.Migrations
|
||||
columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "Email", "EmailConfirmed", "FullName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserInfoStatus", "UserName", "departmentId" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ 1, 0, "cedbd3af-4aa6-41cc-a71f-f85ac3a7c6ac", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEEsEPaF/WtRT6js4zpE9wiOXZXn+Vq29o4nc8esBsMmSE3Sm5q636DZeu7ECQlQ0RA==", null, false, "a7be7fa2-a275-4646-a387-2d1d1042878d", false, 1, "admin@pstw.com.my", null },
|
||||
{ 2, 0, "948106ca-aeaa-49fa-87c9-018445595c12", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEL/iXkcbIqa5+OnqaBOBuG2KiSvkxA2shZYl0XQVtmadQnaO2eARuKwyGQqlWu9NqQ==", null, false, "04aeb405-81f6-4ca0-9ed8-ce10c2e5dd6e", false, 1, "sysadmin@pstw.com.my", null }
|
||||
{ 1, 0, "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011", "admin@pstw.com.my", true, "MAAdmin", false, null, "ADMIN@PSTW.COM.MY", "ADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==", null, false, "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222", false, 1, "admin@pstw.com.my", null },
|
||||
{ 2, 0, "bcc1500e-9ae2-4704-9997-dbe646d2fa7a", "sysadmin@pstw.com.my", true, "SysAdmin", false, null, "SYSADMIN@PSTW.COM.MY", "SYSADMIN@PSTW.COM.MY", "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==", null, false, "7c582e0d-8237-4605-8fec-449bbe78f6c9", false, 1, "sysadmin@pstw.com.my", null }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
@ -197,10 +197,6 @@ namespace PSTW_CentralSystem.Migrations
|
||||
b.Property<string>("InvoiceNo")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("ItemLocation")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("ItemStatus")
|
||||
.HasColumnType("int")
|
||||
.HasComment("1 = In stock; 2 = Item Moving; 3 = Item Out; 4 = Item Broken; 5 = Item Lost; 6 = Item Stolen; 7 = Item Damaged; 8 = Item Discarded; 9 = Item Destroyed; 10 = Item Finished;");
|
||||
@ -264,12 +260,12 @@ namespace PSTW_CentralSystem.Migrations
|
||||
|
||||
b.Property<string>("Action")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("StockIn, Stock Out");
|
||||
.HasComment("Register, StockIn, Stock Out");
|
||||
|
||||
b.Property<string>("ConsignmentNote")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<DateTime?>("Date")
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int>("ItemId")
|
||||
@ -597,6 +593,13 @@ namespace PSTW_CentralSystem.Migrations
|
||||
Description = "Handle inventory module",
|
||||
Name = "Inventory Master",
|
||||
NormalizedName = "INVENTORY MASTER"
|
||||
},
|
||||
new
|
||||
{
|
||||
Id = 6,
|
||||
Description = "Involve in inventory transaction",
|
||||
Name = "Finance",
|
||||
NormalizedName = "FINANCE"
|
||||
});
|
||||
});
|
||||
|
||||
@ -682,16 +685,16 @@ namespace PSTW_CentralSystem.Migrations
|
||||
{
|
||||
Id = 1,
|
||||
AccessFailedCount = 0,
|
||||
ConcurrencyStamp = "cedbd3af-4aa6-41cc-a71f-f85ac3a7c6ac",
|
||||
ConcurrencyStamp = "4c8e81ae-2e43-4f98-82a0-4d7c4aa6d011",
|
||||
Email = "admin@pstw.com.my",
|
||||
EmailConfirmed = true,
|
||||
FullName = "MAAdmin",
|
||||
LockoutEnabled = false,
|
||||
NormalizedEmail = "ADMIN@PSTW.COM.MY",
|
||||
NormalizedUserName = "ADMIN@PSTW.COM.MY",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEEsEPaF/WtRT6js4zpE9wiOXZXn+Vq29o4nc8esBsMmSE3Sm5q636DZeu7ECQlQ0RA==",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEKr0d9Fe168hXvdX6+oJvbfo2QHFsp8i/EQjhLbkWRn/yvKImJa6XzZ5KJ6qohTE1w==",
|
||||
PhoneNumberConfirmed = false,
|
||||
SecurityStamp = "a7be7fa2-a275-4646-a387-2d1d1042878d",
|
||||
SecurityStamp = "2219ec34-d4a0-496b-a7d7-e6c5d7b2a222",
|
||||
TwoFactorEnabled = false,
|
||||
UserInfoStatus = 1,
|
||||
UserName = "admin@pstw.com.my"
|
||||
@ -700,16 +703,16 @@ namespace PSTW_CentralSystem.Migrations
|
||||
{
|
||||
Id = 2,
|
||||
AccessFailedCount = 0,
|
||||
ConcurrencyStamp = "948106ca-aeaa-49fa-87c9-018445595c12",
|
||||
ConcurrencyStamp = "bcc1500e-9ae2-4704-9997-dbe646d2fa7a",
|
||||
Email = "sysadmin@pstw.com.my",
|
||||
EmailConfirmed = true,
|
||||
FullName = "SysAdmin",
|
||||
LockoutEnabled = false,
|
||||
NormalizedEmail = "SYSADMIN@PSTW.COM.MY",
|
||||
NormalizedUserName = "SYSADMIN@PSTW.COM.MY",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEL/iXkcbIqa5+OnqaBOBuG2KiSvkxA2shZYl0XQVtmadQnaO2eARuKwyGQqlWu9NqQ==",
|
||||
PasswordHash = "AQAAAAIAAYagAAAAEE3CUAWzIeL592V5xPyAD5ciHe8OGtvbNHhU6UNafDMT/+0R77o6UCDj/K8wc0j0Xw==",
|
||||
PhoneNumberConfirmed = false,
|
||||
SecurityStamp = "04aeb405-81f6-4ca0-9ed8-ce10c2e5dd6e",
|
||||
SecurityStamp = "7c582e0d-8237-4605-8fec-449bbe78f6c9",
|
||||
TwoFactorEnabled = false,
|
||||
UserInfoStatus = 1,
|
||||
UserName = "sysadmin@pstw.com.my"
|
||||
|
||||
@ -27,6 +27,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Areas\Report\Controller\" />
|
||||
<Folder Include="Areas\Report\Model\" />
|
||||
<Folder Include="Areas\Report\Views\" />
|
||||
<Folder Include="Controllers\JSA\API\" />
|
||||
<Folder Include="Logs\" />
|
||||
<Folder Include="Migrations\" />
|
||||
|
||||
@ -73,6 +73,7 @@
|
||||
<label class="col-md-1">Role:</label>
|
||||
<div class="col-md-6">
|
||||
<select class="select2 form-select shadow-none mt-3" multiple="multiple" v-model="moduleData.methodAllowedUserType[index].allowedUserTypesArray" style="height: 50px; width: 100%">
|
||||
<option value="All">All Registered User</option>
|
||||
<option v-for="(roleType, index) in roleData" :key="index" :value="roleType.name">{{ roleType.name }}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
<!-- ============================================================== -->
|
||||
<!-- create new -->
|
||||
<!-- ============================================================== -->
|
||||
<li class="nav-item dropdown">
|
||||
<!--<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle"
|
||||
href="#"
|
||||
id="navbarDropdown"
|
||||
@ -193,11 +193,11 @@
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</li>-->
|
||||
<!-- ============================================================== -->
|
||||
<!-- Search -->
|
||||
<!-- ============================================================== -->
|
||||
<li class="nav-item search-box">
|
||||
<!--<li class="nav-item search-box">
|
||||
<a class="nav-link waves-effect waves-dark"
|
||||
href="javascript:void(0)">
|
||||
<i class="mdi mdi-magnify fs-4"></i>
|
||||
@ -208,7 +208,7 @@
|
||||
placeholder="Search & enter" />
|
||||
<a class="srh-btn"><i class="mdi mdi-window-close"></i></a>
|
||||
</form>
|
||||
</li>
|
||||
</li>-->
|
||||
</ul>
|
||||
<!-- ============================================================== -->
|
||||
<!-- Right side toggle and nav items -->
|
||||
@ -417,7 +417,7 @@
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
||||
href="index.html"
|
||||
href="#"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-view-dashboard"></i><span class="hide-menu">Dashboard</span>
|
||||
</a>
|
||||
@ -431,7 +431,7 @@
|
||||
<ul aria-expanded="false" class="collapse first-level">
|
||||
<li class="sidebar-item">
|
||||
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
||||
asp-area="Inventory" asp-controller="InventoryAdmin" asp-action="AdminDashboard"
|
||||
asp-area="Inventory" asp-controller="InventoryMaster" asp-action="AdminDashboard"
|
||||
aria-expanded="false">
|
||||
<i class="mdi mdi-view-dashboard"></i><span class="hide-menu">AdminDashboard</span>
|
||||
</a>
|
||||
@ -452,7 +452,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="sidebar-item">
|
||||
<!-- <li class="sidebar-item">
|
||||
<a class="sidebar-link waves-effect waves-dark sidebar-link"
|
||||
href="charts.html"
|
||||
aria-expanded="false">
|
||||
@ -627,7 +627,7 @@
|
||||
<i class="mdi mdi-cloud-download font-20 me-2"></i>Download
|
||||
Free
|
||||
</a>
|
||||
</li>
|
||||
</li> -->
|
||||
</ul>
|
||||
</nav>
|
||||
<!-- End Sidebar navigation -->
|
||||
|
||||
@ -37,9 +37,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<li class="nav-item">
|
||||
@* <li class="nav-item">
|
||||
<a class="nav-link " id="register" asp-area="Identity" asp-page="/Account/Register">Register</a>
|
||||
</li>
|
||||
</li> *@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link " id="login" asp-area="Identity" asp-page="/Account/Login">Login</a>
|
||||
</li>
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
"ConnectionStrings": {
|
||||
//"DefaultConnection": "Server=localhost;uid=root;Password='';Database=web_interface;"
|
||||
//"DefaultConnection": "server=175.136.244.102;user id=root;password=tw_mysql_root;port=3306;database=web_interface"
|
||||
"CentralConnnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs;", //DB_dev connection
|
||||
//"CentralConnnection": "Server=192.168.12.12;Port=3306;uid=installer;password='pstw_mysql_installer';database=pstw_cs;", //DB_dev Local connection
|
||||
"CentralConnnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs;", //DB_dev Public connection
|
||||
//"InventoryConnection": "Server=219.92.7.60;Port=3307;uid=installer;password='pstw_mysql_installer';database=pstw_cs_inventory;" //DB_dev connection
|
||||
//"DefaultConnection": "Server=219.92.7.60;Port=3307;uid=intern;password='intern_mysql_acct';database=web_interface;"//DB_dev connection
|
||||
},
|
||||
|
||||
BIN
wwwroot/Media/Inventory/Images/Part01.jpg
Normal file
BIN
wwwroot/Media/Inventory/Images/Part01.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 146 KiB |
Loading…
Reference in New Issue
Block a user