Compare commits

...

57 Commits

Author SHA1 Message Date
Amir Hossein Khademi 9a4ac43e2a change activity service 2024-08-14 15:15:44 +03:30
Amir Hossein Khademi cba03cc53b chore(ChangeServicesToCommand) , fix(FixControllerMethodsName) 2024-08-11 20:25:18 +03:30
Amir Hossein Khademi 39f6320063 refactor files 2024-08-11 19:20:09 +03:30
Amir Hossein Khademi 1f99790b97 fix( SetNotifyCommand ) 2024-08-09 21:42:04 +03:30
Amir Hossein Khademi bca1447ad4 fix(GetShiftPlanSortByShift) 2024-08-09 20:03:12 +03:30
Amir Hossein Khademi 5328e74f79 Complete Notification Phase 2024-07-31 10:18:38 +03:30
Amir Hossein Khademi a8f6fe66b3 feat(GetTasks Count And ShiftId)
- Add count and shift id in get tasks
2024-07-25 19:02:27 +03:30
Amir Hossein Khademi 81762ecb64 fix bugs , push befor start fixing 2024-07-25 18:42:18 +03:30
Amir Hossein Khademi 1fbf37dd82 change(Activities) , feat(NotifyCommands) 2024-07-08 17:45:17 +03:30
Amir Hossein Khademi e918e8d3f7 fix(Change Entities NameSpace ) 2024-07-06 21:20:10 +03:30
Amir Hossein Khademi 637070557b chore ( Update Dependencies ) 2024-07-06 20:51:44 +03:30
Amir Hossein Khademi 3034cb6d65 commit codes befor new features and bugs 2024-06-30 22:29:57 +03:30
Amir Hossein Khademi 97cb9ae82b feat(AddPositionPermission) , feat(CheckPermissionEndpoint) , refactor(PositionLDto)
- Add position permission entitiy
- Add permission to create and update position CQRS
- Add check position permission endpoint in AuthController
- Add permission in PositionLDto
- Ready for test new feature
2024-06-02 11:26:18 +03:30
Amir Hossein Khademi bb6cba1ed9 feat(Notfication),feat(NotificationCQRS).feat(NotificationController)
- Add notification marten entity
- Add notification service by CQRS and mediatR
- Add notification controller
2024-05-29 19:17:41 +03:30
Amir Hossein Khademi 8bb2713069 feat(MartenDB) , feat(Brew) , feat(BrewService)
-Add MartentDB and MartenEntity
-Add MartenRepository
-Add BaseBrew entity and CoffeBrew
-Add BrewService for manage brews entity
2024-05-28 18:50:02 +03:30
Amir Hossein Khademi 91a73cbcef RELEASE VER 1.0.0.1 , complete version 1 , add scalarUi 2024-05-27 00:35:53 +03:30
Amir Hossein Khademi ab343077bd add vesrion 0.7.12.12 , feat add shiftplanid to activites , fix issues 2024-05-20 22:51:01 +03:30
Amir Hossein Khademi 1cac63112e feat : add 0.6.10.11 , add shift plan date filter , fix reporting 2024-05-06 14:08:15 +03:30
Amir Hossein Khademi 60366045bf fix getting actevities issue , feat version 0.5.9.10 2024-04-25 16:56:15 +03:30
Amir Hossein Khademi 5b67533eee feat : add version 0.5.8.9 , edit roles and permissions , fix issues 2024-04-25 02:33:17 +03:30
Amir Hossein Khademi 34e9e73d3c fix report auth issu , feat version 0.4.8.8 2024-03-14 11:09:31 +03:30
Amir Hossein Khademi 7b70ff62c8 add version 0.4.7.7 2024-03-06 23:22:53 +03:30
Amir Hossein Khademi cce4acaa00 add version 0.4.6.6 2024-02-27 14:20:41 +03:30
Amir Hossein Khademi d72bf848b5 feat : add phase A permissions to controller 2024-02-25 00:02:59 +03:30
Amir Hossein Khademi a6ebce4b8f feat : version 0.3.6.5
add new filter for shiftplan
2024-02-21 20:36:55 +03:30
Amir Hossein Khademi 70f83b627b feat : add report controller , change models
add task and shiftplan report handlers , chnage shfitplan and taskshift dtos
2024-02-21 02:07:41 +03:30
Amir Hossein Khademi 5ab4c601fb remove junk files 2024-01-01 17:28:03 +03:30
Amir Hossein Khademi 9b00b0f45b remove junk files 2024-01-01 17:27:17 +03:30
Amir Hossein Khademi 845cde295e remove junk files 2024-01-01 16:52:47 +03:30
Amir Hossein Khademi 648d4b009d add version 0.2.5.1 2023-12-28 11:50:31 +03:30
Amir Hossein Khademi f9536548f6 add version 0.2.4.2
fix create and get activities and tasks
2023-12-16 14:07:33 +03:30
Amir Hossein Khademi b0f6d6543c add version 0.2.3.2
fix create activity on shift plan
2023-12-13 18:19:41 +03:30
Amir Hossein Khademi e067a5fe73 add version 0.2.3.1
fix cores error in authorize , fix update shift plan and activity errors
2023-12-13 12:05:04 +03:30
Amir Hossein Khademi 48523274e2 add version 0.2.1.0
complete activity and shifting
2023-12-12 14:54:19 +03:30
Amir Hossein Khademi 504744da7d feat : shift plan , activites
add complete shift plan , add complete actevities
2023-12-11 14:32:29 +03:30
Amir Hossein Khademi 7fd9ce03ca feat , fix : activity part
fix done and undone activity methods , feat page controller
2023-12-09 09:54:34 +03:30
Amir Hossein Khademi 101728aad4 add .net 8 to docker file 2023-12-07 21:57:05 +03:30
Amir Hossein Khademi b4c58d9bc1 add version 0.1.4.0 2023-12-07 21:47:04 +03:30
Amir Hossein Khademi 080088528e update .net to .net 8 2023-11-29 13:02:59 +03:30
Amir Hossein Khademi e494f16542 complete creata activities 2023-11-26 16:56:38 +03:30
Amir Hossein Khademi 8a32e23e03 add version 0.1.3.3
complete create activity after shiftplan ( ready for test ) , add roles and permission in get profile user
2023-11-23 15:42:59 +03:30
Amir Hossein Khademi 79ab136ac3 add version 0.1.3.2 2023-11-20 18:30:01 +03:30
Amir Hossein Khademi 81cb0e8df3 add version 0.1.3.1 2023-11-19 22:06:49 +03:30
Amir Hossein Khademi 56ee887fab add version 0.1.2.0
complete change db for position and section , complete createing task
2023-11-18 22:23:23 +03:30
Amir Hossein Khademi ab133ed004 complete version 0.1.1.0 2023-11-14 16:21:49 +03:30
Amir Hossein Khademi 574e3eae62 feat : edit infra 2023-11-13 14:42:49 +03:30
Amir Hossein Khademi 9092109cd2 complete shifting and add version 0.1.0.3 2023-11-05 18:00:05 +03:30
Amir Hossein Khademi f36d10f8fe add version 0.1.0.2 2023-10-26 01:24:39 +03:30
Amir Hossein Khademi 4a775c9373 complete login response and user services 2023-10-26 01:24:04 +03:30
Amir Hossein Khademi 80d4467c24 add version 0.1.0.1 2023-10-24 16:59:17 +03:30
Amir Hossein Khademi 28092b0d6b complete role and user actions 2023-10-24 15:36:09 +03:30
Amir Hossein Khademi 40b9b42fbd edit porduction 2023-10-19 19:46:35 +03:30
Amir Hossein Khademi 972b04d934 edit appSettings 2023-10-19 19:46:16 +03:30
Amir Hossein Khademi bc1c935bbe edit appsettings 2023-10-19 19:10:29 +03:30
Amir Hossein Khademi 3cd1255279 edit appsetting production 2023-10-19 18:35:30 +03:30
Amir Hossein Khademi 21aa44ba1a edit projects name to brizco 2023-10-19 11:59:07 +03:30
Amir Hossein Khademi ebeb39254f edit dockerFile 2023-10-19 11:47:58 +03:30
470 changed files with 30008 additions and 102376 deletions

View File

@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"mapster.tool": {
"version": "8.3.0",
"version": "8.4.0",
"commands": [
"dotnet-mapster"
]

View File

@ -1 +1 @@
0.1.0.0
1.4.12.9

View File

@ -1,54 +0,0 @@
using Brizco.Core.EntityServices;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Brizco.Api.Controllers;
public class UserController : ICarterModule
{
public UserController()
{
}
public virtual void AddRoutes(IEndpointRouteBuilder app)
{
var group = app.NewVersionedApi("User")
.MapGroup($"api/user")
.RequireAuthorization(builder => builder.AddAuthenticationSchemes("Bearer").RequireAuthenticatedUser());
group.MapGet("", GetAllAsync)
.WithDisplayName("GetAllUser")
.HasApiVersion(1.0);
group.MapGet("{id}", GetAsync)
.WithDisplayName("GetOneUser")
.HasApiVersion(1.0);
group.MapPost("", Post)
.HasApiVersion(1.0);
group.MapPut("", Put)
.HasApiVersion(1.0);
group.MapDelete("", Delete)
.HasApiVersion(1.0);
}
// GET:Get All Entity
public async Task<IResult> GetAllAsync([FromQuery]int page, IUserService userService, CancellationToken cancellationToken)
=> TypedResults.Ok(await userService.GetUsersAsync(page,cancellationToken));
// GET:Get An Entity By Id
public async Task<IResult> GetAsync(Guid id, IUserService userService, CancellationToken cancellationToken)
=> TypedResults.Ok(await userService.GetUserAsync(id));
// POST:Create Entity
public async Task<IResult> Post([FromBody] UserActionRequestDto request, IUserService userService, CancellationToken cancellationToken)
=> TypedResults.Ok(await userService.CreateUserAsync(request,cancellationToken));
// PUT:Update Entity
public async Task<IResult> Put([FromBody] UserActionRequestDto request, IUserService userService, CancellationToken cancellationToken)
=> TypedResults.Ok(await userService.EditUserAsync(request,cancellationToken));
// DELETE:Delete Entity
public async Task<IResult> Delete(Guid id, IUserService userService, CancellationToken cancellationToken)
=> TypedResults.Ok(await userService.RemoveUserAsync(id, cancellationToken));
}

View File

@ -1,21 +0,0 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["Berizco.Api/Berizco.Api.csproj", "Berizco.Api/"]
RUN dotnet restore "Berizco.Api/Berizco.Api.csproj"
COPY . .
WORKDIR "/src/Berizco.Api"
RUN dotnet build "Berizco.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Berizco.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Berizco.Api.dll"]

View File

@ -1,18 +0,0 @@
using Brizco.Repository.Abstracts;
namespace Brizco.Api.Services;
public class CurrentUserService : ICurrentUserService
{
private readonly IHttpContextAccessor _httpContextAccessor;
public CurrentUserService(IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
}
public string? UserId => _httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.NameIdentifier);
public string? RoleName => _httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.Role);
public string? UserName => _httpContextAccessor.HttpContext?.User?.FindFirstValue(ClaimTypes.Name);
public string? ComplexId => _httpContextAccessor.HttpContext?.User?.FindFirstValue("ComplexId");
}

View File

@ -1,7 +0,0 @@
<!DOCTYPE html>
<div class="sidebar">
<a class="active" href="#home">Home</a>
<a href="#news">News</a>
<a href="#contact">Contact</a>
<a href="#about">About</a>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,488 +0,0 @@
/*!
* Bootstrap Reboot v5.2.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-2xl: 2rem;
--bs-border-radius-pill: 50rem;
--bs-link-color: #0d6efd;
--bs-link-hover-color: #0a58ca;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: 1px solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: var(--bs-link-color);
text-decoration: underline;
}
a:hover {
color: var(--bs-link-hover-color);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,485 +0,0 @@
/*!
* Bootstrap Reboot v5.2.2 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-2xl: 2rem;
--bs-border-radius-pill: 50rem;
--bs-link-color: #0d6efd;
--bs-link-hover-color: #0a58ca;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: 1px solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: var(--bs-link-color);
text-decoration: underline;
}
a:hover {
color: var(--bs-link-hover-color);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: #6c757d;
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,386 +0,0 @@
@-webkit-keyframes spin
{
0%
{
-webkit-transform: rotate(0);
transform: rotate(0);
}
100%
{
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin
{
0%
{
-webkit-transform: rotate(0);
transform: rotate(0);
}
100%
{
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes burst
{
0%
{
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
90%
{
-webkit-transform: scale(1.5);
transform: scale(1.5);
opacity: 0;
}
}
@keyframes burst
{
0%
{
-webkit-transform: scale(1);
transform: scale(1);
opacity: 1;
}
90%
{
-webkit-transform: scale(1.5);
transform: scale(1.5);
opacity: 0;
}
}
@-webkit-keyframes flashing
{
0%
{
opacity: 1;
}
45%
{
opacity: 0;
}
90%
{
opacity: 1;
}
}
@keyframes flashing
{
0%
{
opacity: 1;
}
45%
{
opacity: 0;
}
90%
{
opacity: 1;
}
}
@-webkit-keyframes fade-left
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(-20px);
transform: translateX(-20px);
opacity: 0;
}
}
@keyframes fade-left
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(-20px);
transform: translateX(-20px);
opacity: 0;
}
}
@-webkit-keyframes fade-right
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(20px);
transform: translateX(20px);
opacity: 0;
}
}
@keyframes fade-right
{
0%
{
-webkit-transform: translateX(0);
transform: translateX(0);
opacity: 1;
}
75%
{
-webkit-transform: translateX(20px);
transform: translateX(20px);
opacity: 0;
}
}
@-webkit-keyframes fade-up
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
opacity: 0;
}
}
@keyframes fade-up
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(-20px);
transform: translateY(-20px);
opacity: 0;
}
}
@-webkit-keyframes fade-down
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(20px);
transform: translateY(20px);
opacity: 0;
}
}
@keyframes fade-down
{
0%
{
-webkit-transform: translateY(0);
transform: translateY(0);
opacity: 1;
}
75%
{
-webkit-transform: translateY(20px);
transform: translateY(20px);
opacity: 0;
}
}
@-webkit-keyframes tada
{
from
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20%
{
-webkit-transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
}
30%,
50%,
70%,
90%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
}
40%,
60%,
80%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -10deg);
}
to
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
@keyframes tada
{
from
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
10%,
20%
{
-webkit-transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
transform: scale3d(.95, .95, .95) rotate3d(0, 0, 1, -10deg);
}
30%,
50%,
70%,
90%
{
-webkit-transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 10deg);
}
40%,
60%,
80%
{
-webkit-transform: rotate3d(0, 0, 1, -10deg);
transform: rotate3d(0, 0, 1, -10deg);
}
to
{
-webkit-transform: scale3d(1, 1, 1);
transform: scale3d(1, 1, 1);
}
}
.bx-spin
{
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.bx-spin-hover:hover
{
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.bx-tada
{
-webkit-animation: tada 1.5s ease infinite;
animation: tada 1.5s ease infinite;
}
.bx-tada-hover:hover
{
-webkit-animation: tada 1.5s ease infinite;
animation: tada 1.5s ease infinite;
}
.bx-flashing
{
-webkit-animation: flashing 1.5s infinite linear;
animation: flashing 1.5s infinite linear;
}
.bx-flashing-hover:hover
{
-webkit-animation: flashing 1.5s infinite linear;
animation: flashing 1.5s infinite linear;
}
.bx-burst
{
-webkit-animation: burst 1.5s infinite linear;
animation: burst 1.5s infinite linear;
}
.bx-burst-hover:hover
{
-webkit-animation: burst 1.5s infinite linear;
animation: burst 1.5s infinite linear;
}
.bx-fade-up
{
-webkit-animation: fade-up 1.5s infinite linear;
animation: fade-up 1.5s infinite linear;
}
.bx-fade-up-hover:hover
{
-webkit-animation: fade-up 1.5s infinite linear;
animation: fade-up 1.5s infinite linear;
}
.bx-fade-down
{
-webkit-animation: fade-down 1.5s infinite linear;
animation: fade-down 1.5s infinite linear;
}
.bx-fade-down-hover:hover
{
-webkit-animation: fade-down 1.5s infinite linear;
animation: fade-down 1.5s infinite linear;
}
.bx-fade-left
{
-webkit-animation: fade-left 1.5s infinite linear;
animation: fade-left 1.5s infinite linear;
}
.bx-fade-left-hover:hover
{
-webkit-animation: fade-left 1.5s infinite linear;
animation: fade-left 1.5s infinite linear;
}
.bx-fade-right
{
-webkit-animation: fade-right 1.5s infinite linear;
animation: fade-right 1.5s infinite linear;
}
.bx-fade-right-hover:hover
{
-webkit-animation: fade-right 1.5s infinite linear;
animation: fade-right 1.5s infinite linear;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,30 +0,0 @@
.bx-rotate-90
{
transform: rotate(90deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=1)';
}
.bx-rotate-180
{
transform: rotate(180deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2)';
}
.bx-rotate-270
{
transform: rotate(270deg);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=3)';
}
.bx-flip-horizontal
{
transform: scaleX(-1);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)';
}
.bx-flip-vertical
{
transform: scaleY(-1);
-ms-filter: 'progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)';
}

View File

@ -1,939 +0,0 @@
.glightbox-container {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 999999 !important;
overflow: hidden;
-ms-touch-action: none;
touch-action: none;
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
outline: none;
}
.glightbox-container.inactive {
display: none;
}
.glightbox-container .gcontainer {
position: relative;
width: 100%;
height: 100%;
z-index: 9999;
overflow: hidden;
}
.glightbox-container .gslider {
-webkit-transition: -webkit-transform 0.4s ease;
transition: -webkit-transform 0.4s ease;
transition: transform 0.4s ease;
transition: transform 0.4s ease, -webkit-transform 0.4s ease;
height: 100%;
left: 0;
top: 0;
width: 100%;
position: relative;
overflow: hidden;
display: -webkit-box !important;
display: -ms-flexbox !important;
display: flex !important;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.glightbox-container .gslide {
width: 100%;
position: absolute;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
opacity: 0;
}
.glightbox-container .gslide.current {
opacity: 1;
z-index: 99999;
position: relative;
}
.glightbox-container .gslide.prev {
opacity: 1;
z-index: 9999;
}
.glightbox-container .gslide-inner-content {
width: 100%;
}
.glightbox-container .ginner-container {
position: relative;
width: 100%;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
max-width: 100%;
margin: auto;
height: 100vh;
}
.glightbox-container .ginner-container.gvideo-container {
width: 100%;
}
.glightbox-container .ginner-container.desc-bottom,
.glightbox-container .ginner-container.desc-top {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.glightbox-container .ginner-container.desc-left,
.glightbox-container .ginner-container.desc-right {
max-width: 100% !important;
}
.gslide iframe,
.gslide video {
outline: none !important;
border: none;
min-height: 165px;
-webkit-overflow-scrolling: touch;
-ms-touch-action: auto;
touch-action: auto;
}
.gslide:not(.current) {
pointer-events: none;
}
.gslide-image {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.gslide-image img {
max-height: 100vh;
display: block;
padding: 0;
float: none;
outline: none;
border: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
max-width: 100vw;
width: auto;
height: auto;
-o-object-fit: cover;
object-fit: cover;
-ms-touch-action: none;
touch-action: none;
margin: auto;
min-width: 200px;
}
.desc-top .gslide-image img,
.desc-bottom .gslide-image img {
width: auto;
}
.desc-left .gslide-image img,
.desc-right .gslide-image img {
width: auto;
max-width: 100%;
}
.gslide-image img.zoomable {
position: relative;
}
.gslide-image img.dragging {
cursor: -webkit-grabbing !important;
cursor: grabbing !important;
-webkit-transition: none;
transition: none;
}
.gslide-video {
position: relative;
max-width: 100vh;
width: 100% !important;
}
.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster {
display: none;
}
.gslide-video .gvideo-wrapper {
width: 100%;
/* max-width: 160vmin; */
margin: auto;
}
.gslide-video::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: rgba(255, 0, 0, 0.34);
display: none;
}
.gslide-video.playing::before {
display: none;
}
.gslide-video.fullscreen {
max-width: 100% !important;
min-width: 100%;
height: 75vh;
}
.gslide-video.fullscreen video {
max-width: 100% !important;
width: 100% !important;
}
.gslide-inline {
background: #fff;
text-align: left;
max-height: calc(100vh - 40px);
overflow: auto;
max-width: 100%;
margin: auto;
}
.gslide-inline .ginlined-content {
padding: 20px;
width: 100%;
}
.gslide-inline .dragging {
cursor: -webkit-grabbing !important;
cursor: grabbing !important;
-webkit-transition: none;
transition: none;
}
.ginlined-content {
overflow: auto;
display: block !important;
opacity: 1;
}
.gslide-external {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
min-width: 100%;
background: #fff;
padding: 0;
overflow: auto;
max-height: 75vh;
height: 100%;
}
.gslide-media {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: auto;
}
.zoomed .gslide-media {
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.desc-top .gslide-media,
.desc-bottom .gslide-media {
margin: 0 auto;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.gslide-description {
position: relative;
-webkit-box-flex: 1;
-ms-flex: 1 0 100%;
flex: 1 0 100%;
}
.gslide-description.description-left,
.gslide-description.description-right {
max-width: 100%;
}
.gslide-description.description-bottom,
.gslide-description.description-top {
margin: 0 auto;
width: 100%;
}
.gslide-description p {
margin-bottom: 12px;
}
.gslide-description p:last-child {
margin-bottom: 0;
}
.zoomed .gslide-description {
display: none;
}
.glightbox-button-hidden {
display: none;
}
/*
* Description for mobiles
* something like facebook does the description
* for the photos
*/
.glightbox-mobile .glightbox-container .gslide-description {
height: auto !important;
width: 100%;
position: absolute;
bottom: 0;
padding: 19px 11px;
max-width: 100vw !important;
-webkit-box-ordinal-group: 3 !important;
-ms-flex-order: 2 !important;
order: 2 !important;
max-height: 78vh;
overflow: auto !important;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.75)));
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 100%);
-webkit-transition: opacity 0.3s linear;
transition: opacity 0.3s linear;
padding-bottom: 50px;
}
.glightbox-mobile .glightbox-container .gslide-title {
color: #fff;
font-size: 1em;
}
.glightbox-mobile .glightbox-container .gslide-desc {
color: #a1a1a1;
}
.glightbox-mobile .glightbox-container .gslide-desc a {
color: #fff;
font-weight: bold;
}
.glightbox-mobile .glightbox-container .gslide-desc * {
color: inherit;
}
.glightbox-mobile .glightbox-container .gslide-desc .desc-more {
color: #fff;
opacity: 0.4;
}
.gdesc-open .gslide-media {
-webkit-transition: opacity 0.5s ease;
transition: opacity 0.5s ease;
opacity: 0.4;
}
.gdesc-open .gdesc-inner {
padding-bottom: 30px;
}
.gdesc-closed .gslide-media {
-webkit-transition: opacity 0.5s ease;
transition: opacity 0.5s ease;
opacity: 1;
}
.greset {
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.gabsolute {
position: absolute;
}
.grelative {
position: relative;
}
.glightbox-desc {
display: none !important;
}
.glightbox-open {
overflow: hidden;
}
.gloader {
height: 25px;
width: 25px;
-webkit-animation: lightboxLoader 0.8s infinite linear;
animation: lightboxLoader 0.8s infinite linear;
border: 2px solid #fff;
border-right-color: transparent;
border-radius: 50%;
position: absolute;
display: block;
z-index: 9999;
left: 0;
right: 0;
margin: 0 auto;
top: 47%;
}
.goverlay {
width: 100%;
height: calc(100vh + 1px);
position: fixed;
top: -1px;
left: 0;
background: #000;
will-change: opacity;
}
.glightbox-mobile .goverlay {
background: #000;
}
.gprev,
.gnext,
.gclose {
z-index: 99999;
cursor: pointer;
width: 26px;
height: 44px;
border: none;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.gprev svg,
.gnext svg,
.gclose svg {
display: block;
width: 25px;
height: auto;
margin: 0;
padding: 0;
}
.gprev.disabled,
.gnext.disabled,
.gclose.disabled {
opacity: 0.1;
}
.gprev .garrow,
.gnext .garrow,
.gclose .garrow {
stroke: #fff;
}
.gbtn.focused {
outline: 2px solid #0f3d81;
}
iframe.wait-autoplay {
opacity: 0;
}
.glightbox-closing .gnext,
.glightbox-closing .gprev,
.glightbox-closing .gclose {
opacity: 0 !important;
}
/*Skin */
.glightbox-clean .gslide-description {
background: #fff;
}
.glightbox-clean .gdesc-inner {
padding: 22px 20px;
}
.glightbox-clean .gslide-title {
font-size: 1em;
font-weight: normal;
font-family: arial;
color: #000;
margin-bottom: 19px;
line-height: 1.4em;
}
.glightbox-clean .gslide-desc {
font-size: 0.86em;
margin-bottom: 0;
font-family: arial;
line-height: 1.4em;
}
.glightbox-clean .gslide-video {
background: #000;
}
.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
background-color: rgba(0, 0, 0, 0.75);
border-radius: 4px;
}
.glightbox-clean .gprev path,
.glightbox-clean .gnext path,
.glightbox-clean .gclose path {
fill: #fff;
}
.glightbox-clean .gprev {
position: absolute;
top: -100%;
left: 30px;
width: 40px;
height: 50px;
}
.glightbox-clean .gnext {
position: absolute;
top: -100%;
right: 30px;
width: 40px;
height: 50px;
}
.glightbox-clean .gclose {
width: 35px;
height: 35px;
top: 15px;
right: 10px;
position: absolute;
}
.glightbox-clean .gclose svg {
width: 18px;
height: auto;
}
.glightbox-clean .gclose:hover {
opacity: 1;
}
/*CSS Animations*/
.gfadeIn {
-webkit-animation: gfadeIn 0.5s ease;
animation: gfadeIn 0.5s ease;
}
.gfadeOut {
-webkit-animation: gfadeOut 0.5s ease;
animation: gfadeOut 0.5s ease;
}
.gslideOutLeft {
-webkit-animation: gslideOutLeft 0.3s ease;
animation: gslideOutLeft 0.3s ease;
}
.gslideInLeft {
-webkit-animation: gslideInLeft 0.3s ease;
animation: gslideInLeft 0.3s ease;
}
.gslideOutRight {
-webkit-animation: gslideOutRight 0.3s ease;
animation: gslideOutRight 0.3s ease;
}
.gslideInRight {
-webkit-animation: gslideInRight 0.3s ease;
animation: gslideInRight 0.3s ease;
}
.gzoomIn {
-webkit-animation: gzoomIn 0.5s ease;
animation: gzoomIn 0.5s ease;
}
.gzoomOut {
-webkit-animation: gzoomOut 0.5s ease;
animation: gzoomOut 0.5s ease;
}
@-webkit-keyframes lightboxLoader {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes lightboxLoader {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes gfadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes gfadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@-webkit-keyframes gfadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@keyframes gfadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@-webkit-keyframes gslideInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-60%, 0, 0);
transform: translate3d(-60%, 0, 0);
}
to {
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes gslideInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-60%, 0, 0);
transform: translate3d(-60%, 0, 0);
}
to {
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@-webkit-keyframes gslideOutLeft {
from {
opacity: 1;
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
-webkit-transform: translate3d(-60%, 0, 0);
transform: translate3d(-60%, 0, 0);
opacity: 0;
visibility: hidden;
}
}
@keyframes gslideOutLeft {
from {
opacity: 1;
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
-webkit-transform: translate3d(-60%, 0, 0);
transform: translate3d(-60%, 0, 0);
opacity: 0;
visibility: hidden;
}
}
@-webkit-keyframes gslideInRight {
from {
opacity: 0;
visibility: visible;
-webkit-transform: translate3d(60%, 0, 0);
transform: translate3d(60%, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@keyframes gslideInRight {
from {
opacity: 0;
visibility: visible;
-webkit-transform: translate3d(60%, 0, 0);
transform: translate3d(60%, 0, 0);
}
to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
opacity: 1;
}
}
@-webkit-keyframes gslideOutRight {
from {
opacity: 1;
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
-webkit-transform: translate3d(60%, 0, 0);
transform: translate3d(60%, 0, 0);
opacity: 0;
}
}
@keyframes gslideOutRight {
from {
opacity: 1;
visibility: visible;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
to {
-webkit-transform: translate3d(60%, 0, 0);
transform: translate3d(60%, 0, 0);
opacity: 0;
}
}
@-webkit-keyframes gzoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 1;
}
}
@keyframes gzoomIn {
from {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 1;
}
}
@-webkit-keyframes gzoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
@keyframes gzoomOut {
from {
opacity: 1;
}
50% {
opacity: 0;
-webkit-transform: scale3d(0.3, 0.3, 0.3);
transform: scale3d(0.3, 0.3, 0.3);
}
to {
opacity: 0;
}
}
@media (min-width: 769px) {
.glightbox-container .ginner-container {
width: auto;
height: auto;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-direction: row;
flex-direction: row;
}
.glightbox-container .ginner-container.desc-top .gslide-description {
-webkit-box-ordinal-group: 1;
-ms-flex-order: 0;
order: 0;
}
.glightbox-container .ginner-container.desc-top .gslide-image,
.glightbox-container .ginner-container.desc-top .gslide-image img {
-webkit-box-ordinal-group: 2;
-ms-flex-order: 1;
order: 1;
}
.glightbox-container .ginner-container.desc-left .gslide-description {
-webkit-box-ordinal-group: 1;
-ms-flex-order: 0;
order: 0;
}
.glightbox-container .ginner-container.desc-left .gslide-image {
-webkit-box-ordinal-group: 2;
-ms-flex-order: 1;
order: 1;
}
.gslide-image img {
max-height: 97vh;
max-width: 100%;
}
.gslide-image img.zoomable {
cursor: -webkit-zoom-in;
cursor: zoom-in;
}
.zoomed .gslide-image img.zoomable {
cursor: -webkit-grab;
cursor: grab;
}
.gslide-inline {
max-height: 95vh;
}
.gslide-external {
max-height: 100vh;
}
.gslide-description.description-left,
.gslide-description.description-right {
max-width: 275px;
}
.glightbox-open {
height: auto;
}
.goverlay {
background: rgba(0, 0, 0, 0.92);
}
.glightbox-clean .gslide-media {
-webkit-box-shadow: 1px 2px 9px 0px rgba(0, 0, 0, 0.65);
box-shadow: 1px 2px 9px 0px rgba(0, 0, 0, 0.65);
}
.glightbox-clean .description-left .gdesc-inner,
.glightbox-clean .description-right .gdesc-inner {
position: absolute;
height: 100%;
overflow-y: auto;
}
.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
background-color: rgba(0, 0, 0, 0.32);
}
.glightbox-clean .gprev:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gclose:hover {
background-color: rgba(0, 0, 0, 0.7);
}
.glightbox-clean .gprev {
top: 45%;
}
.glightbox-clean .gnext {
top: 45%;
}
}
@media (min-width: 992px) {
.glightbox-clean .gclose {
opacity: 0.7;
right: 20px;
}
}
@media screen and (max-height: 420px) {
.goverlay {
background: #000;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,81 +0,0 @@
/**
* PHP Email Form Validation - v3.5
* URL: https://bootstrapmade.com/php-email-form/
* Author: BootstrapMade.com
*/
(function () {
"use strict";
let forms = document.querySelectorAll('.php-email-form');
forms.forEach( function(e) {
e.addEventListener('submit', function(event) {
event.preventDefault();
let thisForm = this;
let action = thisForm.getAttribute('action');
let recaptcha = thisForm.getAttribute('data-recaptcha-site-key');
if( ! action ) {
displayError(thisForm, 'The form action property is not set!')
return;
}
thisForm.querySelector('.loading').classList.add('d-block');
thisForm.querySelector('.error-message').classList.remove('d-block');
thisForm.querySelector('.sent-message').classList.remove('d-block');
let formData = new FormData( thisForm );
if ( recaptcha ) {
if(typeof grecaptcha !== "undefined" ) {
grecaptcha.ready(function() {
try {
grecaptcha.execute(recaptcha, {action: 'php_email_form_submit'})
.then(token => {
formData.set('recaptcha-response', token);
php_email_form_submit(thisForm, action, formData);
})
} catch(error) {
displayError(thisForm, error)
}
});
} else {
displayError(thisForm, 'The reCaptcha javascript API url is not loaded!')
}
} else {
php_email_form_submit(thisForm, action, formData);
}
});
});
function php_email_form_submit(thisForm, action, formData) {
fetch(action, {
method: 'POST',
body: formData,
headers: {'X-Requested-With': 'XMLHttpRequest'}
})
.then(response => {
return response.text();
})
.then(data => {
thisForm.querySelector('.loading').classList.remove('d-block');
if (data.trim() == 'OK') {
thisForm.querySelector('.sent-message').classList.add('d-block');
thisForm.reset();
} else {
throw new Error(data ? data : 'Form submission failed and no error message returned from: ' + action);
}
})
.catch((error) => {
displayError(thisForm, error);
});
}
function displayError(thisForm, error) {
thisForm.querySelector('.loading').classList.remove('d-block');
thisForm.querySelector('.error-message').innerHTML = error;
thisForm.querySelector('.error-message').classList.add('d-block');
}
})();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 1.1 MiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 877 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,33 +0,0 @@
namespace Brizco.Infrastructure.Services;
public class SmsService : ISmsService
{
private readonly IRestApiWrapper _restApiWrapper;
private readonly ILogger<SmsService> _logger;
private readonly SiteSettings _siteSettings;
public SmsService(IRestApiWrapper restApiWrapper,
IOptionsSnapshot<SiteSettings> optionsSnapshot,
ILogger<SmsService> logger)
{
_restApiWrapper = restApiWrapper;
_logger = logger;
_siteSettings = optionsSnapshot.Value;
}
public async Task SendForgerPasswordAsync(string phoneNumber, string newPassword)
{
var rest = await _restApiWrapper.KaveNegarRestApi.SendLookUp(_siteSettings.KaveNegarApiKey, phoneNumber, newPassword, null, null, null, "forgetPassword");
if (rest.Return.status != 200)
throw new BaseApiException(ApiResultStatusCode.SendSmsError, rest.Return.message);
}
public async Task SendVerifyCodeAsync(string phoneNumber, string verifyCode)
{
var rest = await _restApiWrapper.KaveNegarRestApi.SendLookUp(_siteSettings.KaveNegarApiKey, phoneNumber, verifyCode, null, null, null, "login");
if (rest.Return.status != 200)
throw new BaseApiException(ApiResultStatusCode.SendSmsError, rest.Return.message);
}
}

View File

@ -1,74 +0,0 @@
namespace Brizco.Repository.Handlers.Activity;
public class CreateActivityCommandHandler : IRequestHandler<CreateActivityCommand, ActivityLDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public CreateActivityCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<ActivityLDto> Handle(CreateActivityCommand request, CancellationToken cancellationToken)
{
if (_currentUserService.ComplexId == null)
throw new AppException("ComplexId is null", ApiResultStatusCode.NotFound);
if (!Guid.TryParse(_currentUserService.ComplexId, out Guid complexId))
throw new AppException("ComplexId is wrong", ApiResultStatusCode.NotFound);
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var task = Domain.Entities.Task.Activity
.Create(
request.Status,
request.DoneAt,
request.PerformanceDescription,
request.Title,
request.Description,
request.Type,
request.IsRelatedToShift,
request.IsRelatedToRole,
request.IsRelatedToPerson,
request.IsDisposable,
request.SetFor,
request.HasDisposed,
request.Amount,
request.AmountType,
complexId);
if (task.IsRelatedToPerson)
{
if (request.Users.Count == 0)
throw new AppException("اگر فعالیت برای یک فرد انتخاب شده باشد باید لیست افراد را ارسال نمایید");
task.AddUser(request.Users.ToArray());
}
if (task.IsRelatedToRole)
{
if (request.Roles.Count == 0)
throw new AppException(
"اگر فعالیت برای یک گروه نقش انتخاب شده باشد باید لیست نقش ها را ارسال نمایید");
task.AddShift(request.Roles.ToArray());
}
if (task.IsRelatedToShift)
{
if (request.Shifts.Count == 0)
throw new AppException("اگر فعالیت برای یک شیفت انتخاب شده باشد باید لیست شیفت ها را ارسال نمایید");
task.AddRole(request.Shifts.ToArray());
}
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>().Add(task);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return task.AdaptToLDto();
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,34 +0,0 @@
namespace Brizco.Repository.Handlers.Activity;
public class DeleteActivityCommandHandler : IRequestHandler<DeleteActivityCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteActivityCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteActivityCommand request, CancellationToken cancellationToken)
{
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
.TableNoTracking
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
if (task == null)
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
.Delete(task);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return true;
}
catch (Exception )
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,21 +0,0 @@
namespace Brizco.Repository.Handlers.Activity;
public class GetActivitiesQueryHandler : IRequestHandler<GetActivitiesQuery, List<ActivitySDto>>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetActivitiesQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<List<ActivitySDto>> Handle(GetActivitiesQuery request, CancellationToken cancellationToken)
{
var tasks = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>().TableNoTracking
.OrderByDescending(s => s.CreatedAt)
.Skip(request.Page * 15).Take(15)
.Select(ActivityMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
return tasks;
}
}

View File

@ -1,25 +0,0 @@
using Brizco.Domain.Dtos.LargDtos;
namespace Brizco.Repository.Handlers.Activity;
public class GetActivityQueryHandler : IRequestHandler<GetActivityQuery, ActivityLDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetActivityQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<ActivityLDto> Handle(GetActivityQuery request, CancellationToken cancellationToken)
{
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
.TableNoTracking
.Where(s => s.Id == request.Id)
.Select(ActivityMapper.ProjectToLDto)
.FirstOrDefaultAsync(cancellationToken);
if (task == null)
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
return task;
}
}

View File

@ -1,60 +0,0 @@
namespace Brizco.Repository.Handlers.Activity;
public class UpdateActivityCommandHandler : IRequestHandler<UpdateActivityCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public UpdateActivityCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<bool> Handle(UpdateActivityCommand request, CancellationToken cancellationToken)
{
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
.TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken);
if (task == null)
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
if (_currentUserService.ComplexId == null)
throw new AppException("ComplexId is null", ApiResultStatusCode.NotFound);
if (!Guid.TryParse(_currentUserService.ComplexId,out Guid complexId))
throw new AppException("ComplexId is wrong", ApiResultStatusCode.NotFound);
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var newTask = Domain.Entities.Task.Activity.Create(
request.Status,
request.DoneAt,
request.PerformanceDescription,
request.Title,
request.Description,
request.Type,
request.IsRelatedToShift,
request.IsRelatedToRole,
request.IsRelatedToPerson,
request.IsDisposable,
request.SetFor,
request.HasDisposed,
request.Amount,
request.AmountType,
complexId);
newTask.Id = request.Id;
_repositoryWrapper.SetRepository<Domain.Entities.Task.Activity>()
.Update(newTask);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return true;
}
catch (Exception )
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,31 +0,0 @@
namespace Brizco.Repository.Handlers.Complex;
public class CreateComplexCommandHandler : IRequestHandler<CreateComplexCommand, ComplexSDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public CreateComplexCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<ComplexSDto> Handle(CreateComplexCommand request, CancellationToken cancellationToken)
{
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var complex = Domain.Entities.Complex.Complex.Create(request.Name, request.Address, request.SupportPhone);
_repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>().Add(complex);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return complex.AdaptToSDto();
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,65 +0,0 @@
using Brizco.Domain.Entities.Complex;
using Brizco.Domain.Entities.User;
using Microsoft.AspNetCore.Identity;
namespace Brizco.Repository.Handlers.Complex;
public class CreateComplexUserCommandHandler : IRequestHandler<CreateComplexUserCommand, ComplexUserSDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly UserManager<ApplicationUser> _userManager;
private readonly RoleManager<ApplicationRole> _roleManager;
private readonly ILogger<CreateComplexUserCommandHandler> _logger;
public CreateComplexUserCommandHandler(IRepositoryWrapper repositoryWrapper,
UserManager<ApplicationUser> userManager,
RoleManager<ApplicationRole> roleManager,
ILogger<CreateComplexUserCommandHandler> logger)
{
_repositoryWrapper = repositoryWrapper;
_userManager = userManager;
_roleManager = roleManager;
_logger = logger;
}
public async Task<ComplexUserSDto> Handle(CreateComplexUserCommand request, CancellationToken cancellationToken)
{
try
{
//await _repositoryWrapper.BeginTransaction(cancellationToken);
var complex = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>().TableNoTracking
.FirstOrDefaultAsync(c => c.Id == request.ComplexId, cancellationToken);
if (complex == null)
throw new AppException("Complex not found", ApiResultStatusCode.NotFound);
var user = await _userManager.FindByIdAsync(request.UserId.ToString());
if (user == null)
throw new AppException("User not found", ApiResultStatusCode.NotFound);
var complexUser = await _repositoryWrapper.SetRepository<ComplexUser>()
.TableNoTracking
.FirstOrDefaultAsync(f => f.ComplexId == request.ComplexId && f.UserId == request.UserId, cancellationToken);
if (complexUser != null)
throw new AppException("این کاربر در این رستوران وجود دارد");
complexUser = complex.AddComplexUser(request.UserId);
foreach (var roleId in request.RoleIds)
{
var role = await _roleManager.FindByIdAsync(roleId.ToString());
var result = await _userManager.AddToRoleAsync(user, role.Name);
if (!result.Succeeded)
throw new AppException(string.Join('|', result.Errors));
complexUser.AddRole(role.Id);
}
_repositoryWrapper.SetRepository<ComplexUser>().Add(complexUser);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
//await _repositoryWrapper.CommitAsync(cancellationToken);
return complexUser.AdaptToSDto();
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,34 +0,0 @@
namespace Brizco.Repository.Handlers.Complex;
public class DeleteComplexCommandHandler : IRequestHandler<DeleteComplexCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteComplexCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteComplexCommand request, CancellationToken cancellationToken)
{
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>()
.TableNoTracking
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
if (task == null)
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>()
.Delete(task);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return true;
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,36 +0,0 @@
using Brizco.Domain.Entities.Complex;
namespace Brizco.Repository.Handlers.Complex;
public class DeleteComplexUserCommandHandler : IRequestHandler<DeleteComplexUserCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteComplexUserCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteComplexUserCommand request, CancellationToken cancellationToken)
{
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var complexUser = await _repositoryWrapper.SetRepository<ComplexUser>()
.TableNoTracking
.FirstOrDefaultAsync(c => c.ComplexId == request.ComplexId && c.UserId == request.UserId, cancellationToken);
if (complexUser == null)
throw new AppException("ComplexUser not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<ComplexUser>().Delete(complexUser);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return true;
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,32 +0,0 @@
using Brizco.Domain.Entities.Complex;
using Microsoft.IdentityModel.Tokens;
namespace Brizco.Repository.Handlers.Complex;
public class GetComplexUsersQueryHandler : IRequestHandler<GetComplexUsersQuery, List<ComplexUserSDto>>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetComplexUsersQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<List<ComplexUserSDto>> Handle(GetComplexUsersQuery request, CancellationToken cancellationToken)
{
if (!request.ComplexId.IsNullOrEmpty() && Guid.TryParse(request.ComplexId, out Guid complexId))
return await _repositoryWrapper.SetRepository<ComplexUser>().TableNoTracking
.Where(c => c.ComplexId == complexId)
.OrderByDescending(s => s.CreatedAt)
.Skip(request.Page * 15).Take(15)
.Select(ComplexUserMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
return await _repositoryWrapper.SetRepository<ComplexUser>().TableNoTracking
.OrderByDescending(s => s.CreatedAt)
.Skip(request.Page * 15).Take(15)
.Select(ComplexUserMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
}
}

View File

@ -1,21 +0,0 @@
namespace Brizco.Repository.Handlers.Complex;
public class GetComplexesQueryHandler : IRequestHandler<GetComplexesQuery, List<ComplexSDto>>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetComplexesQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<List<ComplexSDto>> Handle(GetComplexesQuery request, CancellationToken cancellationToken)
{
var tasks = await _repositoryWrapper.SetRepository<Domain.Entities.Complex.Complex>().TableNoTracking
.OrderByDescending(s => s.CreatedAt)
.Skip(request.Page * 15).Take(15)
.Select(ComplexMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
return tasks;
}
}

View File

@ -1,80 +0,0 @@
using Brizco.Domain.Entities.Complex;
using Brizco.Domain.Entities.User;
using StackExchange.Redis;
namespace Brizco.Repository.Handlers.Complex;
public class UpdateComplexUserCommandHandler : IRequestHandler<UpdateComplexUserCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly UserManager<ApplicationUser> _userManager;
private readonly RoleManager<ApplicationRole> _roleManager;
public UpdateComplexUserCommandHandler(IRepositoryWrapper repositoryWrapper,
UserManager<ApplicationUser> userManager,
RoleManager<ApplicationRole> roleManager)
{
_repositoryWrapper = repositoryWrapper;
_userManager = userManager;
_roleManager = roleManager;
}
public async Task<bool> Handle(UpdateComplexUserCommand request, CancellationToken cancellationToken)
{
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var complexUser = await _repositoryWrapper.SetRepository<ComplexUser>().TableNoTracking
.FirstOrDefaultAsync(c => c.UserId == request.UserId && c.ComplexId==request.ComplexId , cancellationToken);
if (complexUser == null)
throw new AppException("ComplexUser not found", ApiResultStatusCode.NotFound);
var complexUserRoles = await _repositoryWrapper.SetRepository<ComplexUserRole>()
.TableNoTracking
.Where(cur => cur.ComplexUserId == complexUser.Id)
.ToListAsync(cancellationToken);
var user = await _userManager.FindByIdAsync(complexUser.UserId.ToString());
if (user == null)
throw new AppException("User not found", ApiResultStatusCode.NotFound);
foreach (var userRole in complexUserRoles.ToList())
{
if(request.RoleIds.Contains(userRole.RoleId))
{
complexUserRoles.Remove(userRole);
request.RoleIds.Remove(userRole.RoleId);
}
}
foreach (var userRole in complexUserRoles)
{
_repositoryWrapper.SetRepository<ComplexUserRole>().Delete(userRole);
var role = await _roleManager.FindByIdAsync(userRole.RoleId.ToString());
var result = await _userManager.RemoveFromRoleAsync(user, role.Name);
if (!result.Succeeded)
throw new AppException(string.Join('|', result.Errors));
}
foreach (var roleId in request.RoleIds)
{
var role = await _roleManager.FindByIdAsync(roleId.ToString());
var result = await _userManager.AddToRoleAsync(user, role.Name);
if (!result.Succeeded)
throw new AppException(string.Join('|', result.Errors));
var userRole = complexUser.AddRole(role.Id);
_repositoryWrapper.SetRepository<ComplexUserRole>().Add(userRole);
}
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return true;
}
catch (Exception)
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,44 +0,0 @@
namespace Brizco.Repository.Handlers.Shift;
public class CreateShiftCommandHandler : IRequestHandler<CreateShiftCommand, Domain.Entities.Shift.Shift>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public CreateShiftCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<Domain.Entities.Shift.Shift> Handle(CreateShiftCommand request, CancellationToken cancellationToken)
{
if (_currentUserService.ComplexId == null)
throw new AppException("ComplexId is null", ApiResultStatusCode.NotFound);
if (!Guid.TryParse(_currentUserService.ComplexId, out Guid complexId))
throw new AppException("ComplexId is wrong", ApiResultStatusCode.NotFound);
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var shift = Domain.Entities.Shift.Shift
.Create(request.Title,
request.Description,
request.StartAt,
request.EndAt,
complexId);
request.DayOfWeeks.ForEach(d => shift.SetDay(d));
_repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>().Add(shift);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return shift;
}
catch (Exception )
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,24 +0,0 @@
namespace Brizco.Repository.Handlers.Shift;
public class DeleteShiftCommandHandler : IRequestHandler<DeleteShiftCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteShiftCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteShiftCommand request, CancellationToken cancellationToken)
{
var shift = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.TableNoTracking
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
if (shift == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.Delete(shift);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return true;
}
}

View File

@ -1,22 +0,0 @@
namespace Brizco.Repository.Handlers.Shift;
public class GetShiftPlanQueryHandler : IRequestHandler<GetShiftQuery, ShiftSDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetShiftPlanQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<ShiftSDto> Handle(GetShiftQuery request, CancellationToken cancellationToken)
{
var shift = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.TableNoTracking
.Where(s => s.Id == request.id)
.Select(ShiftMapper.ProjectToSDto)
.FirstOrDefaultAsync(cancellationToken);
if (shift == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
return shift;
}
}

View File

@ -1,21 +0,0 @@
namespace Brizco.Repository.Handlers.Shift;
public class GetShiftPlansQueryHandler : IRequestHandler<GetShiftsQuery, List<ShiftSDto>>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetShiftPlansQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<List<ShiftSDto>> Handle(GetShiftsQuery request, CancellationToken cancellationToken)
{
var shifts = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>().TableNoTracking
.OrderByDescending(s => s.CreatedAt)
.Skip(request.page * 15).Take(15)
.Select(ShiftMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
return shifts;
}
}

View File

@ -1,38 +0,0 @@
namespace Brizco.Repository.Handlers.Shift;
public class UpdateShiftCommandHandler : IRequestHandler<UpdateShiftCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public UpdateShiftCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<bool> Handle(UpdateShiftCommand request, CancellationToken cancellationToken)
{
var shift = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id);
if (shift == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
if (_currentUserService.ComplexId == null)
throw new AppException("ComplexId is null", ApiResultStatusCode.NotFound);
if (!Guid.TryParse(_currentUserService.ComplexId, out Guid complexId))
throw new AppException("ComplexId is wrong", ApiResultStatusCode.NotFound);
var newShift = Domain.Entities.Shift.Shift.Create(request.Title,
request.Description,
request.StartAt,
request.EndAt,
complexId);
newShift.Id = request.Id;
_repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.Update(newShift);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return true;
}
}

View File

@ -1,41 +0,0 @@
namespace Brizco.Repository.Handlers.ShiftPlan;
public class CreateShiftPlanCommandHandler : IRequestHandler<CreateShiftPlanCommand, ShiftPlanLDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public CreateShiftPlanCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<ShiftPlanLDto> Handle(CreateShiftPlanCommand request, CancellationToken cancellationToken)
{
var shift = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.TableNoTracking
.FirstOrDefaultAsync(s => s.Id == request.ShiftId, cancellationToken);
if (shift == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
try
{
await _repositoryWrapper.BeginTransaction(cancellationToken);
var shiftPlan = shift.AddPlan(request.StartAt, request.EndAt);
if (request.UserIds.Count == 0)
throw new AppException("شیفت بندی مورد نظر باید حداقل متشکل از یک فرد باشد",
ApiResultStatusCode.BadRequest);
request.UserIds.ForEach(i => shiftPlan.AddUser(i));
_repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>().Add(shiftPlan);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
await _repositoryWrapper.CommitAsync(cancellationToken);
return shiftPlan.AdaptToLDto();
}
catch (Exception )
{
await _repositoryWrapper.RollBackAsync(cancellationToken);
throw;
}
}
}

View File

@ -1,26 +0,0 @@
namespace Brizco.Repository.Handlers.ShiftPlan;
public class DeleteShiftPlanCommandHandler : IRequestHandler<DeleteShiftPlanCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteShiftPlanCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteShiftPlanCommand request, CancellationToken cancellationToken)
{
var shiftPlan = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
.TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id);
if (shiftPlan == null)
throw new AppException("ShiftPlan not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
.Delete(shiftPlan);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return true;
}
}

View File

@ -1,22 +0,0 @@
namespace Brizco.Repository.Handlers.ShiftPlan;
public class GetShiftPlanQueryHandler : IRequestHandler<GetShiftPlanQuery, ShiftPlanLDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetShiftPlanQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<ShiftPlanLDto> Handle(GetShiftPlanQuery request, CancellationToken cancellationToken)
{
var shiftPlan = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
.TableNoTracking
.Where(s => s.Id == request.Id)
.Select(ShiftPlanMapper.ProjectToLDto)
.FirstOrDefaultAsync(cancellationToken);
if (shiftPlan == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
return shiftPlan;
}
}

View File

@ -1,21 +0,0 @@
namespace Brizco.Repository.Handlers.ShiftPlan;
public class GetShiftPlansQueryHandler : IRequestHandler<GetShiftPlansQuery, List<ShiftPlanSDto>>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public GetShiftPlansQueryHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<List<ShiftPlanSDto>> Handle(GetShiftPlansQuery request, CancellationToken cancellationToken)
{
var shifts = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>().TableNoTracking
.OrderByDescending(s => s.CreatedAt)
.Skip(request.Page * 15).Take(15)
.Select(ShiftPlanMapper.ProjectToSDto)
.ToListAsync(cancellationToken);
return shifts;
}
}

View File

@ -1,55 +0,0 @@
namespace Brizco.Repository.Handlers.ShiftPlan;
public class UpdateShiftPlanCommandHandler : IRequestHandler<UpdateShiftPlanCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public UpdateShiftPlanCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(UpdateShiftPlanCommand request, CancellationToken cancellationToken)
{
var shiftPlan = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
.TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.Id,cancellationToken);
if (shiftPlan == null)
throw new AppException("ShiftPlan not found", ApiResultStatusCode.NotFound);
var shift = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.Shift>()
.TableNoTracking.FirstOrDefaultAsync(s => s.Id == request.ShiftId, cancellationToken);
if (shift == null)
throw new AppException("Shift not found", ApiResultStatusCode.NotFound);
var newPlan = shift.AddPlan(request.StartAt, request.EndAt);
newPlan.Id = request.Id;
var shiftPlanUsers = await _repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlanUser>()
.TableNoTracking
.Where(s => s.ShiftPlanId == newPlan.Id)
.ToListAsync(cancellationToken);
foreach (var shiftPlanUser in shiftPlanUsers)
{
if (request.UserIds.Contains(shiftPlanUser.Id))
request.UserIds.Remove(shiftPlanUser.Id);
else
_repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlanUser>()
.Delete(shiftPlanUser);
}
foreach (var userId in request.UserIds)
newPlan.AddUser(userId);
_repositoryWrapper.SetRepository<Domain.Entities.Shift.ShiftPlan>()
.Update(newPlan);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return true;
}
}

View File

@ -1,58 +0,0 @@
namespace Brizco.Repository.Handlers.Task;
public class CreateActivityCommandHandler : IRequestHandler<CreateTaskCommand, TaskLDto>
{
private readonly IRepositoryWrapper _repositoryWrapper;
private readonly ICurrentUserService _currentUserService;
public CreateActivityCommandHandler(IRepositoryWrapper repositoryWrapper,ICurrentUserService currentUserService)
{
_repositoryWrapper = repositoryWrapper;
_currentUserService = currentUserService;
}
public async Task<TaskLDto> Handle(CreateTaskCommand request, CancellationToken cancellationToken)
{
if (_currentUserService.ComplexId == null)
throw new AppException("ComplexId is null", ApiResultStatusCode.NotFound);
if (!Guid.TryParse(_currentUserService.ComplexId, out Guid complexId))
throw new AppException("ComplexId is wrong", ApiResultStatusCode.NotFound);
var task = Domain.Entities.Task.Task
.Create(request.Title,
request.Description,
request.Type,
request.IsRelatedToShift,
request.IsRelatedToRole,
request.IsRelatedToPerson,
request.IsDisposable,
request.SetFor,
request.HasDisposed,
request.Amount,
request.AmountType,
complexId);
if (task.IsRelatedToPerson)
{
if (request.Users.Count == 0)
throw new AppException("اگر فعالیت برای یک فرد انتخاب شده باشد باید لیست افراد را ارسال نمایید");
task.AddUser(request.Users.ToArray());
}
if (task.IsRelatedToRole)
{
if (request.Roles.Count == 0)
throw new AppException("اگر فعالیت برای یک گروه نقش انتخاب شده باشد باید لیست نقش ها را ارسال نمایید");
task.AddShift(request.Roles.ToArray());
}
if (task.IsRelatedToShift)
{
if (request.Shifts.Count == 0)
throw new AppException("اگر فعالیت برای یک شیفت انتخاب شده باشد باید لیست شیفت ها را ارسال نمایید");
task.AddRole(request.Shifts.ToArray());
}
_repositoryWrapper.SetRepository<Domain.Entities.Task.Task>().Add(task);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return task.AdaptToLDto();
}
}

View File

@ -1,24 +0,0 @@
namespace Brizco.Repository.Handlers.Task;
public class DeleteActivityCommandHandler : IRequestHandler<DeleteTaskCommand, bool>
{
private readonly IRepositoryWrapper _repositoryWrapper;
public DeleteActivityCommandHandler(IRepositoryWrapper repositoryWrapper)
{
_repositoryWrapper = repositoryWrapper;
}
public async Task<bool> Handle(DeleteTaskCommand request, CancellationToken cancellationToken)
{
var task = await _repositoryWrapper.SetRepository<Domain.Entities.Task.Task>()
.TableNoTracking
.FirstOrDefaultAsync(s => s.Id == request.Id, cancellationToken);
if (task == null)
throw new AppException("Task not found", ApiResultStatusCode.NotFound);
_repositoryWrapper.SetRepository<Domain.Entities.Task.Task>()
.Delete(task);
await _repositoryWrapper.SaveChangesAsync(cancellationToken);
return true;
}
}

Some files were not shown because too many files have changed in this diff Show More