diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj index 71a0391..0bbc922 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj @@ -159,6 +159,7 @@ + @@ -709,6 +710,15 @@ AIADBEntity.tt + + AIADBEntity.tt + + + AIADBEntity.tt + + + AIADBEntity.tt + AIADBEntity.tt @@ -738,6 +748,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs new file mode 100644 index 0000000..15b5e2a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs @@ -0,0 +1,137 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("SubscriptionPrice")] + public class SubscriptionPriceController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("Api/GetSubscriptionPrices")] + [HttpGet] + public HttpResponseMessage GetSubscriptionPrices(int editionId, int duration) + { + List SubscriptionPriceList = new List(); + try + { + SubscriptionPriceList = SubscriptionPriceModel.GetSubscriptionPrices(dbContext, editionId, duration); + return Request.CreateResponse(HttpStatusCode.OK, SubscriptionPriceList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("Api/InsertSubscriptionPrice")] + [HttpPost] + public HttpResponseMessage InsertSubscriptionPrice(JObject jsonData) + { + bool Status = false; + SubscriptionPriceModel subscriptionPriceModel = new SubscriptionPriceModel(); + subscriptionPriceModel.Id = jsonData["id"].Value(); + subscriptionPriceModel.Title = jsonData["title"].Value(); + subscriptionPriceModel.Price = jsonData["price"].Value(); + subscriptionPriceModel.Duration = jsonData["duration"].Value(); + subscriptionPriceModel.EditionId = jsonData["editionId"].Value(); + subscriptionPriceModel.IsActive = jsonData["isActive"].Value(); + try + { + Status = SubscriptionPriceModel.InsertSubscriptionPrice(dbContext, subscriptionPriceModel); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("Api/UpdateSubscriptionPrice")] + [HttpPost] + public HttpResponseMessage UpdateSubscriptionPrice(JObject jsonData) + { + bool Status = false; + SubscriptionPriceModel subscriptionPriceModel = new SubscriptionPriceModel(); + subscriptionPriceModel.Id = jsonData["id"].Value(); + subscriptionPriceModel.Title = jsonData["title"].Value(); + subscriptionPriceModel.Price = jsonData["price"].Value(); + subscriptionPriceModel.Duration = jsonData["duration"].Value(); + subscriptionPriceModel.EditionId = jsonData["editionId"].Value(); + subscriptionPriceModel.IsActive = jsonData["isActive"].Value(); + try + { + Status = SubscriptionPriceModel.UpdateSubscriptionPrice(dbContext, subscriptionPriceModel); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("Api/DeleteSubscriptionPrice")] + [HttpPost] + public HttpResponseMessage DeleteSubscriptionPrice(int subscriptionPriceId) + { + bool Status = false; + try + { + Status = SubscriptionPriceModel.DeleteSubscriptionPrice(dbContext, subscriptionPriceId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + protected HttpResponseMessage ToJson(dynamic obj) + { + var response = Request.CreateResponse(HttpStatusCode.OK); + response.Content = new StringContent(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/jsonP"); + return response; + } + + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index 8edff85..12e4c09 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -2887,5 +2887,120 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDiscountCodes", sDiscountCodeParameter, sStartDateParameter, sEndDateParameter); } + + public virtual int Usp_DeleteSubscriptionPlan(Nullable id, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(byte)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("Usp_DeleteSubscriptionPlan", idParameter, status); + } + + public virtual ObjectResult Usp_GetSubscriptionPlans(Nullable iEditionId, Nullable iDuration) + { + var iEditionIdParameter = iEditionId.HasValue ? + new ObjectParameter("iEditionId", iEditionId) : + new ObjectParameter("iEditionId", typeof(byte)); + + var iDurationParameter = iDuration.HasValue ? + new ObjectParameter("iDuration", iDuration) : + new ObjectParameter("iDuration", typeof(byte)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("Usp_GetSubscriptionPlans", iEditionIdParameter, iDurationParameter); + } + + public virtual int Usp_InsertSubscriptionPlan(Nullable id, string title, Nullable price, Nullable duration, Nullable editionId, Nullable isActive, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(byte)); + + var titleParameter = title != null ? + new ObjectParameter("Title", title) : + new ObjectParameter("Title", typeof(string)); + + var priceParameter = price.HasValue ? + new ObjectParameter("Price", price) : + new ObjectParameter("Price", typeof(decimal)); + + var durationParameter = duration.HasValue ? + new ObjectParameter("Duration", duration) : + new ObjectParameter("Duration", typeof(byte)); + + var editionIdParameter = editionId.HasValue ? + new ObjectParameter("EditionId", editionId) : + new ObjectParameter("EditionId", typeof(byte)); + + var isActiveParameter = isActive.HasValue ? + new ObjectParameter("IsActive", isActive) : + new ObjectParameter("IsActive", typeof(bool)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("Usp_InsertSubscriptionPlan", idParameter, titleParameter, priceParameter, durationParameter, editionIdParameter, isActiveParameter, status); + } + + public virtual int Usp_UpdateSubscriptionPlan(Nullable id, string title, Nullable price, Nullable duration, Nullable editionId, Nullable isActive, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(byte)); + + var titleParameter = title != null ? + new ObjectParameter("Title", title) : + new ObjectParameter("Title", typeof(string)); + + var priceParameter = price.HasValue ? + new ObjectParameter("Price", price) : + new ObjectParameter("Price", typeof(decimal)); + + var durationParameter = duration.HasValue ? + new ObjectParameter("Duration", duration) : + new ObjectParameter("Duration", typeof(byte)); + + var editionIdParameter = editionId.HasValue ? + new ObjectParameter("EditionId", editionId) : + new ObjectParameter("EditionId", typeof(byte)); + + var isActiveParameter = isActive.HasValue ? + new ObjectParameter("IsActive", isActive) : + new ObjectParameter("IsActive", typeof(bool)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("Usp_UpdateSubscriptionPlan", idParameter, titleParameter, priceParameter, durationParameter, editionIdParameter, isActiveParameter, status); + } + + public virtual ObjectResult usp_GetAccountTypeList(Nullable id) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetAccountTypeList", idParameter); + } + + public virtual ObjectResult usp_GetUserType(Nullable id) + { + var idParameter = id.HasValue ? + new ObjectParameter("id", id) : + new ObjectParameter("id", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetUserType", idParameter); + } + + public virtual int usp_UpdateUserId(Nullable id, string userId, string olduserId, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(int)); + + var userIdParameter = userId != null ? + new ObjectParameter("UserId", userId) : + new ObjectParameter("UserId", typeof(string)); + + var olduserIdParameter = olduserId != null ? + new ObjectParameter("olduserId", olduserId) : + new ObjectParameter("olduserId", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserId", idParameter, userIdParameter, olduserIdParameter, status); + } } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index 5a4a63c..afbdef1 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -2615,6 +2615,44 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6039,6 +6077,44 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6838,6 +6914,20 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + @@ -9127,6 +9217,36 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/Usp_GetSubscriptionPlans_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/Usp_GetSubscriptionPlans_Result.cs new file mode 100644 index 0000000..297867b --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/Usp_GetSubscriptionPlans_Result.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class Usp_GetSubscriptionPlans_Result + { + public Nullable price { get; set; } + public string title { get; set; } + public short Id { get; set; } + public byte Duration { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetAccountTypeList_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetAccountTypeList_Result.cs new file mode 100644 index 0000000..221d04f --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetAccountTypeList_Result.cs @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class usp_GetAccountTypeList_Result + { + public byte Id { get; set; } + public string Title { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUserType_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUserType_Result.cs new file mode 100644 index 0000000..dec67be --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetUserType_Result.cs @@ -0,0 +1,19 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class usp_GetUserType_Result + { + public byte Id { get; set; } + public string Title { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs index b4ea476..e665c5b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/DiscountCodeModel.cs @@ -66,8 +66,8 @@ namespace AIAHTML5.ADMIN.API.Models { try { - var result = dbContext.UpdateDiscount(discountCodeModel.Id, discountCodeModel.Percentage, discountCodeModel.StartDate.ToString(), - discountCodeModel.EndDate.ToString(), (byte?)(discountCodeModel.IsActive == true ? 1 : 0), discountCodeModel.DiscountCode); + var result = dbContext.UpdateDiscount(discountCodeModel.Id, discountCodeModel.Percentage, discountCodeModel.StartDate.ToString("MM/dd/yyyy"), + discountCodeModel.EndDate.ToString("MM/dd/yyyy"), (byte?)(discountCodeModel.IsActive == true ? 1 : 0), discountCodeModel.DiscountCode); if (result.Count() > 0) { return true; diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs new file mode 100644 index 0000000..7f8fb0e --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs @@ -0,0 +1,109 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class SubscriptionPriceModel + { + public int Id { get; set; } + public string Title { get; set; } + public decimal Price { get; set; } + public int Duration { get; set; } + public int EditionId { get; set; } + public bool IsActive { get; set; } + + public static List GetSubscriptionPrices(AIADatabaseV5Entities dbContext, int editionId, int duration) + { + List SubscriptionPriceList = new List(); + SubscriptionPriceModel SubscriptionPriceObj = new SubscriptionPriceModel(); + try + { + var result = dbContext.Usp_GetSubscriptionPlans((byte?)editionId, (byte?)duration).ToList(); + if (result.Count > 0) + { + foreach (var item in result) + { + SubscriptionPriceObj = new SubscriptionPriceModel(); + SubscriptionPriceObj.Id = item.Id; + SubscriptionPriceObj.Title = item.title; + SubscriptionPriceObj.Price = item.price.Value; + SubscriptionPriceObj.Duration = item.Duration; + SubscriptionPriceObj.EditionId = item.Id; + SubscriptionPriceObj.IsActive = true ; + SubscriptionPriceList.Add(SubscriptionPriceObj); + } + } + } + catch (Exception ex) { } + return SubscriptionPriceList; + } + + public static bool InsertSubscriptionPrice(AIADatabaseV5Entities dbContext, SubscriptionPriceModel subscriptionPriceModel) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.Usp_InsertSubscriptionPlan((byte?)subscriptionPriceModel.Id, subscriptionPriceModel.Title, (decimal?)subscriptionPriceModel.Price, + (byte?)subscriptionPriceModel.Duration, (byte?)subscriptionPriceModel.EditionId, subscriptionPriceModel.IsActive, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateSubscriptionPrice(AIADatabaseV5Entities dbContext, SubscriptionPriceModel subscriptionPriceModel) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.Usp_UpdateSubscriptionPlan((byte?)subscriptionPriceModel.Id, subscriptionPriceModel.Title, subscriptionPriceModel.Price, + (byte?)subscriptionPriceModel.Duration, (byte?)subscriptionPriceModel.EditionId, subscriptionPriceModel.IsActive, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteSubscriptionPrice(AIADatabaseV5Entities dbContext, int subscriptionPriceId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.Usp_DeleteSubscriptionPlan((byte?)subscriptionPriceId, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + } +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts index 910bb23..e2b7c9b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts @@ -6,6 +6,8 @@ import { RouterModule, Routes } from '@angular/router'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { APP_BASE_HREF } from '@angular/common'; import { HttpModule } from '@angular/http'; +import { Pipe, PipeTransform } from '@angular/core'; +import { DatePipe } from '@angular/common'; //import { ModalModule } from 'ngx-bootstrap/modal'; import { UpdateUserProfile } from './components/UpdateProfile/updateuserprofile.component'; @@ -38,8 +40,8 @@ import { GlobalService } from './Shared/global'; // useClass: MyInterceptor, // multi: true //} - { provide: APP_BASE_HREF, useValue: '/' } - , GlobalService + { provide: APP_BASE_HREF, useValue: '/' }, DatePipe, + GlobalService ], bootstrap: [AppComponent] }) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode.zip b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode.zip deleted file mode 100644 index 7c89400..0000000 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode.zip +++ /dev/null diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.html index 4b5c9ce..e418f3f 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.html +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.html @@ -7,15 +7,9 @@ - - - - - - + - @@ -40,8 +34,8 @@ - - + + @@ -80,7 +74,7 @@ - + Discount Code @@ -91,7 +85,7 @@ - + {{item.DiscountCode}} {{item.Percentage | number : '1.2'}} {{item.StartDate | date: 'MM/dd/yyyy'}} @@ -122,32 +116,43 @@ + + + + + + + Discount Code : - + + Discount Start Date * : - - + + + Discount start date is required - - + + + Discount End Date * : - - + + + Discount end date is required - - + + @@ -155,16 +160,33 @@ Percentage * : - + + Discount percentage is required + Discount percentage must be numeric + + + Status : + + + + Active + + + + Inactive + + + - Save + Save Cancel + @@ -181,7 +203,6 @@ Ok - @@ -189,6 +210,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts index 20dbc98..f7ab640 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts @@ -5,6 +5,8 @@ import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms' import { DiscountCode } from '../UpdateProfile/datamodel'; import { BsDatepickerModule } from 'ngx-bootstrap'; import { Http, Response } from '@angular/http'; +import { Pipe, PipeTransform } from '@angular/core'; +import { DatePipe } from '@angular/common'; //import { Global } from '../../Shared/global'; //import { DBOperation } from 'S'; @@ -25,7 +27,11 @@ error: any; alerts: string; divClass: string = ''; topPos: string = '2000px'; -bsValue: Date = new Date(); +selectedRow: number = 0; +datePipe: DatePipe = new DatePipe('en-US'); +bsValue3: Date = new Date(); +bsValue4: Date = new Date(); +selectedId: number = 0; constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router, private fb: FormBuilder) { } @@ -41,19 +47,23 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat }); this.insertUpdateDiscountCodeFrm = this.fb.group({ discountId: [''], - discountCode: ['', Validators.required], + discountCode: [''], startDate: ['', Validators.required], endDate: ['', Validators.required], - percentage: ['', Validators.required], - isActive: [''] + percentage: ['', [Validators.required, Validators.pattern('[0-9.]*')]], + isActive: [true] }); this.SearchDiscountCodes(); } - SearchDiscountCodes() { - console.log(this.manageDiscountCodeFrm.controls['searchDiscountCode'].value + ', ' + - this.manageDiscountCodeFrm.controls['searchStartDate'].value + ', ' + - this.manageDiscountCodeFrm.controls['searchEndDate'].value); + public SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.discountCode = item; + } + + public SearchDiscountCodes() { + this.selectedRow = -1; this.manageDiscountCodeService.GetDiscountCodes( { discountCode: this.manageDiscountCodeFrm.controls['searchDiscountCode'].value, @@ -66,21 +76,39 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat public InsertUpdateDiscountCode() { console.log('InsertUpdateDiscountCode'); this.alerts = ''; - + if(parseInt(this.insertUpdateDiscountCodeFrm.value.percentage) > 100){ + this.alerts = 'Percentage must be between 0 to 100'; + } if(this.alerts == ''){ var obj = this.insertUpdateDiscountCodeFrm.value; - return this.manageDiscountCodeService.InsertDiscountCode(obj) - .subscribe( - n => (this.AfterInsertData(n)), - error => this.error = error); + if(obj.discountId == 0){ + return this.manageDiscountCodeService.InsertDiscountCode(obj) + .subscribe( + n => (this.AfterInsertData(n)), + error => this.error = error); + } + else{ + return this.manageDiscountCodeService.UpdateDiscountCode(obj) + .subscribe( + n => (this.AfterUpdateData(n)), + error => this.error = error); + } } } AfterInsertData(data) { if (data.Status == "false") { - this.alerts = "Password change unsuccessfully"; + this.alerts = "Discount code save unsuccessfull"; + } else { + this.alerts = "Discount code saved successfully"; + } + } + + AfterUpdateData(data) { + if (data.Status == "false") { + this.alerts = "Discount code update unsuccessfull"; } else { - this.alerts = "Password changed successfully"; + this.alerts = "Discount code updated successfully"; } } @@ -89,30 +117,39 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat this.manageDiscountCodeFrm.setControl('discountCodes', this.fb.array(this.discountCodes)); } - ResetFormFields(){ - this.manageDiscountCodeFrm.reset() - //this.manageDiscountCodeFrm.controls['loginId'].setValue(this.user.LoginId); - //this.manageDiscountCodeFrm.controls['oldPassword'].setValue(''); - //this.manageDiscountCodeFrm.controls['newPassword'].setValue(''); - //this.manageDiscountCodeFrm.controls['confirmPassword'].setValue(''); - this.alerts = ''; - } - AddDiscountCode(){ this.Mode = 'Add'; this.topPos = '100px'; this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.insertUpdateDiscountCodeFrm.reset(); + this.alerts = ''; + this.insertUpdateDiscountCodeFrm.controls['discountId'].setValue(0); + this.insertUpdateDiscountCodeFrm.controls['discountCode'].setValue(''); + this.insertUpdateDiscountCodeFrm.controls['startDate'].setValue(''); + this.insertUpdateDiscountCodeFrm.controls['endDate'].setValue(''); + this.insertUpdateDiscountCodeFrm.controls['percentage'].setValue(''); + this.insertUpdateDiscountCodeFrm.controls['isActive'].setValue(true); } EditDiscountCode(){ this.Mode = 'Edit'; this.topPos = '100px'; this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.insertUpdateDiscountCodeFrm.controls['discountId'].setValue(this.discountCode.Id); + this.insertUpdateDiscountCodeFrm.controls['discountCode'].setValue(this.discountCode.DiscountCode); + this.insertUpdateDiscountCodeFrm.controls['startDate'].setValue(this.datePipe.transform(this.discountCode.StartDate, 'MM/dd/yyyy')); + this.insertUpdateDiscountCodeFrm.controls['endDate'].setValue(this.datePipe.transform(this.discountCode.EndDate, 'MM/dd/yyyy')); + this.insertUpdateDiscountCodeFrm.controls['percentage'].setValue(this.discountCode.Percentage); + this.insertUpdateDiscountCodeFrm.controls['isActive'].setValue(this.discountCode.IsActive); } CancelAddEdit(){ this.Mode = 'Manage'; this.topPos = '2000px'; this.divClass = 'col-sm-12'; + this.SearchDiscountCodes(); + this.selectedRow = this.discountCodes.findIndex(C => C.Id == this.selectedId); + this.SetClickedRow(this.selectedRow, this.manageDiscountCodeFrm.controls['discountCodes'].value.find(C => C.Id == this.selectedId)); } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.service.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.service.ts index 17c66f3..e691fda 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.service.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.service.ts @@ -49,12 +49,12 @@ export class ManageDiscountCodeService { InsertDiscountCode(obj: any) { //let options = new RequestOptions({ headers: this.headers }); - var jsonData = {'id': obj.userId, 'newPassword': obj.newPassword }; + var jsonData = {'id': obj.discountId, 'discountCode': obj.discountCode, 'startDate': obj.startDate, 'endDate': obj.endDate, 'percentage': obj.percentage, 'isActive': obj.isActive }; console.log(obj); var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/api/ChangeUserPassword", + return this.http.post(this.commonService.resourceBaseUrl + "/api/InsertDiscountCode", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); @@ -62,12 +62,12 @@ export class ManageDiscountCodeService { UpdateDiscountCode(obj: any) { //let options = new RequestOptions({ headers: this.headers }); - var jsonData = {'id': obj.userId, 'newPassword': obj.newPassword }; + var jsonData = {'id': obj.discountId, 'discountCode': obj.discountCode, 'startDate': obj.startDate, 'endDate': obj.endDate, 'percentage': obj.percentage, 'isActive': obj.isActive }; console.log(obj); var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/api/ChangeUserPassword", + return this.http.post(this.commonService.resourceBaseUrl + "/api/UpdateDiscountCode", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html new file mode 100644 index 0000000..b0c4a16 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html @@ -0,0 +1,624 @@ + + + + Subscription Price + + + + + + + + + + + + + Higher Education Instructor + Higher School Instructor + Higher Education Student + Higher School Student + Public Library + Academic Library + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + + + + + Select + Subscription Type + Duration(in Month) + Price + Active + + + + A + 11 + 349.95 + + + + + B + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 11 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + 1 year Single User Online Access + 1 + 349.95 + + + + + 1 year Single User Online Access + 23 + 200 + + + + + + + + + + + Add + Delete + + + + + + × + Alert + + + Please select subscription to delete. + + + + + + + + + + + Apply + + + + + + × + Alert + + + Subscription type is required. + + + + + + + + + + + Cancel + + + + + + + + + + + + + \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts new file mode 100644 index 0000000..2c97265 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts @@ -0,0 +1,151 @@ +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter } from '@angular/core'; +import { SubscriptionPriceService } from './subscriptionprice.service'; +import { Router } from '@angular/router'; +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { SubscriptionPriceModel } from '../UpdateProfile/datamodel'; +import { BsDatepickerModule } from 'ngx-bootstrap'; +import { Http, Response } from '@angular/http'; +import { Pipe, PipeTransform } from '@angular/core'; +import { DatePipe } from '@angular/common'; + +//import { Global } from '../../Shared/global'; +//import { DBOperation } from 'S'; +//import { Observable } from 'rxjs/Observable'; + +@Component({ + templateUrl: './subscriptionprice.component.html' +}) + +export class SubscriptionPrice implements OnInit { + +Mode: string = 'Manage'; +subscriptionPrice: SubscriptionPriceModel; +subscriptionPrices: Array; +subscriptionPriceFrm: FormGroup; +insertUpdateSubscriptionPriceFrm: FormGroup; +error: any; +alerts: string; +divClass: string = ''; +topPos: string = '2000px'; +selectedRow: number = 0; +datePipe: DatePipe = new DatePipe('en-US'); +bsValue3: Date = new Date(); +bsValue4: Date = new Date(); +selectedId: number = 0; + +constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private fb: FormBuilder) { } + + ngOnInit(): void { + this.divClass = 'col-sm-12'; + this.subscriptionPrice = new SubscriptionPriceModel(); + this.alerts = ''; + this.subscriptionPriceFrm = this.fb.group({ + searchSubscriptionPriceType: [''], + subscriptionPrices: this.fb.array([]) + }); + this.insertUpdateSubscriptionPriceFrm = this.fb.group({ + discountId: [''], + discountCode: [''], + startDate: ['', Validators.required], + endDate: ['', Validators.required], + percentage: ['', [Validators.required, Validators.pattern('[0-9.]*')]], + isActive: [true] + }); + this.SearchSubscriptionPrices(); + } + + public SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.subscriptionPrice = item; + } + + public SearchSubscriptionPrices() { + this.selectedRow = -1; + this.subscriptionPriceService.GetSubscriptionPrices( + { + subscriptionPriceType: this.subscriptionPriceFrm.controls['searchSubscriptionPriceType'].value, + }) + .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + } + + public InsertUpdateSubscriptionPrice() { + console.log('InsertUpdateSubscriptionPrice'); + this.alerts = ''; + if(parseInt(this.insertUpdateSubscriptionPriceFrm.value.percentage) > 100){ + this.alerts = 'Percentage must be between 0 to 100'; + } + if(this.alerts == ''){ + var obj = this.insertUpdateSubscriptionPriceFrm.value; + if(obj.discountId == 0){ + return this.subscriptionPriceService.InsertDiscountCode(obj) + .subscribe( + n => (this.AfterInsertData(n)), + error => this.error = error); + } + else{ + return this.subscriptionPriceService.UpdateDiscountCode(obj) + .subscribe( + n => (this.AfterUpdateData(n)), + error => this.error = error); + } + } + } + + AfterInsertData(data) { + if (data.Status == "false") { + this.alerts = "Subscription price save unsuccessfull"; + } else { + this.alerts = "Subscription price saved successfully"; + } + } + + AfterUpdateData(data) { + if (data.Status == "false") { + this.alerts = "Subscription price update unsuccessfull"; + } else { + this.alerts = "Subscription price updated successfully"; + } + } + + BindFormFields(data){ + this.subscriptionPrices = data; + this.subscriptionPriceFrm.setControl('subscriptionPrices', this.fb.array(this.subscriptionPrices)); + } + + AddDiscountCode(){ + this.Mode = 'Add'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.insertUpdateSubscriptionPriceFrm.reset(); + this.alerts = ''; + this.insertUpdateSubscriptionPriceFrm.controls['discountId'].setValue(0); + this.insertUpdateSubscriptionPriceFrm.controls['discountCode'].setValue(''); + this.insertUpdateSubscriptionPriceFrm.controls['startDate'].setValue(''); + this.insertUpdateSubscriptionPriceFrm.controls['endDate'].setValue(''); + this.insertUpdateSubscriptionPriceFrm.controls['percentage'].setValue(''); + this.insertUpdateSubscriptionPriceFrm.controls['isActive'].setValue(true); + } + + EditDiscountCode(){ + this.Mode = 'Edit'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.insertUpdateSubscriptionPriceFrm.controls['discountId'].setValue(this.subscriptionPrice.Id); + this.insertUpdateSubscriptionPriceFrm.controls['discountCode'].setValue(this.subscriptionPrice.DiscountCode); + this.insertUpdateSubscriptionPriceFrm.controls['startDate'].setValue(this.datePipe.transform(this.subscriptionPrice.StartDate, 'MM/dd/yyyy')); + this.insertUpdateSubscriptionPriceFrm.controls['endDate'].setValue(this.datePipe.transform(this.subscriptionPrice.EndDate, 'MM/dd/yyyy')); + this.insertUpdateSubscriptionPriceFrm.controls['percentage'].setValue(this.subscriptionPrice.Percentage); + this.insertUpdateSubscriptionPriceFrm.controls['isActive'].setValue(this.subscriptionPrice.IsActive); + } + + CancelAddEdit(){ + this.Mode = 'Manage'; + this.topPos = '2000px'; + this.divClass = 'col-sm-12'; + this.SearchSubscriptionPrices(); + this.selectedRow = this.subscriptionPrices.findIndex(C => C.Id == this.selectedId); + this.SetClickedRow(this.selectedRow, this.subscriptionPriceFrm.controls['subscriptionPrices'].value.find(C => C.Id == this.selectedId)); + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.service.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.service.ts new file mode 100644 index 0000000..3c1b9d6 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.service.ts @@ -0,0 +1,97 @@ +import { Injectable, Inject } from '@angular/core'; +//import { HttpClient, HttpParams, HttpRequest} from "@angular/common/http"; +import { Http, Response, Headers, RequestOptions, HttpModule } from '@angular/http'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/catch'; +import 'rxjs/add/observable/throw'; +import 'rxjs/add/operator/do'; +import { Observable } from 'rxjs/Observable'; +import { GlobalService } from '../../Shared/global'; + +@Injectable() +export class SubscriptionPriceService { + + constructor(private http: Http, private commonService: GlobalService ) { } + + //public GetUserById(Id: any): Observable { + // return this.http.request( + // 'GET', + // 'http://192.168.86.13:92/API/Api/Users/' + Id); + //} + + //GetUserByLoginIdPassword(LoginId: string, Password: string): Observable { + // return this.http.request( + // 'GET', + // 'http://192.168.86.13:92/API/Api/Users/{LoginId=' + LoginId + '&Password=' + Password + '}'); + //} + + //UpdateProfile(UserObj: User): Observable { + // return this.http.request( + // 'POST', + // 'http://192.168.86.13:92/API/Api/Users/UpdateProfile', + // { + // body: UserObj + // }); + //} + + GetSubscriptionPrices(obj: any) { + return this.http.get(this.commonService.resourceBaseUrl + "/api/GetSubscriptionPrices?editionId=" + + obj.editionId + "&duration=" + obj.duration) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + InsertSubscriptionPrice(obj: any) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'id': obj.discountId, 'discountCode': obj.discountCode, 'startDate': obj.startDate, 'endDate': obj.endDate, 'percentage': obj.percentage, 'isActive': obj.isActive }; + console.log(obj); + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "/api/InsertSubscriptionPrice", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + UpdateSubscriptionPrice(obj: any) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'id': obj.discountId, 'discountCode': obj.discountCode, 'startDate': obj.startDate, 'endDate': obj.endDate, 'percentage': obj.percentage, 'isActive': obj.isActive }; + console.log(obj); + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "/api/UpdateSubscriptionPrice", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + extractData(res: Response) { + //debugger; + let body = res.json(); + return body; + } + + handleError(error: any) { + // In a real world app, we might use a remote logging infrastructure + // We'd also dig deeper into the error to get a better message + let errMsg = (error.message) ? error.message : + error.status ? `${error.status} - ${error.statusText}` : 'Server error'; + console.error(errMsg); // log to console instead + return Observable.throw(errMsg); + } + + ////public GetUserById(url: string): Observable { + + //// return this._http.get(url) + //// .map((response: Response) => response.json()) + //// .do(data => console.log("All: " + JSON.stringify(data))) + //// .catch(this.handleError); + ////} + //// private handleError(error: Response) { + //// console.error(error); + //// return Observable.throw(error.json().error || 'Server error'); + //// } + +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/UpdateProfile/datamodel.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/UpdateProfile/datamodel.ts index f0518f4..ad7922c 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/UpdateProfile/datamodel.ts +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/UpdateProfile/datamodel.ts @@ -25,6 +25,15 @@ export class DiscountCode { IsActive: boolean; } +export class SubscriptionPriceModel { + Id: number; + Title: string; + Price: DoubleRange; + Duration: number; + EditionId: number; + IsActive: boolean; +} + //export class User { // userId: number; // firstName: string; diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js deleted file mode 100644 index 421ac4c..0000000 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js +++ /dev/null @@ -1,9 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var DBOperation; -(function (DBOperation) { - DBOperation[DBOperation["create"] = 1] = "create"; - DBOperation[DBOperation["update"] = 2] = "update"; - DBOperation[DBOperation["delete"] = 3] = "delete"; -})(DBOperation = exports.DBOperation || (exports.DBOperation = {})); -//# sourceMappingURL=enum.js.map \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js.map b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js.map deleted file mode 100644 index ffae1a4..0000000 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/enum.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"enum.js","sourceRoot":"","sources":["enum.ts"],"names":[],"mappings":";;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,iDAAU,CAAA;IACV,iDAAU,CAAA;IACV,iDAAS,CAAA;AACb,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js deleted file mode 100644 index 43560cd..0000000 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -var Global = (function () { - function Global() { - } - return Global; -}()); -Global.BASE_USER_ENDPOINT = 'api/userapi/'; -exports.Global = Global; -//# sourceMappingURL=global.js.map \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js.map b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js.map deleted file mode 100644 index 01f2dc2..0000000 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/shared/global.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"global.js","sourceRoot":"","sources":["global.ts"],"names":[],"mappings":";;AAAA;IAAA;IAEA,CAAC;IAAD,aAAC;AAAD,CAAC,AAFD;AACkB,yBAAkB,GAAG,cAAc,CAAC;AADzC,wBAAM"} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/assets/styles/admin-custom.css b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/assets/styles/admin-custom.css index df3f9bf..bafe982 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/assets/styles/admin-custom.css +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/assets/styles/admin-custom.css @@ -147,4 +147,14 @@ } .table-fixed thead { width: calc( 100% - 0em ) -} \ No newline at end of file +} + +.table>tbody>tr.active>td { + background: #000; + color: #FDFBFB; + } + + .table>tbody>tr.inactive>td { + background: #FDFBFB; + color: #000; + } \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/index.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/index.html index d2bb2ef..e5daf32 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/index.html +++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/index.html @@ -12,6 +12,7 @@ + @@ -32,16 +33,27 @@