Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration #100

Merged
merged 392 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
392 commits
Select commit Hold shift + click to select a range
8bf8f79
Merge pull request #36 from DiyorMarket/Update-SideBar-And-Create-Acc…
SharifovDeveloper May 19, 2024
69bf7ea
CRUD operations
khojianvar May 20, 2024
0638989
Update "Ishchilar" page
diyorzz May 20, 2024
523ebd7
Merge branch 'integration' into Generate-operator-page-for-admin
AzamatG17 May 20, 2024
ab2f3f3
Improve "Ishchi" Page
diyorzz May 20, 2024
a046644
Delete Mock DataStores
AzamatG17 May 20, 2024
862a7f0
Instal ApiContracts and upgrade DashBoard
AzamatG17 May 20, 2024
68a6f3c
Upgrade Controllers
AzamatG17 May 20, 2024
957cbcf
Change Configure DataStore
AzamatG17 May 20, 2024
9b3c85e
Upgrade Response
AzamatG17 May 20, 2024
73303b4
change SideBar
AzamatG17 May 20, 2024
954f900
Create OperatorReview DataStore
AzamatG17 May 20, 2024
96ddfa2
Created Mechanics file
SharifovDeveloper May 20, 2024
723dc78
UpdateOperator DataStore
AzamatG17 May 20, 2024
d5e4217
Create OperatorReview Page
AzamatG17 May 20, 2024
06121aa
Merge pull request #37 from DiyorMarket/Generate-operator-page-for-admin
AzamatG17 May 20, 2024
f8548ee
Created ViewModels file
SharifovDeveloper May 21, 2024
9121734
Created MechanicViewModel
SharifovDeveloper May 21, 2024
1c7f8e9
Make ApiClient methods asynchronous
SharifovDeveloper May 21, 2024
4d9f2b3
Updated IMechanicDataStore
SharifovDeveloper May 21, 2024
e447ed7
Made Drivers Stores classes asynchronous
SharifovDeveloper May 21, 2024
ddf5391
Make Account classes asynchronous
SharifovDeveloper May 21, 2024
7b9f4e5
Make Drivers controller asynchronous
SharifovDeveloper May 21, 2024
fde88f6
Car-page
khojianvar May 21, 2024
188908f
Synchronous codes
SharifovDeveloper May 21, 2024
b46c1ea
Updated Index
SharifovDeveloper May 21, 2024
583107f
Installed last version contacts package
SharifovDeveloper May 21, 2024
c2aff04
Updated GetMechanicAcceptance response
SharifovDeveloper May 21, 2024
e085021
Update mechanicAcceptances controller
SharifovDeveloper May 21, 2024
21078b6
Updated
SharifovDeveloper May 21, 2024
1b8c29d
Added async keyword to methods
SharifovDeveloper May 21, 2024
7d8fa37
updated
SharifovDeveloper May 21, 2024
9dbe45c
Corrected
SharifovDeveloper May 21, 2024
652a424
Corrected IMechanicAcceptanceDataStore
SharifovDeveloper May 21, 2024
8a3cf9f
today's last commit
SharifovDeveloper May 21, 2024
9f2f0b5
Creating-Car-View
khojianvar May 22, 2024
83dc5de
Update "Ishchilar" page
diyorzz May 22, 2024
d3a038d
Update Role to RoleDTOs
diyorzz May 22, 2024
11c3e20
Merge branch 'integration' into Car-page-for-admin
khojianvar May 23, 2024
2f461ac
index
khojianvar May 23, 2024
c10bb2a
Merge pull request #39 from DiyorMarket/Car-page-for-admin
khojianvar May 23, 2024
208c8d9
Updated
SharifovDeveloper May 23, 2024
f184caf
Improve "Ishchilar" page
diyorzz May 23, 2024
17da96d
Creating-PersonalPage
khojianvar May 24, 2024
a45a653
Improve Account Create ,Edit and List
diyorzz May 24, 2024
be1c7d4
Merge pull request #40 from DiyorMarket/Car-page-for-admin
khojianvar May 24, 2024
ba4d6e3
Improve AccountController
diyorzz May 24, 2024
a2528b3
Update Create page
diyorzz May 24, 2024
82ec159
Update delete properties to uzbek
diyorzz May 24, 2024
cb9fe4e
Update Details page to uzbek
diyorzz May 24, 2024
38b66a4
Update Edit page to uzbek
diyorzz May 24, 2024
369fa19
Update create bottom location
diyorzz May 24, 2024
7c30a8c
Updated
SharifovDeveloper May 25, 2024
5602dd1
Created MechanicHandovers View
SharifovDeveloper May 25, 2024
233ea14
Updated HandoverResponse
SharifovDeveloper May 25, 2024
b1d44cf
Updated handovers datastore
SharifovDeveloper May 25, 2024
8c26a06
Update MechanicHandoverController
SharifovDeveloper May 25, 2024
2391a74
Updated
SharifovDeveloper May 26, 2024
ca8066d
Improve Edit Page
diyorzz May 27, 2024
efed406
Improve Delete page
diyorzz May 27, 2024
a75da0d
Delete unnecessary lines
diyorzz May 27, 2024
c3f71b5
Merge pull request #41 from DiyorMarket/Improve-Ishchillar-page
khojianvar May 27, 2024
0284439
Completed Mechanic
SharifovDeveloper May 28, 2024
9c4e178
Merge branch 'integration' into Mechanic
SharifovDeveloper May 28, 2024
9ebc6da
Merge pull request #42 from DiyorMarket/Mechanic
SharifovDeveloper May 28, 2024
82ea7e1
Fixed all errors
SharifovDeveloper May 28, 2024
fec4bd2
Merge pull request #43 from DiyorMarket/FixedIntegration
SharifovDeveloper May 28, 2024
aa7e38f
Add-Pagination
diyorzz May 28, 2024
71802ec
Improve "Ishchilar" page
diyorzz May 28, 2024
0399d17
Merge pull request #44 from DiyorMarket/Add-Pagination-and-improve-Is…
diyorzz May 28, 2024
4ae253f
Updated MechanicAcceptance index view
SharifovDeveloper May 28, 2024
cdf5d5e
Delete unnecessary method in AccountController
diyorzz May 28, 2024
09a59db
Add Search and Fix some problems
diyorzz May 28, 2024
57baf61
Merge pull request #45 from DiyorMarket/Upgrade-Avtomobillar-page
diyorzz May 28, 2024
a1e0ba1
Added Pagination
SharifovDeveloper May 28, 2024
462a222
Added pagination to Handover
SharifovDeveloper May 28, 2024
48bc744
removed unnecessary mechanic section
SharifovDeveloper May 28, 2024
df23629
Added details for mechanicAcceptances
SharifovDeveloper May 29, 2024
b042c8c
Improves mechanicAcceptances
SharifovDeveloper May 29, 2024
02bc9cf
Added Details for MechanicHandover
SharifovDeveloper May 29, 2024
c59450d
Updated Mechanic acceptances
SharifovDeveloper May 29, 2024
7605867
Fix "Avtobillar" page location "Yaratish" bottom
diyorzz May 29, 2024
b81c01d
Merge pull request #46 from DiyorMarket/ImprovMechanicPages
SharifovDeveloper May 29, 2024
da0425d
Merge pull request #47 from DiyorMarket/Fix-Avtomobillar-page-location
diyorzz May 29, 2024
b024367
Personal_Doctors_Page
khojianvar May 28, 2024
fa0e780
update
khojianvar May 29, 2024
0e1455b
Merge pull request #48 from DiyorMarket/Car-page-for-admin
khojianvar May 29, 2024
52bc830
Updated-code
khojianvar May 30, 2024
acfaf31
Merge pull request #50 from DiyorMarket/Doctor-page-update
khojianvar May 30, 2024
9bc5db9
Updated
SharifovDeveloper May 31, 2024
fa44bf4
fix apiClient
diyorzz May 31, 2024
169a7ce
Merge pull request #51 from DiyorMarket/Fix-ApiClient-probelem
AzamatG17 May 31, 2024
8e0cb82
Merge branch 'integration' into PersonalManagerPage
SharifovDeveloper May 31, 2024
54fe61a
Updated packeges
SharifovDeveloper Jun 1, 2024
49849d4
updated
SharifovDeveloper Jun 1, 2024
4ae2f62
updated personalacceptanceview
SharifovDeveloper Jun 1, 2024
d6e6f49
Created PersonalMechanicHandoversController
SharifovDeveloper Jun 1, 2024
774480d
Update NuGet Package
diyorzz Jun 2, 2024
74d1638
Add coulmn to Cars page
diyorzz Jun 2, 2024
a66cc5f
Merge pull request #52 from DiyorMarket/Add-new-column-to-Cars-page
diyorzz Jun 2, 2024
14f82a8
Updated
SharifovDeveloper Jun 2, 2024
e1ccfbd
Completed DoctorPage
Nabiddinov Jun 2, 2024
6f16fe7
Merge pull request #54 from DiyorMarket/UpdateDoctorPage
Nabiddinov Jun 2, 2024
466a092
Updated
SharifovDeveloper Jun 5, 2024
ec9ec0d
Completed mechanic create view
SharifovDeveloper Jun 5, 2024
1c2be72
Doctor-page
khojianvar Jun 6, 2024
97cb096
Merge branch 'integration' into operator-page-for-operators
SharafiddinMukhtorov Jun 6, 2024
74f9483
updated
SharifovDeveloper Jun 7, 2024
9142b57
Connect to Dashboard to API
diyorzz Jun 8, 2024
aae3e3b
Merge pull request #56 from DiyorMarket/Connect-Dashbord-to-API
diyorzz Jun 8, 2024
49ec777
Completed Personal Manager pages
SharifovDeveloper Jun 8, 2024
52d22e9
Merge branch 'integration' into PersonalManagerPage
SharifovDeveloper Jun 8, 2024
e49b2d5
Merge pull request #57 from DiyorMarket/PersonalManagerPage
SharifovDeveloper Jun 8, 2024
719fe90
Created dispatcherPage for admin
SharafiddinMukhtorov Jun 9, 2024
b172823
Merge branch 'integration' into Generate-dispatcher-page-for-admin
SharafiddinMukhtorov Jun 9, 2024
34c4e8c
Merge pull request #58 from DiyorMarket/Generate-dispatcher-page-for-…
SharafiddinMukhtorov Jun 9, 2024
fd6fe08
doctors
khojianvar Jun 9, 2024
3770f07
Merge branch 'operator-page-for-operators' of https://github.com/Diyo…
khojianvar Jun 9, 2024
e80e222
Create Login page Controllers and Interfaces
diyorzz Jun 9, 2024
4531ffe
Merge pull request #60 from DiyorMarket/Create-Login-page
SharafiddinMukhtorov Jun 9, 2024
62be8ce
Added link
SharifovDeveloper Jun 9, 2024
6cd3fb7
Doctor_changes
khojianvar Jun 10, 2024
f2d44db
Fix
khojianvar Jun 10, 2024
a1f3fed
car-property-fix
khojianvar Jun 10, 2024
bbc5675
Add SearchString
diyorzz Jun 10, 2024
b0a4282
Update-PersonalDoctorReviewPage
khojianvar Jun 10, 2024
4d83b75
today's last commit
SharifovDeveloper Jun 10, 2024
a18fcfc
Doctor-page-updated-code
khojianvar Jun 11, 2024
15cdfc5
Create-button-in-operator-page
khojianvar Jun 11, 2024
95de514
Merge pull request #62 from DiyorMarket/Create-button
khojianvar Jun 11, 2024
ee22d26
DoctorPage-change-code
khojianvar Jun 11, 2024
614604e
Merge branch 'integration' into ImproveMechanicPages
SharifovDeveloper Jun 11, 2024
c34adc2
Merge pull request #63 from DiyorMarket/Doctor-page-IsHealthy-property
khojianvar Jun 11, 2024
16edbba
Merged from Integration into this branch
SharifovDeveloper Jun 11, 2024
85512ea
Add Pagination to PersonalDoctorReviews page
diyorzz Jun 11, 2024
b4d05fd
Merge branch 'integration' into Add-pagination-to-PersonalDoctorRevie…
diyorzz Jun 11, 2024
967579f
update-pagination-code
khojianvar Jun 11, 2024
e3a1897
Merge pull request #64 from DiyorMarket/Add-pagination-to-PersonalDoc…
khojianvar Jun 11, 2024
2a1c7c6
Updated
SharifovDeveloper Jun 11, 2024
5b8be47
Updated-code-in-mechanic-acceptance-page
khojianvar Jun 12, 2024
d4bb2bb
Fix-code
khojianvar Jun 12, 2024
b3703ce
Merge pull request #65 from DiyorMarket/pagination-fix-location-in-do…
diyorzz Jun 12, 2024
f7ec72d
update-code
khojianvar Jun 12, 2024
b7a605a
Merge pull request #66 from DiyorMarket/ImproveMechanicPages
khojianvar Jun 12, 2024
e78bd52
pagination
khojianvar Jun 12, 2024
194681b
Merge pull request #67 from DiyorMarket/Pagination
SharifovDeveloper Jun 12, 2024
f3cdcac
Updated Create method
SharifovDeveloper Jun 12, 2024
9f83295
Revert "Updated Create method"
SharifovDeveloper Jun 12, 2024
0867f75
Reapply "Updated Create method"
SharifovDeveloper Jun 12, 2024
748455a
Completed
SharifovDeveloper Jun 12, 2024
44bbed0
Merge pull request #68 from DiyorMarket/CompleteMechanicAcceptance
SharifovDeveloper Jun 12, 2024
db0aae8
Completed MechanicHandoverController
SharifovDeveloper Jun 13, 2024
160cd4c
Completed MechanicHandover's create and personalindex views
SharifovDeveloper Jun 13, 2024
d80ee0c
Updated views
SharifovDeveloper Jun 13, 2024
5eb51a3
Change view style
SharifovDeveloper Jun 13, 2024
2d22319
Updated create view logic
SharifovDeveloper Jun 13, 2024
eda194d
Updated
SharifovDeveloper Jun 13, 2024
8fecf3c
Merge pull request #69 from DiyorMarket/UpdateMechanicHandover
SharifovDeveloper Jun 13, 2024
e0c0745
Operator-page-update-code
khojianvar Jun 13, 2024
0b955ad
MechanicHandover
khojianvar Jun 13, 2024
05af9e1
Add new Chart to Dashboard
diyorzz Jun 13, 2024
27ed747
Merge pull request #70 from DiyorMarket/Add-new-Chart-to-Dashboard
diyorzz Jun 13, 2024
834e09b
Added LogOut Button
SharafiddinMukhtorov Jun 14, 2024
46b2a4a
Merge pull request #72 from DiyorMarket/Create-LogOut_Button
SharafiddinMukhtorov Jun 14, 2024
3c340fd
Updated AuthController
SharafiddinMukhtorov Jun 14, 2024
f123961
OperatorPage-Personal
khojianvar Jun 14, 2024
a54f130
Merge pull request #75 from DiyorMarket/Personal-OperatorPage
khojianvar Jun 14, 2024
9ee3a20
updated
SharifovDeveloper Jun 15, 2024
e2242ae
Merge pull request #76 from DiyorMarket/ImprovePages
SharifovDeveloper Jun 15, 2024
260f89e
Merge pull request #74 from DiyorMarket/Navigation-to-person-page
SharafiddinMukhtorov Jun 15, 2024
a2a1380
Updated Navigation
SharafiddinMukhtorov Jun 15, 2024
c5b3baa
update-codes-in-doctor-page
khojianvar Jun 15, 2024
4ff0390
solved-conflict
khojianvar Jun 15, 2024
3873550
Merge pull request #78 from DiyorMarket/Add-new-updated-codes-to-doct…
khojianvar Jun 15, 2024
f3d8919
remove-comment
khojianvar Jun 18, 2024
1aec3a8
Merge pull request #79 from DiyorMarket/remove-comment
khojianvar Jun 18, 2024
0219079
Finished
SharafiddinMukhtorov Jun 18, 2024
fdbc713
Merge pull request #80 from DiyorMarket/AddLogOutButtonForPersonalPag…
SharafiddinMukhtorov Jun 18, 2024
0484c5b
Added Search
SharifovDeveloper Jun 18, 2024
f0258e0
Merge branch 'integration' of https://github.com/DiyorMarket/CheckDri…
SharifovDeveloper Jun 18, 2024
a29b612
Completed pagination
SharifovDeveloper Jun 18, 2024
ba7f1a5
Merge pull request #81 from DiyorMarket/AddPaginationToPersonalMechanic
SharifovDeveloper Jun 18, 2024
9f9db86
updated
SharifovDeveloper Jun 19, 2024
aad194c
Personal-Dispatcher-page
khojianvar Jun 19, 2024
1b14709
Merge pull request #82 from DiyorMarket/Dispatcher-page-Personal
khojianvar Jun 19, 2024
ce86996
add-accountId-to-Operator-and-Mechanic-pages
khojianvar Jun 20, 2024
f496b19
fix-code
khojianvar Jun 20, 2024
443544e
Merge pull request #83 from DiyorMarket/ImproveMechanics
khojianvar Jun 20, 2024
ee552fe
Added LougOut and Create Buttuns
SharafiddinMukhtorov Jun 20, 2024
483d09d
Merge pull request #85 from DiyorMarket/add-logout-buttun-for-all-per…
SharafiddinMukhtorov Jun 20, 2024
da4121e
upadte acceptance controller
SharifovDeveloper Jun 21, 2024
65a68bd
updated operatorReviewDataStore
SharifovDeveloper Jun 21, 2024
8fe89b4
updated acceptance's create view
SharifovDeveloper Jun 21, 2024
24a3ec4
Fixed errror
SharifovDeveloper Jun 21, 2024
4255f05
updated
SharifovDeveloper Jun 21, 2024
29913d0
updated
SharifovDeveloper Jun 21, 2024
d25236d
updated
SharifovDeveloper Jun 21, 2024
405069d
updated
SharifovDeveloper Jun 21, 2024
d3668df
Mechanic Pages full completed
SharifovDeveloper Jun 21, 2024
e394b5b
Merge pull request #86 from DiyorMarket/CompleteAcceptance
SharifovDeveloper Jun 21, 2024
3f0640c
Corrected
SharifovDeveloper Jun 22, 2024
05f5a08
Filtered cars
SharifovDeveloper Jun 22, 2024
759dc63
Merge pull request #87 from DiyorMarket/ImproveMechanicCreateView
SharifovDeveloper Jun 22, 2024
d12485f
Update dropdown loaction and improve filter buttom
diyorzz Jun 22, 2024
23a2887
Improve pagination , add Serach and add Filter with date to DoctorRe…
diyorzz Jun 23, 2024
e1a6b68
Improve the appearance of search buttons, add Filter and Search
diyorzz Jun 23, 2024
e3d760d
Improve pagination and add search with filter(date)
diyorzz Jun 24, 2024
42a81e4
Merge pull request #88 from DiyorMarket/Update-dropdown-location-and-…
diyorzz Jun 24, 2024
804c927
Updated
SharifovDeveloper Jun 24, 2024
02a93cb
Dispatcher-page
khojianvar Jun 24, 2024
82eb7f0
Merge branch 'integration' into Dispatcher-page-perosnal
khojianvar Jun 24, 2024
fb4987a
Merge pull request #89 from DiyorMarket/Dispatcher-page-perosnal
khojianvar Jun 24, 2024
7ddec8d
Completed Doctor's create view
SharifovDeveloper Jun 24, 2024
58a4927
dispatcher-page-fix
khojianvar Jun 24, 2024
bf98064
Merge pull request #90 from DiyorMarket/Dispatcher-page
khojianvar Jun 24, 2024
b9d0e04
updated
SharifovDeveloper Jun 25, 2024
111cf3c
DispatcherReview-Personal-Page
khojianvar Jun 25, 2024
74ce35f
updated
SharifovDeveloper Jun 25, 2024
6af63b4
updated
SharifovDeveloper Jun 25, 2024
a9785f8
CarName
khojianvar Jun 25, 2024
31c00cf
completed
SharifovDeveloper Jun 26, 2024
5fe512e
Completed PersonalOperatorReview
SharifovDeveloper Jun 26, 2024
d0595fd
Merge pull request #91 from DiyorMarket/ImproveCreates
SharifovDeveloper Jun 26, 2024
4450cfa
Car-fuel-code
khojianvar Jun 26, 2024
0c13158
Merge pull request #92 from DiyorMarket/Car-fuel-code
khojianvar Jun 26, 2024
7ebef80
Corrected PersonalOperatorrReviewController
SharifovDeveloper Jun 27, 2024
2595505
cleared unnecessary using
SharifovDeveloper Jun 27, 2024
c3e3d3f
Merge branch 'integration' into ImproveMechanicCreateView
SharifovDeveloper Jun 27, 2024
fc927ff
Merge pull request #93 from DiyorMarket/ImproveMechanicCreateView
SharifovDeveloper Jun 27, 2024
6dd555e
Revert "Merge pull request #93 from DiyorMarket/ImproveMechanicCreate…
SharifovDeveloper Jun 27, 2024
88bc23f
Update login page
AzamatG17 Jun 27, 2024
ae5c652
Merge pull request #94 from DiyorMarket/Update-Login-page-design
AzamatG17 Jun 27, 2024
1629a4b
Doctor-page-fix-codes
khojianvar Jun 28, 2024
9aeb31c
Dispatcher-page
khojianvar Jun 29, 2024
378e799
Merge pull request #95 from DiyorMarket/Doctor-page-fix-codes
khojianvar Jun 29, 2024
d44b28d
Completed
SharifovDeveloper Jun 29, 2024
6e92371
Merge branch 'integration' into CompletedCreateViews
SharifovDeveloper Jun 29, 2024
c0777d7
Merge pull request #96 from DiyorMarket/CompletedCreateViews
SharifovDeveloper Jun 29, 2024
748b2a8
Add links for LogOut dropdown and fixed Create buttuns
SharafiddinMukhtorov Jun 29, 2024
ed180ba
Merge branch 'integration' of https://github.com/DiyorMarket/CheckDri…
SharafiddinMukhtorov Jun 29, 2024
44ebb07
Add pagination and improve search to DoctorReviews
diyorzz Jun 29, 2024
ac0ccbd
Fix problem
diyorzz Jun 29, 2024
46a79f5
Merge pull request #97 from DiyorMarket/Add-Pagination-and-fix-search…
diyorzz Jun 29, 2024
4476ae1
fix-dodes
khojianvar Jun 29, 2024
be51c1a
Merge branch 'integration' of https://github.com/DiyorMarket/CheckDri…
khojianvar Jun 29, 2024
d35ca45
Improve Login
diyorzz Jun 29, 2024
fc4a3a6
Merge pull request #98 from DiyorMarket/Improve-Login
diyorzz Jun 29, 2024
6f7ae35
Add or update the Azure App Service build and deployment workflow config
Mirazyzz Jun 29, 2024
43bd345
Add pagination and fix search to Reviews
diyorzz Jun 29, 2024
efee2f6
Merge pull request #99 from DiyorMarket/Add-pagiantion-and-fix-search…
diyorzz Jun 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/integration_checkdriver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - CheckDriver

on:
push:
branches:
- integration
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
include-prerelease: true

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: windows-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
permissions:
id-token: write #This is required for requesting the JWT

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: .net-app

- name: Login to Azure
uses: azure/login@v1
with:
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E9AF348E5C5C43AA8D4DC6D5D7832550 }}
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_C81C36AF407F47E0841F8C513B2E4689 }}
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_548C4B80BB1545B19DFB28DE2B816ED6 }}

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'CheckDriver'
slot-name: 'Production'
package: .

2 changes: 1 addition & 1 deletion CheckDrive.Web/CheckDrive.Web.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CheckDrive.Web", "CheckDrive.Web\CheckDrive.Web.csproj", "{7F91792F-530C-4443-AC8D-04D956B346F4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CheckDrive.Web", "CheckDrive.Web\CheckDrive.Web.csproj", "{7F91792F-530C-4443-AC8D-04D956B346F4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
33 changes: 32 additions & 1 deletion CheckDrive.Web/CheckDrive.Web/CheckDrive.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Controllers\**" />
<Content Remove="Controllers\**" />
<EmbeddedResource Remove="Controllers\**" />
<None Remove="Controllers\**" />
<Compile Include="Controllers\AccountsController.cs" />
<Compile Include="Controllers\AuthController.cs" />
<Compile Include="Controllers\CarsController.cs" />
<Compile Include="Controllers\DashboardController.cs" />
<Compile Include="Controllers\DispatcherReviewsController.cs" />
<Compile Include="Controllers\DoctorReviewsController.cs" />
<Compile Include="Controllers\DoctorsController.cs" />
<Compile Include="Controllers\DriversController.cs" />
<Compile Include="Controllers\RolesController.cs" />
<Compile Include="Controllers\MechanicAcceptancesController.cs" />
<Compile Include="Controllers\MechanicHandoversController.cs" />
<Compile Include="Controllers\MechanicsController.cs" />
<Compile Include="Controllers\OperatorReviewsController.cs" />
<Compile Include="Controllers\OperatorsController.cs" />
<Compile Include="Controllers\TechniciansController.cs" />
<PackageReference Include="CheckDrive.ApiContracts" Version="1.3.5" />
<PackageReference Include="CheckDrive.DTOs" Version="1.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.2" />
<PackageReference Include="Syncfusion.EJ2.AspNet.Core" Version="25.1.42" />
<PackageReference Include="Syncfusion.Licensing" Version="25.2.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.6.0" />
<PackageReference Include="System.Security.Claims" Version="4.3.0" />

</ItemGroup>

</Project>
8 changes: 8 additions & 0 deletions CheckDrive.Web/CheckDrive.Web/Constants/Configurations.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace CheckDrive.Web.Constants
{
public static class Configurations
{
public const string JwtToken = "JwtToken";
public const string SynfusionLicenseKey = "Mgo+DSMBMAY9C3t2UFhhQlJBfVldWnxLflFyVWRTelx6cF1WESFaRnZdRl1mSH1TfkBgWXhXeXdV";
}
}
133 changes: 133 additions & 0 deletions CheckDrive.Web/CheckDrive.Web/Controllers/AccountsController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
using CheckDrive.ApiContracts.Account;
using CheckDrive.ApiContracts.Role;
using CheckDrive.Web.Stores.Accounts;
using CheckDrive.Web.Stores.Roles;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;

namespace CheckDrive.Web.Controllers
{
public class AccountsController : Controller
{
private readonly IAccountDataStore _accountDataStore;
private readonly IRoleDataStore _roleStore;
public AccountsController(IAccountDataStore accountDataStore, IRoleDataStore roleDataStore)
{
_roleStore = roleDataStore;
_accountDataStore = accountDataStore;
}

public async Task<IActionResult> Index(string? searchString, int? roleId, DateTime? birthDate, int? pageNumber)
{
var accounts = await _accountDataStore.GetAccountsAsync(searchString, roleId, birthDate, pageNumber);

var roles = await GETRoles();

roles.Insert(0, new RoleDto
{
Id = 0,
Name = "Barcha ishchilar",
});
var selectedRole = roles[0];

if (roleId.HasValue && roleId != 0)
{
selectedRole = roles.FirstOrDefault(x => x.Id == roleId);
}

ViewBag.Accounts = accounts.Data;
ViewBag.Roles = roles;

ViewBag.PageSize = accounts.PageSize;
ViewBag.PageCount = accounts.TotalPages;
ViewBag.TotalCount = accounts.TotalCount;
ViewBag.CurrentPage = accounts.PageNumber;
ViewBag.HasPreviousPage = accounts.HasPreviousPage;
ViewBag.HasNextPage = accounts.HasNextPage;

ViewBag.SearchString = searchString;
ViewBag.CurrentRoleId = roleId;
ViewBag.SelectedRole = selectedRole;

return View();
}
public async Task<IActionResult> Details(int id)
{
var account = await _accountDataStore.GetAccountAsync(id);
if (account == null)
{
return NotFound();
}
return View(account);
}
public async Task<IActionResult> Create()
{
var roles = await GETRoles();
ViewBag.Roles = new SelectList(roles, "Id", "Name");
return View();
}
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Login,Password,PhoneNumber,FirstName,LastName,Bithdate,RoleId")]
AccountForCreateDto account)
{
if (ModelState.IsValid)
{
await _accountDataStore.CreateAccountAsync(account);
return RedirectToAction(nameof(Index));
}
var roles = await GETRoles();
ViewBag.Roles = new SelectList(roles, "Id", "Name");
return View(account);
}

public async Task<IActionResult> Edit(int id)
{
var account = await _accountDataStore.GetAccountAsync(id);
if (account == null)
{
return NotFound();
}

return View(account);
}

[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,Login,Password,PhoneNumber,FirstName,LastName,Bithdate,RoleId")]
AccountForUpdateDto account)
{
if (ModelState.IsValid)
{
await _accountDataStore.UpdateAccountAsync(id, account);
return RedirectToAction(nameof(Index));
}
return View(account);
}

public async Task<IActionResult> Delete(int id)
{
var account = await _accountDataStore.GetAccountAsync(id);
if (account == null)
{
return NotFound();
}
return View(account);
}

[HttpPost, ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
await _accountDataStore.DeleteAccountAsync(id);
return RedirectToAction(nameof(Index));
}

private async Task<List<RoleDto>> GETRoles()
{
var roleResponse = await _roleStore.GetRoles();
var roles = roleResponse.Data.ToList();
return roles;
}
}
}
116 changes: 116 additions & 0 deletions CheckDrive.Web/CheckDrive.Web/Controllers/AuthController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
using CheckDrive.ApiContracts.Account;
using CheckDrive.Web.Stores.User;
using CheckDrive.Web.ViewModels;
using Microsoft.AspNetCore.Mvc;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;

namespace CheckDrive.Web.Controllers
{
public class AuthController : Controller
{
private readonly IUserDataStore _userDataStore;
public AuthController(IUserDataStore userDataStore)
{
_userDataStore = userDataStore;
}

public IActionResult Login()
{
HttpContext.Response.Cookies.Delete("tasty-cookies");
return RedirectToAction("Index", "Auth");
}

public IActionResult Index()
{
if (HttpContext.Request.Cookies.TryGetValue("tasty-cookies", out _))
{
string token = HttpContext.Request.Cookies["tasty-cookies"];
var tokenHandler = new JwtSecurityTokenHandler();
var jwtToken = tokenHandler.ReadToken(token) as JwtSecurityToken;
if (jwtToken == null)
{
return RedirectToAction("Login", "Account");
}
var roleId = jwtToken.Claims.First(claim => claim.Type == ClaimTypes.Role).Value;

switch (roleId)
{
case "1":
return RedirectToAction("Index", "Dashboard");
case "3":
return RedirectToAction("PersonalIndex", "DoctorReviews");
case "4":
return RedirectToAction("PersonalIndex", "OperatorReviews");
case "5":
return RedirectToAction("PersonalIndex", "DispatcherReviews");
case "6":
return RedirectToAction("PersonalIndex", "MechanicHandovers");
}
return RedirectToAction("Index", "Auth");
}
return View("Index");
}

[HttpPost]
public async Task<IActionResult> Index(AccountForLoginDto loginViewModel)
{
if (!ModelState.IsValid)
{
return View(loginViewModel);
}

var user = new AccountForLoginDto
{
Login = loginViewModel.Login,
Password = loginViewModel.Password,
};

var (success, token) = await _userDataStore.AuthenticateLoginAsync(user);

if (success)
{
HttpContext.Response.Cookies.Append("tasty-cookies", token, new CookieOptions
{
Secure = true,
SameSite = SameSiteMode.Strict,
HttpOnly = true,
IsEssential = true
});

var tokenHandler = new JwtSecurityTokenHandler();
var jwtToken = tokenHandler.ReadToken(token) as JwtSecurityToken;
if (jwtToken == null)
{
return RedirectToAction("Login", "Account");
}
var roleId = jwtToken.Claims.First(claim => claim.Type == ClaimTypes.Role).Value;
var accountId = jwtToken.Claims.First(claim => claim.Type == ClaimTypes.NameIdentifier).Value;

switch (roleId)
{
case "1":
return RedirectToAction("Index", "Dashboard");
case "3":
TempData["AccountId"] = accountId;
return RedirectToAction("PersonalIndex", "DoctorReviews");
case "4":
TempData["AccountId"] = accountId;
return RedirectToAction("PersonalIndex", "OperatorReviews");
case "5":
TempData["AccountId"] = accountId;
return RedirectToAction("PersonalIndex", "DispatcherReviews");
case "6":
TempData["AccountId"] = accountId;
return RedirectToAction("PersonalIndex", "MechanicHandovers");
default:
return RedirectToAction("Index", "Auth");
}
}

ModelState.AddModelError(string.Empty, "Invalid login attempt.");
ModelState.AddModelError("Password", "Incorrect password or login");
return View(loginViewModel);
}
}
}
Loading
Loading