|
|
@@ -286,6 +286,13 @@ namespace comal.timesheets
|
|
|
CurrentLocation.IsVisible = false;
|
|
|
buttonsGrid.IsVisible = false;
|
|
|
taskBtn.IsVisible = false;
|
|
|
+ row0.Height = 0;
|
|
|
+ row1.Height = 0;
|
|
|
+ row2.Height = 150;
|
|
|
+ Image img = new Image { Source = "logo.png" };
|
|
|
+ img.Margin = 15;
|
|
|
+ Grid.SetRow(img, 2);
|
|
|
+ homeScreenGrid.Children.Add(img);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -1432,13 +1439,14 @@ namespace comal.timesheets
|
|
|
Text = "Assignments",
|
|
|
Image = "calendar"
|
|
|
};
|
|
|
- Assignments.IsVisible = PRSSecurity.CanView<Assignment>();
|
|
|
+
|
|
|
Assignments.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var assignment_form = new AssignmentList();
|
|
|
Navigation.PushAsync(assignment_form);
|
|
|
});
|
|
|
- toolEntries.Add(Assignments);
|
|
|
+ if (PRSSecurity.CanView<Assignment>())
|
|
|
+ toolEntries.Add(Assignments);
|
|
|
|
|
|
//Deliveries
|
|
|
ToolEntry Deliveries = new ToolEntry
|
|
|
@@ -1446,7 +1454,6 @@ namespace comal.timesheets
|
|
|
Text = "Deliveries",
|
|
|
Image = "deliveries"
|
|
|
};
|
|
|
- Deliveries.IsVisible = PRSSecurity.CanView<Delivery>();
|
|
|
Deliveries.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var delivery_form = new DeliveryList();
|
|
|
@@ -1454,7 +1461,7 @@ namespace comal.timesheets
|
|
|
|
|
|
//DataGridHost host = new DataGridHost(new DeliveryGrid());
|
|
|
//host.SetActionButton("Add");
|
|
|
- //host.OnActionButtonClicked += ((list) =>
|
|
|
+ //host.OnActionButtonClicked += ((list) =>
|
|
|
//{
|
|
|
// DeliveryDetails details = new DeliveryDetails(Guid.Empty);
|
|
|
// details.OnDeliverySaved += () => { (host.DataGrid as DeliveryGrid).RefreshGrid(); };
|
|
|
@@ -1462,7 +1469,8 @@ namespace comal.timesheets
|
|
|
//});
|
|
|
//Navigation.PushAsync(host);
|
|
|
});
|
|
|
- toolEntries.Add(Deliveries);
|
|
|
+ if (PRSSecurity.CanView<Delivery>())
|
|
|
+ toolEntries.Add(Deliveries);
|
|
|
|
|
|
//Digital Forms
|
|
|
ToolEntry Forms = new ToolEntry
|
|
|
@@ -1470,13 +1478,13 @@ namespace comal.timesheets
|
|
|
Text = "Forms",
|
|
|
Image = "forms"
|
|
|
};
|
|
|
- Forms.IsVisible = PRSSecurity.CanView<DigitalForm>();
|
|
|
Forms.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var qaFormPicker = new DigitalFormsPicker();
|
|
|
Navigation.PushAsync(qaFormPicker);
|
|
|
});
|
|
|
- toolEntries.Add(Forms);
|
|
|
+ if (PRSSecurity.CanView<DigitalForm>())
|
|
|
+ toolEntries.Add(Forms);
|
|
|
|
|
|
//Equipment
|
|
|
ToolEntry Equipment = new ToolEntry
|
|
|
@@ -1484,7 +1492,6 @@ namespace comal.timesheets
|
|
|
Text = "Equipment",
|
|
|
Image = "digger"
|
|
|
};
|
|
|
- Equipment.IsVisible = PRSSecurity.CanView<Equipment>();
|
|
|
Equipment.OnTapped += (async (object sender, EventArgs e) =>
|
|
|
{
|
|
|
using (await MaterialDialog.Instance.LoadingDialogAsync(message: "Loading"))
|
|
|
@@ -1493,7 +1500,8 @@ namespace comal.timesheets
|
|
|
Navigation.PushAsync(equipment);
|
|
|
}
|
|
|
});
|
|
|
- toolEntries.Add(Equipment);
|
|
|
+ if (PRSSecurity.CanView<Equipment>())
|
|
|
+ toolEntries.Add(Equipment);
|
|
|
|
|
|
//InOut
|
|
|
ToolEntry InOut = new ToolEntry
|
|
|
@@ -1501,13 +1509,13 @@ namespace comal.timesheets
|
|
|
Text = "In/Out",
|
|
|
Image = "inout"
|
|
|
};
|
|
|
- InOut.IsVisible = PRSSecurity.IsAllowed<CanViewInOutBoard>();
|
|
|
InOut.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var staff_form = new StaffStatusPage();
|
|
|
Navigation.PushAsync(staff_form);
|
|
|
});
|
|
|
- toolEntries.Add(InOut);
|
|
|
+ if (PRSSecurity.IsAllowed<CanViewInOutBoard>())
|
|
|
+ toolEntries.Add(InOut);
|
|
|
|
|
|
//Manufacturing
|
|
|
ToolEntry Manufacturing = new ToolEntry
|
|
|
@@ -1519,13 +1527,13 @@ namespace comal.timesheets
|
|
|
{
|
|
|
Manufacturing.Image = "Image";
|
|
|
}
|
|
|
- Manufacturing.IsVisible = PRSSecurity.IsAllowed<CanViewManufacturingOnMobile>();
|
|
|
Manufacturing.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
ManufacturingScreen manufacturingScreen = new ManufacturingScreen();
|
|
|
Navigation.PushAsync(manufacturingScreen);
|
|
|
});
|
|
|
- toolEntries.Add(Manufacturing);
|
|
|
+ if (PRSSecurity.IsAllowed<CanViewManufacturingOnMobile>())
|
|
|
+ toolEntries.Add(Manufacturing);
|
|
|
|
|
|
//My HR
|
|
|
ToolEntry MyHR = new ToolEntry
|
|
|
@@ -1564,14 +1572,14 @@ namespace comal.timesheets
|
|
|
Text = "Products",
|
|
|
Image = "products"
|
|
|
};
|
|
|
- Products.IsVisible = PRSSecurity.CanView(typeof(Product));
|
|
|
Products.OnTapped += (object sender, EventArgs e) =>
|
|
|
{
|
|
|
var page = new DataGridHost(new ProductsGrid());
|
|
|
|
|
|
Navigation.PushAsync(page);
|
|
|
};
|
|
|
- toolEntries.Add(Products);
|
|
|
+ if (PRSSecurity.CanView(typeof(Product)))
|
|
|
+ toolEntries.Add(Products);
|
|
|
|
|
|
//Purchase Orders
|
|
|
ToolEntry PurchaseOrders = new ToolEntry()
|
|
|
@@ -1579,13 +1587,13 @@ namespace comal.timesheets
|
|
|
Text = "Purchase Orders",
|
|
|
Image = "shoppingcart"
|
|
|
};
|
|
|
- PurchaseOrders.IsVisible = PRSSecurity.CanView<PurchaseOrder>();
|
|
|
PurchaseOrders.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
PurchaseOrderModule page = new PurchaseOrderModule();
|
|
|
Navigation.PushAsync(page);
|
|
|
});
|
|
|
- toolEntries.Add(PurchaseOrders);
|
|
|
+ if (PRSSecurity.CanView<PurchaseOrder>())
|
|
|
+ toolEntries.Add(PurchaseOrders);
|
|
|
|
|
|
//Scanner
|
|
|
ToolEntry Scanner = new ToolEntry
|
|
|
@@ -1619,13 +1627,13 @@ namespace comal.timesheets
|
|
|
Text = "Store Requis",
|
|
|
Image = "storerequis"
|
|
|
};
|
|
|
- StoreRequis.IsVisible = PRSSecurity.CanView<Requisition>();
|
|
|
StoreRequis.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var storeRequisList = new StoreRequiList();
|
|
|
Navigation.PushAsync(storeRequisList);
|
|
|
});
|
|
|
- toolEntries.Add(StoreRequis);
|
|
|
+ if (PRSSecurity.CanView<Requisition>())
|
|
|
+ toolEntries.Add(StoreRequis);
|
|
|
|
|
|
//Tasks
|
|
|
ToolEntry Tasks = new ToolEntry
|
|
|
@@ -1633,13 +1641,13 @@ namespace comal.timesheets
|
|
|
Text = "My Tasks",
|
|
|
Image = "tasks"
|
|
|
};
|
|
|
- Tasks.IsVisible = PRSSecurity.IsAllowed<CanViewTasks>();
|
|
|
Tasks.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
var tasksForm = new TasksList();
|
|
|
Navigation.PushAsync(tasksForm);
|
|
|
});
|
|
|
- toolEntries.Add(Tasks);
|
|
|
+ if (PRSSecurity.IsAllowed<CanViewTasks>())
|
|
|
+ toolEntries.Add(Tasks);
|
|
|
|
|
|
//Warehousing
|
|
|
ToolEntry Warehousing = new ToolEntry
|
|
|
@@ -1647,13 +1655,13 @@ namespace comal.timesheets
|
|
|
Text = "Warehousing",
|
|
|
Image = "newwarehousing"
|
|
|
};
|
|
|
- Warehousing.IsVisible = PRSSecurity.CanView<StockWarehouse>();
|
|
|
Warehousing.OnTapped += ((object sender, EventArgs e) =>
|
|
|
{
|
|
|
Warehousing2 locations = new Warehousing2();
|
|
|
Navigation.PushAsync(locations);
|
|
|
});
|
|
|
- toolEntries.Add(Warehousing);
|
|
|
+ if (PRSSecurity.CanView<StockWarehouse>())
|
|
|
+ toolEntries.Add(Warehousing);
|
|
|
|
|
|
AddChildren();
|
|
|
});
|