diff --git a/.aws/admin-webapp.json b/.aws/admin-webapp.json new file mode 100644 index 00000000..5cf07e14 --- /dev/null +++ b/.aws/admin-webapp.json @@ -0,0 +1,35 @@ +{ + "family": "admin-webapp-task", + "networkMode": "awsvpc", + "requiresCompatibilities": ["FARGATE"], + "cpu": "256", + "memory": "512", + "executionRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskExecutionRole", + "containerDefinitions": [ + { + "name": "admin_webapp", + "image": "{{ECR_REGISTRY}}/admin-webapp-repo:latest", + "essential": true, + "portMappings": [ + { + "containerPort": 80, + "protocol": "tcp" + } + ], + "secrets": [ + { + "name": "REACT_APP_ADMIN_KEY", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:admin/api-key" + } + ], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/admin-webapp", + "awslogs-region": "{{AWS_REGION}}", + "awslogs-stream-prefix": "ecs" + } + } + } + ] +} diff --git a/.aws/backend.json b/.aws/backend.json new file mode 100644 index 00000000..84341b63 --- /dev/null +++ b/.aws/backend.json @@ -0,0 +1,80 @@ +{ + "family": "backend-task", + "networkMode": "awsvpc", + "requiresCompatibilities": ["FARGATE"], + "cpu": "512", + "memory": "1024", + "executionRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskExecutionRole", + "taskRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskRole", + "containerDefinitions": [ + { + "name": "backend", + "image": "{{ECR_REGISTRY}}/backend-repo:latest", + "essential": true, + "portMappings": [ + { + "containerPort": 3000, + "protocol": "tcp" + } + ], + "secrets": [ + { + "name": "MONGO_URI", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:backend/mongo-uri" + }, + { + "name": "MONGO_USER", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:backend/mongo-user" + }, + { + "name": "MONGO_PASSWORD", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:backend/mongo-password" + } + ], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/backend", + "awslogs-region": "{{AWS_REGION}}", + "awslogs-stream-prefix": "ecs" + } + }, + "mountPoints": [ + { + "sourceVolume": "ssl-certs", + "containerPath": "/etc/nginx/ssl", + "readOnly": true + }, + { + "sourceVolume": "app-data", + "containerPath": "/usr/src/app/src/data", + "readOnly": true + } + ] + } + ], + "volumes": [ + { + "name": "ssl-certs", + "efsVolumeConfiguration": { + "fileSystemId": "{{EFS_ID}}", + "transitEncryption": "ENABLED", + "authorizationConfig": { + "accessPointId": "{{EFS_SSL_ACCESS_POINT}}", + "iam": "ENABLED" + } + } + }, + { + "name": "app-data", + "efsVolumeConfiguration": { + "fileSystemId": "fs-XXXXX", + "transitEncryption": "ENABLED", + "authorizationConfig": { + "accessPointId": "{{EFS_DATA_ACCESS_POINT}}", + "iam": "ENABLED" + } + } + } + ] +} diff --git a/.aws/mongo.json b/.aws/mongo.json new file mode 100644 index 00000000..80732d46 --- /dev/null +++ b/.aws/mongo.json @@ -0,0 +1,86 @@ +{ + "family": "mongo-task", + "networkMode": "awsvpc", + "requiresCompatibilities": ["FARGATE"], + "cpu": "512", + "memory": "1024", + "executionRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskExecutionRole", + "taskRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskRole", + "containerDefinitions": [ + { + "name": "mongo", + "image": "mongo:7.0", + "essential": true, + "portMappings": [ + { + "containerPort": 27017, + "protocol": "tcp" + } + ], + "secrets": [ + { + "name": "MONGO_INITDB_ROOT_USERNAME", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:mongo/root-username" + }, + { + "name": "MONGO_INITDB_ROOT_PASSWORD", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:mongo/root-password" + }, + { + "name": "FIDESINNOVA_DB_USERNAME", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:mongo/db-username" + }, + { + "name": "FIDESINNOVA_DB_PASSWORD", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:mongo/db-password" + } + ], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/mongo", + "awslogs-region": "{{AWS_REGION}}", + "awslogs-stream-prefix": "ecs" + } + }, + "mountPoints": [ + { + "sourceVolume": "mongo-data", + "containerPath": "/data/db", + "readOnly": false + }, + { + "sourceVolume": "mongo-init", + "containerPath": "/docker-entrypoint-initdb.d", + "readOnly": true + } + ] + } + ], + "volumes": [ + { + "name": "mongo-data", + "efsVolumeConfiguration": { + "fileSystemId": "{{EFS_ID}}", + "transitEncryption": "ENABLED", + "rootDirectory": "/mongo-data", + "authorizationConfig": { + "accessPointId": "{{EFS_MONGO_DATA_ACCESS_POINT}}", + "iam": "ENABLED" + } + } + }, + { + "name": "mongo-init", + "efsVolumeConfiguration": { + "fileSystemId": "fs-XXXXX", + "transitEncryption": "ENABLED", + "rootDirectory": "/mongo-init-scripts", + "authorizationConfig": { + "accessPointId": "{{EFS_MONGO_INIT_ACCESS_POINT}}", + "iam": "ENABLED" + } + } + } + ] +} diff --git a/.aws/webapp.json b/.aws/webapp.json new file mode 100644 index 00000000..8d285bff --- /dev/null +++ b/.aws/webapp.json @@ -0,0 +1,35 @@ +{ + "family": "webapp-task", + "networkMode": "awsvpc", + "requiresCompatibilities": ["FARGATE"], + "cpu": "256", + "memory": "512", + "executionRoleArn": "arn:aws:iam::{{AWS_ACCOUNT_ID}}:role/ecsTaskExecutionRole", + "containerDefinitions": [ + { + "name": "webapp", + "image": "{{ECR_REGISTRY}}/webapp-repo:latest", + "essential": true, + "portMappings": [ + { + "containerPort": 80, + "protocol": "tcp" + } + ], + "secrets": [ + { + "name": "REACT_APP_API_KEY", + "valueFrom": "arn:aws:secretsmanager:{{AWS_REGION}}:{{AWS_ACCOUNT_ID}}:secret:webapp/api-key" + } + ], + "logConfiguration": { + "logDriver": "awslogs", + "options": { + "awslogs-group": "/ecs/webapp", + "awslogs-region": "{{AWS_REGION}}", + "awslogs-stream-prefix": "ecs" + } + } + } + ] +} diff --git a/.github/workflows/aws.yml b/.github/workflows/aws.yml deleted file mode 100644 index a8219c4c..00000000 --- a/.github/workflows/aws.yml +++ /dev/null @@ -1,94 +0,0 @@ -# This workflow will build and push a new container image to Amazon ECR, -# and then will deploy a new task definition to Amazon ECS, when there is a push to the "main" branch. -# -# To use this workflow, you will need to complete the following set-up steps: -# -# 1. Create an ECR repository to store your images. -# For example: `aws ecr create-repository --repository-name my-ecr-repo --region us-east-2`. -# Replace the value of the `ECR_REPOSITORY` environment variable in the workflow below with your repository's name. -# Replace the value of the `AWS_REGION` environment variable in the workflow below with your repository's region. -# -# 2. Create an ECS task definition, an ECS cluster, and an ECS service. -# For example, follow the Getting Started guide on the ECS console: -# https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/firstRun -# Replace the value of the `ECS_SERVICE` environment variable in the workflow below with the name you set for the Amazon ECS service. -# Replace the value of the `ECS_CLUSTER` environment variable in the workflow below with the name you set for the cluster. -# -# 3. Store your ECS task definition as a JSON file in your repository. -# The format should follow the output of `aws ecs register-task-definition --generate-cli-skeleton`. -# Replace the value of the `ECS_TASK_DEFINITION` environment variable in the workflow below with the path to the JSON file. -# Replace the value of the `CONTAINER_NAME` environment variable in the workflow below with the name of the container -# in the `containerDefinitions` section of the task definition. -# -# 4. Store an IAM user access key in GitHub Actions secrets named `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`. -# See the documentation for each action used below for the recommended IAM policies for this IAM user, -# and best practices on handling the access key credentials. - -name: Deploy to Amazon ECS - -on: - push: - branches: [ "main" ] - -env: - AWS_REGION: MY_AWS_REGION # set this to your preferred AWS region, e.g. us-west-1 - ECR_REPOSITORY: MY_ECR_REPOSITORY # set this to your Amazon ECR repository name - ECS_SERVICE: MY_ECS_SERVICE # set this to your Amazon ECS service name - ECS_CLUSTER: MY_ECS_CLUSTER # set this to your Amazon ECS cluster name - ECS_TASK_DEFINITION: MY_ECS_TASK_DEFINITION # set this to the path to your Amazon ECS task definition - # file, e.g. .aws/task-definition.json - CONTAINER_NAME: MY_CONTAINER_NAME # set this to the name of the container in the - # containerDefinitions section of your task definition - -permissions: - contents: read - -jobs: - deploy: - name: Deploy - runs-on: ubuntu-latest - environment: production - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Login to Amazon ECR - id: login-ecr - uses: aws-actions/amazon-ecr-login@v1 - - - name: Build, tag, and push image to Amazon ECR - id: build-image - env: - ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} - IMAGE_TAG: ${{ github.sha }} - run: | - # Build a docker container and - # push it to ECR so that it can - # be deployed to ECS. - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . - docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - echo "image=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" >> $GITHUB_OUTPUT - - - name: Fill in the new image ID in the Amazon ECS task definition - id: task-def - uses: aws-actions/amazon-ecs-render-task-definition@v1 - with: - task-definition: ${{ env.ECS_TASK_DEFINITION }} - container-name: ${{ env.CONTAINER_NAME }} - image: ${{ steps.build-image.outputs.image }} - - - name: Deploy Amazon ECS task definition - uses: aws-actions/amazon-ecs-deploy-task-definition@v1 - with: - task-definition: ${{ steps.task-def.outputs.task-definition }} - service: ${{ env.ECS_SERVICE }} - cluster: ${{ env.ECS_CLUSTER }} - wait-for-service-stability: true diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml new file mode 100644 index 00000000..83b5b662 --- /dev/null +++ b/.github/workflows/deploy-production.yml @@ -0,0 +1,124 @@ +name: Deploy to Main +permissions: + contents: read + +on: + push: + branches: [main] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: production + timeout-minutes: 20 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + + - name: Setup SSH connection via AWS SSM + run: | + # Install AWS CLI and Session Manager plugin + aws --version + + # Get instance ID from tag or direct ID + INSTANCE_ID="${{ secrets.AWS_INSTANCE_ID }}" + + echo "Instance ID: $INSTANCE_ID" + + - name: Deploy to main server + env: + INSTANCE_ID: ${{ secrets.AWS_INSTANCE_ID }} + run: | + aws ssm send-command \ + --instance-ids "$INSTANCE_ID" \ + --document-name "AWS-RunShellScript" \ + --parameters 'commands=[ + "set -e", + "PROJECT_DIR=\"/home/ubuntu/Blockchain-based-IoT-Server\"", + "PROJECT_NAME=\"main\"", + "echo \"πŸ“¦ Pulling latest changes...\"", + "cd $PROJECT_DIR", + "git fetch origin main", + "git reset --hard origin/main", + "echo \"πŸ”§ Stopping existing containers...\"", + "docker compose -p $PROJECT_NAME down --remove-orphans", + "echo \"πŸ—οΈ Building Docker images...\"", + "docker compose -p $PROJECT_NAME build --no-cache", + "echo \"πŸš€ Starting containers...\"", + "docker compose -p $PROJECT_NAME up -d", + "echo \"⏳ Waiting for services to be healthy...\"", + "sleep 10", + "echo \"πŸ“Š Container status:\"", + "docker compose -p $PROJECT_NAME ps", + "echo \"🧹 Cleaning up unused Docker resources...\"", + "docker image prune -af --filter \"until=24h\"", + "docker volume prune -f --filter \"label!=keep\"", + "echo \"βœ… Deployment completed successfully!\"" + ]' \ + --output text \ + --query "Command.CommandId" > command_id.txt + + COMMAND_ID=$(cat command_id.txt) + echo "Command ID: $COMMAND_ID" + + # Wait for command to complete + for i in {1..60}; do + STATUS=$(aws ssm get-command-invocation \ + --command-id "$COMMAND_ID" \ + --instance-id "$INSTANCE_ID" \ + --query "Status" \ + --output text) + + echo "Status: $STATUS" + + if [ "$STATUS" = "Success" ]; then + echo "βœ… Command completed successfully" + break + elif [ "$STATUS" = "Failed" ] || [ "$STATUS" = "Cancelled" ] || [ "$STATUS" = "TimedOut" ]; then + echo "❌ Command failed with status: $STATUS" + aws ssm get-command-invocation \ + --command-id "$COMMAND_ID" \ + --instance-id "$INSTANCE_ID" + exit 1 + fi + + sleep 5 + done + + - name: Verify deployment + env: + INSTANCE_ID: ${{ secrets.AWS_INSTANCE_ID }} + run: | + aws ssm send-command \ + --instance-ids "$INSTANCE_ID" \ + --document-name "AWS-RunShellScript" \ + --parameters 'commands=[ + "PROJECT_NAME=\"main\"", + "RUNNING=$(docker compose -p $PROJECT_NAME ps --status running --quiet | wc -l)", + "TOTAL=$(docker compose -p $PROJECT_NAME ps --quiet | wc -l)", + "echo \"Containers running: $RUNNING/$TOTAL\"", + "if [ \"$RUNNING\" -ne \"$TOTAL\" ]; then", + " echo \"❌ Not all containers are running!\"", + " docker compose -p $PROJECT_NAME logs --tail=50", + " exit 1", + "fi", + "echo \"βœ… All containers are running\"" + ]' \ + --output text \ + --query "Command.CommandId" > verify_command_id.txt + + COMMAND_ID=$(cat verify_command_id.txt) + + # Wait for verification + sleep 10 + aws ssm get-command-invocation \ + --command-id "$COMMAND_ID" \ + --instance-id "$INSTANCE_ID" diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml new file mode 100644 index 00000000..35e81562 --- /dev/null +++ b/.github/workflows/deploy-staging.yml @@ -0,0 +1,96 @@ +name: Deploy to Staging +permissions: + contents: read + +on: + push: + branches: [staging] + +jobs: + deploy: + runs-on: ubuntu-latest + environment: staging + timeout-minutes: 20 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup SSH key + run: | + mkdir -p ~/.ssh + echo "${{ secrets.STAGING_SSH_PRIVATE_KEY }}" > ~/.ssh/staging_key + chmod 600 ~/.ssh/staging_key + ssh-keyscan -H ${{ secrets.STAGING_SERVER }} >> ~/.ssh/known_hosts + + - name: Deploy to staging server + env: + HOSTNAME: ${{ secrets.STAGING_SERVER }} + USERNAME: ${{ secrets.STAGING_USER }} + run: | + ssh -i ~/.ssh/staging_key ${USERNAME}@${HOSTNAME} << 'EOF' + set -e + + PROJECT_DIR="/home/fidesinnova-stg" + PROJECT_NAME="staging" + + echo "πŸ“¦ Pulling latest changes..." + cd $PROJECT_DIR + git fetch origin staging + git reset --hard origin/staging + + echo "πŸ”§ Stopping existing containers..." + docker compose -p $PROJECT_NAME down --remove-orphans + + echo "πŸ—οΈ Building Docker images..." + docker compose -p $PROJECT_NAME build --no-cache + + echo "πŸš€ Starting containers..." + docker compose -p $PROJECT_NAME up -d + + echo "⏳ Waiting for services to be healthy..." + sleep 10 + + echo "πŸ“Š Container status:" + docker compose -p $PROJECT_NAME ps + + echo "🧹 Cleaning up unused Docker resources..." + docker image prune -af --filter "until=24h" + docker volume prune -f --filter "label!=keep" + + echo "βœ… Deployment completed successfully!" + EOF + + - name: Verify deployment + env: + HOSTNAME: ${{ secrets.STAGING_SERVER }} + USERNAME: ${{ secrets.STAGING_USER }} + run: | + ssh -i ~/.ssh/staging_key ${USERNAME}@${HOSTNAME} << 'EOF' + PROJECT_NAME="staging" + + # Check if all containers are running + RUNNING=$(docker compose -p $PROJECT_NAME ps --status running --quiet | wc -l) + TOTAL=$(docker compose -p $PROJECT_NAME ps --quiet | wc -l) + + echo "Containers running: $RUNNING/$TOTAL" + + if [ "$RUNNING" -ne "$TOTAL" ]; then + echo "❌ Not all containers are running!" + docker compose -p $PROJECT_NAME logs --tail=50 + exit 1 + fi + + echo "βœ… All containers are running" + EOF + + - name: Cleanup SSH key + if: always() + run: | + rm -f ~/.ssh/staging_key + + - name: Send notification on failure + if: failure() + run: | + echo "Deployment failed! Check the logs above for details." + # Add your notification service here (Slack, Discord, email, etc.) diff --git a/.gitignore b/.gitignore index 664c8e40..493301da 100644 --- a/.gitignore +++ b/.gitignore @@ -22,11 +22,9 @@ !/backend/uploads/sprites.png !/backend/uploads/fides_logo.png admin_web_app/Runner_webapp/frontend/* -!/admin_web_app/Runner_webapp/.env !admin_web_app/Runner_webapp/frontend/t.txt web_app/Runner_webapp/frontend/* !web_app/Runner_webapp/frontend/t.txt -!/web_app/Runner_webapp/.env # Project configuration files *webprivate.pem @@ -85,4 +83,6 @@ build *.local .codegpt package-lock.json -*/package-lock.json \ No newline at end of file +*/package-lock.json + +/nginx/** \ No newline at end of file diff --git a/README.md b/README.md index f5f93627..91be9833 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-# Step-by-step Installation Instructions for IoT Server +# Step-by-step Installation Instructions for IoT Server NPM Version Package License @@ -15,6 +15,7 @@ To install the back-end and front-end components of the Fidesinnova platform, including both the web app and mobile app, you can follow the steps below. These instructions assume that you have a basic understanding of setting up development environments and are familiar with JavaScript, Node.js, and related technologies. # Step A. Prepare operating system + To run `Blockchain-based-IoT-Server` effectively, the following system specifications are recommended: - **Operating System:** Ubuntu 24.04 LTS @@ -22,138 +23,87 @@ To run `Blockchain-based-IoT-Server` effectively, the following system specifica - **Storage:** 30 GB SSD minimum - **CPU:** Dual-core processor (x86_64 or ARM64) ---- +--- + ## URLs: + - **PANEL_URL: Consider a URL (sub-domain), e.g., panel.zksensor.tech, for your IoT server's users. We call it PANEL_URL in this ReadMe.** - **ADMIN_URL: Consider a URL (sub-domain), e.g., admin.zksensor.tech, for your IoT server's administrators. We call it ADMIN_URL in the ReadMe.** + --- _These requirements are suitable for typical IoT workloads. Actual needs may vary based on deployment scale and data volume._ -## A.1. Install MongoDB -- Install MongoDB version 8.0 for ARM64. -- If you have a x86 machine, please check the MongoDB documentation. -``` -sudo apt update -sudo apt upgrade -sudo apt install -y gnupg curl -curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor -echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-8.0.list -sudo apt update -sudo apt install -y mongodb-org -``` - -- Start the MongoDB service and test the database -``` -sudo systemctl start mongod -sudo systemctl start mongod.service -sudo systemctl enable mongod -``` - -- Set MongoDB password -Run `mongosh` -``` -mongosh -``` - -Set `ADMIN_USERNAME` and `ADMIN_PASSWORD`, and type the following lines in the `mongosh` terminal. Note that the password must contain only lowercase or uppercase characters or numbers. -``` -use admin -``` - -``` -db.createUser({ - user: "MONGODB_ADMIN_USERNAME", - pwd: "MONGODB_ADMIN_PASSWORD", - roles: [{ role: "root", db: "admin" }] -}) -``` -This account can be used later to connect to MongoDB using MongoDB Compass. - -Set `FIDESINNOVA_DB_USERNAME` and `FIDESINNOVA_DB_PASSWORD`, and type the following lines in the `mongosh` terminal. Note that the password must contain only lowercase or uppercase characters or numbers. -``` -use fidesinnova -``` +## A.1. Install nginx web server ``` -db.createUser({ - user: "FIDESINNOVA_DB_USERNAME", - pwd: "FIDESINNOVA_DB_PASSWORD", - roles: [{ role: "readWrite", db: "fidesinnova" }] -}) -``` -This account will be used later to let the system backend connects to the database. Save both credentials in a secure place. -Exit from the mongosh environment. -``` -exit +sudo apt update +sudo apt -y install nginx ``` +--- -- Edit the config file -``` -sudo nano /etc/mongod.conf -``` -Find the security section and enable authentication: -``` -security: - authorization: enabled -``` +## A.2. Install Docker -- Restart the MongoDb service -``` -sudo systemctl restart mongod -``` +Docker lets us run ZAP in a lightweight container without manual setup. Install and configure Docker: -- The MongoDB configuration is done. To conect to MongoDB, use `mongosh -u 'ADMIN_USERNAME' -p 'ADMIN_PASSWORD' --authenticationDatabase admin`. Also, to manage the MongoDB service, use the following commands: -``` -sudo systemctl status mongod -sudo systemctl stop mongod -sudo systemctl start mongod -sudo systemctl restart mongod -sudo systemctl disable mongod -sudo systemctl enable mongod -``` ---- -## A.2. Install nginx web server -``` +```bash sudo apt update -sudo apt -y install nginx +sudo apt install docker.io -y +sudo systemctl enable docker +sudo systemctl start docker +sudo usermod -aG docker $USER ``` ---- + ## A.3. Install Certbot + - First, stop the `nginx` + ``` sudo systemctl stop nginx ``` + - Now, install the `certbot` + ``` sudo apt-get update sudo apt-get install certbot ``` + - To manually obtain an SSL certificate for your domains without directly modifying your web server configurations, run the following command: + ``` sudo certbot certonly --standalone --preferred-challenges http ``` -- Make sure to create the certificate for domain and all subdomains -After running the command, enter your web app and admin web app domains separated by a space, like this: + +- Make sure to create the certificate for domain and all subdomains + After running the command, enter your web app and admin web app domains separated by a space, like this: + ``` PANEL_URL ADMIN_URL ``` + - The 'certbot' command generates `fullchain.pem` and `privkey.pem` in either `/etc/letsencrypt/admin.YOURDOMAIN.COM` or `/etc/letsencrypt/panel.YOURDOMAIN.COM`. -- Create the `ssl` folder inside `/etc/nginx` +- Create the `ssl` folder inside `/etc/nginx` + ``` sudo mkdir /etc/nginx/ssl ``` -- Copy both `fullchain.pem` and `privkey.pem` into `/etc/nginx/ssl`. + +- Copy both `fullchain.pem` and `privkey.pem` into `/etc/nginx/ssl`. + ``` sudo cp /etc/letsencrypt/live/PANEL_URL/fullchain.pem /etc/nginx/ssl/ sudo cp /etc/letsencrypt/live/PANEL_URL/privkey.pem /etc/nginx/ssl/ ``` + or + ``` sudo cp /etc/letsencrypt/live/ADMIN_URL/fullchain.pem /etc/nginx/ssl/ sudo cp /etc/letsencrypt/live/ADMIN_URL/privkey.pem /etc/nginx/ssl/ ``` + ---- + +--- + ## A.4. Update the `nginx.conf` file + - Replace the following configuration in your `nginx.conf` file located at `/etc/nginx/nginx.conf`. + ``` user www-data; worker_processes auto; @@ -192,7 +146,7 @@ http { # server_names_hash_bucket_size 64; # server_name_in_redirect off; - + default_type application/octet-stream; include /etc/nginx/mime.types; ## @@ -231,7 +185,7 @@ http { location / { proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization; - proxy_pass https://localhost:4000; + proxy_pass http://localhost:4000; } # This section is for Server Backend on port 6000 @@ -252,31 +206,25 @@ http { location / { proxy_set_header Authorization $http_authorization; proxy_pass_header Authorization; - proxy_pass https://localhost:5000; + proxy_pass http://localhost:5000; } } } ``` - -- Restart Nginx + +- Restart Nginx + ``` sudo systemctl restart nginx ``` ---- -## A.5. Install Node.js and NestJS -``` -sudo apt update -sudo apt install -y curl build-essential -curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - -sudo apt install -y nodejs -sudo npm install -g n -sudo n 22.14.0 -sudo npm i -g @nestjs/cli -``` ---- -## A.6. Configure Firewall + +--- + +## A.6. Configure Firewall + - Install `ufw`, allow OpenSSH connection, allow nginx connection. Then, allow ports 4000, 5000, and 6000 on the server for Mobile App, Web App, and Admin Web App, respectively. Also, open ports 8883 and 8081 to let IoT devices to connect to the MQTT broker and the web socket, respectively. + ``` sudo apt install ufw sudo ufw allow OpenSSH @@ -287,53 +235,95 @@ sudo ufw allow 6000 sudo ufw allow 8883 sudo ufw allow 8081 ``` + - Note: If you’re using Amazon EC2 or a similar platform, ensure that inbound traffic for TCP 8883 is open. This port is required for secure MQTT communication between the IoT server and users’ IoT devices. - Enable the firewall + ``` sudo ufw enable ``` + - Check the firewall status + ``` sudo ufw status ``` ---- + +--- + ## A.7. Clone the project + - Install `git` + ``` sudo apt install git ``` + - Clone the project + ``` cd /home sudo git clone https://github.com/TheArchitect2000/Blockchain-based-IoT-Server.git ``` ### Continue with Step B if you want to install a new node, or jump to Step C if you want to restore your node from a previous backup. ---- + +--- + # Step B. Configure a New Node -## B.1. Generate two JWT secret keys + +## B.1. Generate two JWT secret keys + - Generate an access secret key (256-bit / 32-byte) + ``` openssl rand -hex 32 ``` - Generate a refresh secret key (256-bit / 32-byte) + ``` openssl rand -hex 32 ``` ---- -## B.2. Backend configurations + +--- + +## B.2 create node in root of project + +``` +sudo nano .env +``` + +- Insert the following values: + +``` +BACK_PORT=6000 +WEBAPP_PORT=4000 +ADMIN_WEBAPP_PORT=5000 + +# Mongo Database Configuration +MONGO_DATABASE_NAME=fidesinnova +MONGO_DATABASE_PORT=27017 +MONGO_USER=fidesinnova_user +MONGO_PASSWORD=FIDESINNOVA_DB_PASSWORD +MONGO_INITDB_ROOT_USERNAME=admin +MONGO_INITDB_ROOT_PASSWORD=supersecretadmin +``` + +## B.3. Backend configurations + - In project root folder, create `.env` file and edit parameters based on your node URL info + ``` cd /home/Blockchain-based-IoT-Server/backend sudo nano .env ``` -- Inside the `.env` file, paste the following parameters. Note that your user web app URL is "PANEL_URL" (e.g., "panel.zksensor.com"). +- Inside the `.env` file, paste the following parameters. Note that your user web app URL is "PANEL_URL" (e.g., "panel.zksensor.com"). ``` # Set this with your node URL (e.g., 'zksensor.com') -PANEL_URL='YOUR_NODE_DOMAIN' +PANEL_URL='YOUR_NODE_DOMAIN' # Set this with your node admin URL (e.g., 'admin.zksensor.com') ADMIN_URL='YOUR_NODE_ADMIN_DOMAIN' @@ -341,7 +331,6 @@ ADMIN_URL='YOUR_NODE_ADMIN_DOMAIN' # Set this with your node name (e.g., 'zkSensor') NODE_NAME='YOUR_NODE_NAME' -SWAGGER_LOCAL_SERVER=http://localhost:5000 # RPC URL - This is the address of a blockchain node in the network that provides RPC sevice to your IoT server RPC_URL='https://rpc1.fidesinnova.io' @@ -357,12 +346,16 @@ CRYPTION_SALT=10 # Syslog Server Configuration SYSLOG_SERVER_ENABLED='True' -SYSLOG_SERVER_HOST='192.168.1.100' +SYSLOG_SERVER_HOST='YOUR_SYSLOG_SERVER' SYSLOG_SERVER_PORT=514 -SYSLOG_SERVER_LEVEL=3 +SYSLOG_SERVER_LEVEL=7 SYSLOG_SERVER_USERNAME='' SYSLOG_SERVER_PASSWORD='' +# Internal logging +INTERNAL_LOGGING_ENABLED='True' +MAX_LOG_FILE_SIZE_PER_MB='12' + # Server Configuration HOST_PROTOCOL='https://' HOST_PORT='6000' @@ -378,7 +371,7 @@ MONGO_DATABASE_NAME='fidesinnova' MONGO_USER='FIDESINNOVA_DB_USERNAME' MONGO_PASSWORD='FIDESINNOVA_DB_PASSWORD' MONGO_PORT=27017 -MONGO_HOST=127.0.0.1 +MONGO_HOST=mongo # Email Configuration NOTIFICATION_BY_MAIL='enabled' @@ -394,11 +387,11 @@ MAIL_USER='noreply@YOUR_NODE_DOMAIN' MAIL_PASSWORD='YOUR_MAIL_SERVER_PASSWORD' MAIL_FROM='noreply@YOUR_NODE_DOMAIN' # optional -MAIL_TRANSPORT=smtp://${MAIL_USER}:${MAIL_PASSWORD}@${MAIL_HOST} +MAIL_TRANSPORT=smtp://${MAIL_USER}:${MAIL_PASSWORD}@${MAIL_HOST} # Application color codes in hex. Please write it without '#'. Exmaple: #4e46e7 -> 4e46e7 -# This text color is for Mobile App -THEME_TEXT='ffffff' +# This text color is for Mobile App +THEME_TEXT='ffffff' # These colors are for Web App and Mobile App THEME_BACKGROUND='1D293D' THEME_BOX='1D293D' @@ -418,7 +411,7 @@ REFRESH_TOKEN_SECRET_KEY='YOUR_REFRESH_SECRET_KEY' REFRESH_TOKEN_ALGORITHM='HS384' # your admins emails that can make other users into admin or developer -SUPER_ADMIN_EMAILS=['SERVER_ADMIN_EMAIL@EXAMPLE.COM'] +SUPER_ADMIN_EMAILS=['SERVER_ADMIN_EMAIL@EXAMPLE.COM'] # Multer Configuration # Multer is a node.js middleware for handling multipart/form-data, which is primarily used for uploading files. @@ -431,10 +424,12 @@ COMMITMENT_MANAGEMENT='0x96259fba1f845b42c257f72088dd38c7e8540504' ZKP_STORAGE='0x897264b7d872e07a3d8e1d22b199f12cfb4bb26d' NODE_SERVICE_DEVICE_MANAGEMENT='0x4b08ea934e6bfb7c72a376c842c911e1dd2aa74f' ``` -- Create two wallets address on Fidesinnova network for the admin and the faucet. To learn how to connect your wallet to fides network, please [watch this video on YouTube](https://www.youtube.com/watch?v=3GVfyu4uzhs) + +- Create two wallets address on Fidesinnova network for the admin and the faucet. To learn how to connect your wallet to fides network, please [watch this video on YouTube](https://www.youtube.com/watch?v=3GVfyu4uzhs) - Email only the wallet addresses (excluding private keys) to info@fidesinnova.io and ask to receive some tokens for your node operation. The admin address will be authorized on the network. The faucet address will be used to distribute tokens to your users on your server. -Never share your account’s private key with anyone. + Never share your account’s private key with anyone. - Update these parameters in the file: + ``` # Set this with your node URL (e.g., 'zksensor.com') PANEL_URL='YOUR_NODE_DOMAIN' @@ -460,8 +455,8 @@ MAIL_PASSWORD='YOUR_MAIL_SERVER_PASSWORD' MAIL_FROM='noreply@YOUR_NODE_DOMAIN' # Application color codes in hex. Please write it without '#'. Exmaple: #4e46e7 -> 4e46e7 -# This text color is for Mobile App -THEME_TEXT='ffffff' +# This text color is for Mobile App +THEME_TEXT='ffffff' # These colors are for Web App and Mobile App THEME_BACKGROUND='1D293D' THEME_BOX='1D293D' @@ -480,19 +475,21 @@ NODE_SERVICE_DEVICE_MANAGEMENT='0x4b08ea934e6bfb7c72a376c842c911e1dd2aa74f' ``` - Please update only the necessary values in the `.env` file, and make sure **not to add any extra spaces** before or after the `=` sign. For example: + ```ini -THEME_BOX='0xabcd' βœ”οΈ Correct -THEME_BOX ='0xabcd' ❌ Incorrect -THEME_BOX= '0xabcd' ❌ Incorrect -THEME_BOX = '0xabcd' ❌ Incorrect +THEME_BOX='0xabcd' βœ”οΈ Correct +THEME_BOX ='0xabcd' ❌ Incorrect +THEME_BOX= '0xabcd' ❌ Incorrect +THEME_BOX = '0xabcd' ❌ Incorrect ``` + - Additionally, ensure that **no comments** are placed on the same line as any parameter. + ```ini -API_KEY='123456' βœ”οΈ Correct -API_KEY='123456' # key ❌ Incorrect +API_KEY='123456' βœ”οΈ Correct +API_KEY='123456' # key ❌ Incorrect ``` - ### πŸ”” Enable Node Mobile Notifications To enable mobile notifications on your Node server, follow these steps: @@ -510,21 +507,29 @@ To enable mobile notifications on your Node server, follow these steps: 3. **Paste JSON Content** Open the file with `nano`, then paste the full content of the `firebase-adminsdk.json` file you received. ---- -## B.3. Web App Logo -- Copy your logo in `.png` format with the `logo` name as `logo.png` in `\home\Blockchain-based-IoT-Server\backend\uploads` folder on your server. ---- -## B.4. Device Configuration File + +--- + +## B.4. Web App Logo + +- Copy your logo in `.png` format with the `logo` name as `logo.png` in `\home\Blockchain-based-IoT-Server\backend\uploads` folder on your server. + +--- + +## B.5. Device Configuration File + - Fidesinnova offers a mobile app to control IoT devices that support the MQTT protocol. The device configuration files, which specify the IoT device types, are stored on the IoT server. In this section, we will review how to create a device configuration file on the server. Each device in the configuration file is represented by an image, a title, a type, and its parameters: - **fileName**: Refers to the image file that should be placed in the `/Blockchain-based-IoT-Server/backend/uploads/device` directory. This image will be displayed in the mobile app (e.g., "ecard.png"). - **title**: The display name for the device (e.g., "E-Card"). - **type**: Device type identifier (e.g., "E-CARD"). -- **Device Parameters**: Parameters specify data points each device supports. These parameters will be passed to the web app Blockly editor for creating new services. +- **Device Parameters**: Parameters specify data points each device supports. These parameters will be passed to the web app Blockly editor for creating new services. - If a parameter’s `value` is an empty array `[]`, it indicates dynamic data input. - If `value` has specific options (e.g., `["Open", "Close"]`), it will show these options in the Blockly dropdown as predefined outputs. -### B.4.1. Edit the `devices.json` file +### B.5.1. Edit the `devices.json` file + - Create `devices.json` file in the `backend/src/data/` in the project folder + ``` cd /home/Blockchain-based-IoT-Server/backend/src sudo mkdir data @@ -533,6 +538,7 @@ sudo nano devices.json ``` - Copy the following config in your `devices.json` file if you would like to use zkSensor's devices. Please note that you can edit this file and add your own IoT devices. When you add your new IoT device make sure you upload a `.png` file in `/home/Blockchain-based-IoT-Server/backend/uploads/devices`. We hae already copied three `zksensor-ecard.png`, `zksensor-minisensor.png`, and `zksensor-zk-multisensor.png` files in this folder for the following devices. + ```json [ { @@ -607,62 +613,53 @@ sudo nano devices.json } ] ``` ---- -## B.5. Install Panel Web App for users -- In `Source_webapp` folder, create `.env` file. + +--- + +## B.6. Initial Panel Web App for users + ``` -cd /home/Blockchain-based-IoT-Server/web_app/Source_webapp +cd /home/Blockchain-based-IoT-Server/web_app/ sudo nano .env ``` + Enter the following lines in the .env file and replace `YOUR_NODE_NAME` with your actual node name. + ``` VITE_URL='https://PANEL_URL/app/' VITE_NODE_NAME='YOUR_NODE_NAME' VITE_RPC_URL='https://rpc1.fidesinnova.io' +MQTT_WEBSOCKET_PORT=8082 +PORT=4000 ``` ---- -## B.6. Install Admin Web App for administrator -- In `Source_webapp` folder, create `.env` file. + +--- + +## B.7. Initial Admin Web App for administrator + ``` -cd /home/Blockchain-based-IoT-Server/admin_web_app/Source_webapp +cd /home/Blockchain-based-IoT-Server/admin_web_app sudo nano .env ``` + Enter the following lines in the .env file and replace `YOUR_NODE_NAME` with your actual node name. + ``` VITE_URL='https://PANEL_URL/app/' VITE_NODE_NAME='YOUR_NODE_NAME' VITE_RPC_URL='https://rpc1.fidesinnova.io' +PORT=5000 ``` ---- -# C. Restore Node from Backup -- Create the 'backups' folder. - ``` - cd /home/Blockchain-based-IoT-Server/ - sudo mkdir backups - ``` -- Copy your backup file (e.g. iot_server_backup_2025-02-12.tar.gz ) to this folder. -- Execute the restore script file + +## B.8. Run the app + ``` - cd /home/Blockchain-based-IoT-Server/ - sudo chmod +x restore.sh - sudo ./restore.sh +docker compose -p $PROJECT_NAME build --no-cache +docker compose -p $PROJECT_NAME up -d ``` -# D. Build and Execute ---- -## D.1. Build the System -To automate the setup and build processes for both the backend and frontend applications, run the `initial_setup.sh` script located in the root directory of the project. This script will handle building both the backend and frontend applications and configuring systemctl services automatically. - ``` - cd /home/Blockchain-based-IoT-Server/ - sudo chmod +x initial_setup.sh - sudo ./initial_setup.sh - ``` ---- -## D.2. Account Setup -- Goto `https://PANEL_URL` and go to the 'Sign up' section and create a password for your `super admin email address`. -- Goto `https://ADMIN_URL` and login with your `super admin email address` and its password. ---- -## D.3. Congratulations +## C.1. Congratulations + - Panel Web App, `https://PANEL_URL` is for your regular users. - Admin Web App, `https://ADMIN_URL` is for your super admin users. - Contact FidesInnova at info@fidesinnova.io to add your Web App URLs to the FidesInnova website. These are already registered IoT Servers: @@ -672,38 +669,12 @@ To automate the setup and build processes for both the backend and frontend appl - [https://panel.energywisenetwork.com](https://panel.energywisenetwork.com/) - [https://panel.trustsense.tech](https://panel.trustsense.tech/) -# E. Maintenance ---- -## E.1. Update IoT Server -- Every time the Fides Innova core development team pushes a new version of the code on GitHub. -- **Note:** Make sure to check the name of the repository, and if needed, update the folder name using the following command: -``` -mv IoT-Server Blockchain-based-IoT-Server -``` -Use the following commands to pull and update your local repository from GitHub: -``` -cd /home/Blockchain-based-IoT-Server/ -sudo git fetch -sudo git pull -``` +# D. Maintenance + +## D.1. Troubleshooting -- Every time you pull a new version of the server code from GitHub or you make a change to any `.env` files in the system, you should apply the changes to your production server via update script. -``` -cd /home/Blockchain-based-IoT-Server/ -sudo chmod +x update.sh -sudo ./update.sh -``` ---- -## E.2. Backup IoT Server -- Every time you want to get a backup from your server, you should execute the following script and get your backup file in the 'backups' folder. -``` -cd /home/Blockchain-based-IoT-Server/ -sudo chmod +x backup.sh -sudo ./backup.sh -``` ---- -## E.3. Troubleshooting - Useful commands for troubleshooting + ``` # to make file writable and other permissions : chmod +rwx chainthreed @@ -729,76 +700,23 @@ mv source target # delete a directory or file rm -rf directoryName -# View logs for a specific service (last 1 minute): -sudo journalctl -u fides.backend.service --no-pager --since "1 minute ago" -sudo journalctl -u fides.userwebapp.service --no-pager --since "1 minute ago" -sudo journalctl -u fides.adminwebapp.service --no-pager --since "1 minute ago" - -# View the latest logs for a service: -sudo journalctl -u fides.backend.service -f -sudo journalctl -u fides.userwebapp.service -f -sudo journalctl -u fides.adminwebapp.service -f +# View logs for a specific continer (last 1 minute): +sudo docker compose logs $service-name -f -# Show logs for a service since a specific time: -sudo journalctl -u fides.backend.service --since "2025-06-08 10:00:00" -sudo journalctl -u fides.userwebapp.service --since "2025-06-08 10:00:00" -sudo journalctl -u fides.adminwebapp.service --since "2025-06-08 10:00:00" - -# Show logs for all systemd services: -sudo journalctl -xe # Check the status of a service: -systemctl status fides.backend.service -systemctl status fides.userwebapp.service -systemctl status fides.adminwebapp.service +sudo docker ps -# Restart a service: -sudo systemctl restart fides.backend.service -sudo systemctl restart fides.userwebapp.service -sudo systemctl restart fides.adminwebapp.service +# Restart continers: +sudo docker compose -p $stage-name build # Stop a service: -sudo systemctl stop fides.backend.service -sudo systemctl stop fides.userwebapp.service -sudo systemctl stop fides.adminwebapp.service - -# Enable a service to start on boot: -sudo systemctl enable fides.backend.service -sudo systemctl enable fides.userwebapp.service -sudo systemctl enable fides.adminwebapp.service +sudo docker stop $service-name -# Disable a service from starting on boot: -sudo systemctl disable fides.backend.service -sudo systemctl disable fides.userwebapp.service -sudo systemctl disable fides.adminwebapp.service +#See syslogs +sudo tail -f /var/log/syslog | grep -v UFW -# List all active systemd services: -systemctl list-units --type=service -``` ---- -## E.4. Web App Ports -- Change the Panel Web App Port -In `Runner_webapp` folder, create `.env` file. ``` -cd /home/Blockchain-based-IoT-Server/web_app/Runner_webapp -sudo nano .env -``` -Change the port number in the following line. -``` -PORT=4000 -``` - -- Change the Admin Web App Port -- In `Runner_webapp` folder, create `.env` file. -``` -cd /home/Blockchain-based-IoT-Server/admin_web_app/Runner_webapp -sudo nano .env -``` -Change the port number in the following line. -``` -PORT=5000 -``` -Note: If you change these two ports, please make sure you consult with the Fides Innova repository manager to avoid any future git push conflicts. --- @@ -823,18 +741,6 @@ openjdk version "11.0.20" 2023-07-18 OpenJDK Runtime Environment (build 11.0.20+8-Ubuntu) ``` -## 🐳 2. Install Docker - -Docker lets us run ZAP in a lightweight container without manual setup. Install and configure Docker: - -```bash -sudo apt update -sudo apt install docker.io -y -sudo systemctl enable docker -sudo systemctl start docker -sudo usermod -aG docker $USER -``` - ## 🧰 3. Pull OWASP ZAP Docker Image Download the official stable ZAP image: @@ -876,10 +782,10 @@ panel.zksensor.tech Once the scan is complete, the following files will appear in your `/home/security-report` folder: -- `zap-report.html` β€” Main visual report (open this in any browser) +- `zap-report.html` β€” Main visual report (open this in any browser) - `zap.yaml` β€” Scan configuration and results in YAML format To review the results: -1. Download the `/home/security-report` folder to your local machine. +1. Download the `/home/security-report` folder to your local machine. 2. Open `zap-report.html` in a browser to inspect potential vulnerabilities. diff --git a/admin_web_app/Source_webapp/.eslintignore b/admin_web_app/.eslintignore similarity index 100% rename from admin_web_app/Source_webapp/.eslintignore rename to admin_web_app/.eslintignore diff --git a/admin_web_app/Source_webapp/.eslintrc.cjs b/admin_web_app/.eslintrc.cjs similarity index 100% rename from admin_web_app/Source_webapp/.eslintrc.cjs rename to admin_web_app/.eslintrc.cjs diff --git a/admin_web_app/Source_webapp/.prettierignore b/admin_web_app/.prettierignore similarity index 100% rename from admin_web_app/Source_webapp/.prettierignore rename to admin_web_app/.prettierignore diff --git a/admin_web_app/Source_webapp/.prettierrc b/admin_web_app/.prettierrc similarity index 100% rename from admin_web_app/Source_webapp/.prettierrc rename to admin_web_app/.prettierrc diff --git a/admin_web_app/Dockerfile b/admin_web_app/Dockerfile new file mode 100644 index 00000000..d2730aa1 --- /dev/null +++ b/admin_web_app/Dockerfile @@ -0,0 +1,21 @@ + +FROM node:20-alpine AS builder +WORKDIR /usr/src/app + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN npm run build + + +FROM nginx:alpine AS runner + + +COPY --from=builder /usr/src/app/build /usr/share/nginx/html + + +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/admin_web_app/Runner_webapp/.env b/admin_web_app/Runner_webapp/.env deleted file mode 100644 index d8e22ad6..00000000 --- a/admin_web_app/Runner_webapp/.env +++ /dev/null @@ -1 +0,0 @@ -PORT=5000 diff --git a/admin_web_app/Runner_webapp/main.js b/admin_web_app/Runner_webapp/main.js deleted file mode 100644 index 9f49e13c..00000000 --- a/admin_web_app/Runner_webapp/main.js +++ /dev/null @@ -1,27 +0,0 @@ -const express = require("express"); -require("dotenv").config(); - -const https = require("https"); -const fs = require("fs"); - -var key = fs.readFileSync("/etc/nginx/ssl/privkey.pem"); //* -var cert = fs.readFileSync("/etc/nginx/ssl/fullchain.pem"); //* -var options = { - key: key, - cert: cert, -}; - -const port = process.env.PORT; - -const app = express(); - -app.use(express.static(__dirname + "/frontend")); -app.use("/*", (req, res) => { - res.sendFile(__dirname + "/frontend/index.html"); -}); - -const httpsServer = https.createServer(options, app); - -httpsServer.listen(port, () => { - console.log(`⚑️[server]: Server is running at http://localhost:${port}`); -}); diff --git a/admin_web_app/Runner_webapp/package.json b/admin_web_app/Runner_webapp/package.json deleted file mode 100644 index a8b61504..00000000 --- a/admin_web_app/Runner_webapp/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "blocklychain_web_app", - "version": "1.0.0", - "description": "Blocklychain Web Application", - "main": "main.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@types/express": "^5.0.3", - "@types/node": "^20.2.5", - "dotenv": "^16.1.4", - "express": "^5.1.0", - "i": "^0.3.7" - }, - "devDependencies": { - "eslint": "^9.36.0" - } -} diff --git a/admin_web_app/Runner_webapp/tsconfig.json b/admin_web_app/Runner_webapp/tsconfig.json deleted file mode 100644 index fbfa98db..00000000 --- a/admin_web_app/Runner_webapp/tsconfig.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist", /* Specify an output folder for all emitted files. */ - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - - } -} diff --git a/admin_web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts b/admin_web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts deleted file mode 100644 index 55107444..00000000 --- a/admin_web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Server, Response } from 'miragejs' -import uniqueId from 'lodash/uniqueId' -import isEmpty from 'lodash/isEmpty' - -export default function authFakeApi(server: Server, apiPrefix: string) { - server.post(`${apiPrefix}/sign-in`, (schema, { requestBody }) => { - const { userName, password } = JSON.parse(requestBody) - const user = schema.db.signInUserData.findBy({ - accountUserName: userName, - password, - }) - console.log('user', user) - if (user) { - const { avatar, userName, email, authority } = user - return { - user: { avatar, userName, email, authority }, - token: 'wVYrxaeNa9OxdnULvde1Au5m5w63', - } - } - return new Response( - 401, - { some: 'header' }, - { message: 'Invalid email or password!' } - ) - }) - - server.post(`${apiPrefix}/sign-out`, () => { - return true - }) - - server.post(`${apiPrefix}/sign-up`, (schema, { requestBody }) => { - const { userName, password, email } = JSON.parse(requestBody) - const userExist = schema.db.signInUserData.findBy({ - accountUserName: userName, - }) - const emailUsed = schema.db.signInUserData.findBy({ email }) - const newUser = { - avatar: '/img/avatars/thumb-1.jpg', - userName, - email, - authority: ['admin', 'user'], - } - if (!isEmpty(userExist)) { - const errors = [ - { message: '', domain: 'global', reason: 'invalid' }, - ] - return new Response( - 400, - { some: 'header' }, - { errors, message: 'User already exist!' } - ) - } - - if (!isEmpty(emailUsed)) { - const errors = [ - { message: '', domain: 'global', reason: 'invalid' }, - ] - return new Response( - 400, - { some: 'header' }, - { errors, message: 'Email already used' } - ) - } - - schema.db.signInUserData.insert({ - ...newUser, - ...{ id: uniqueId('user_'), password, accountUserName: userName }, - }) - return { - user: newUser, - token: 'wVYrxaeNa9OxdnULvde1Au5m5w63', - } - }) - - server.post(`${apiPrefix}/forgot-password`, () => { - return true - }) - - server.post(`${apiPrefix}/reset-password`, () => { - return true - }) -} diff --git a/admin_web_app/Source_webapp/index.html b/admin_web_app/index.html similarity index 100% rename from admin_web_app/Source_webapp/index.html rename to admin_web_app/index.html diff --git a/admin_web_app/nginx.conf b/admin_web_app/nginx.conf new file mode 100644 index 00000000..e48fc65c --- /dev/null +++ b/admin_web_app/nginx.conf @@ -0,0 +1,36 @@ +server { + listen 80; + listen [::]:80; + + root /usr/share/nginx/html; + index index.html; + + # Gzip compression + gzip on; + gzip_vary on; + gzip_min_length 1024; + gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/javascript application/json; + + # SPA routing - serve index.html for all routes + location / { + try_files $uri $uri/ /index.html; + } + + # Proxy API requests to backend + location /app { + proxy_pass http://backend:6000; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Authorization $http_authorization; + proxy_pass_header Authorization; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +} \ No newline at end of file diff --git a/admin_web_app/Source_webapp/package.json b/admin_web_app/package.json similarity index 98% rename from admin_web_app/Source_webapp/package.json rename to admin_web_app/package.json index 2605c6d2..b56ee4d8 100644 --- a/admin_web_app/Source_webapp/package.json +++ b/admin_web_app/package.json @@ -27,7 +27,7 @@ "@tanstack/react-table": "^8.8.5", "@types/leaflet": "^1.9.12", "@visx/pattern": "^3.0.0", - "apexcharts": "^3.37.3", + "apexcharts": "^5.3.5", "axios": "^1.3.4", "blockly": "^10.4.3", "classnames": "^2.3.2", @@ -47,7 +47,7 @@ "mqtt-vue-hook": "^1.2.20", "popper.js": "^1.16.1", "react": "^18.2.0", - "react-apexcharts": "^1.4.0", + "react-apexcharts": "^1.8.0", "react-beautiful-dnd": "^13.1.1", "react-blockly": "^8.1.1", "react-custom-scrollbars-2": "^4.5.0", diff --git a/admin_web_app/Source_webapp/postcss.config.cjs b/admin_web_app/postcss.config.cjs similarity index 100% rename from admin_web_app/Source_webapp/postcss.config.cjs rename to admin_web_app/postcss.config.cjs diff --git a/admin_web_app/Source_webapp/public/New folder/logo192.png b/admin_web_app/public/New folder/logo192.png similarity index 100% rename from admin_web_app/Source_webapp/public/New folder/logo192.png rename to admin_web_app/public/New folder/logo192.png diff --git a/admin_web_app/Source_webapp/public/New folder/logo512.png b/admin_web_app/public/New folder/logo512.png similarity index 100% rename from admin_web_app/Source_webapp/public/New folder/logo512.png rename to admin_web_app/public/New folder/logo512.png diff --git a/admin_web_app/Source_webapp/public/data/features.json b/admin_web_app/public/data/features.json similarity index 100% rename from admin_web_app/Source_webapp/public/data/features.json rename to admin_web_app/public/data/features.json diff --git a/admin_web_app/Source_webapp/public/data/order-list.csv b/admin_web_app/public/data/order-list.csv similarity index 100% rename from admin_web_app/Source_webapp/public/data/order-list.csv rename to admin_web_app/public/data/order-list.csv diff --git a/admin_web_app/Source_webapp/public/data/product-list.csv b/admin_web_app/public/data/product-list.csv similarity index 100% rename from admin_web_app/Source_webapp/public/data/product-list.csv rename to admin_web_app/public/data/product-list.csv diff --git a/admin_web_app/Source_webapp/public/data/unemployment-by-county-2017.csv b/admin_web_app/public/data/unemployment-by-county-2017.csv similarity index 100% rename from admin_web_app/Source_webapp/public/data/unemployment-by-county-2017.csv rename to admin_web_app/public/data/unemployment-by-county-2017.csv diff --git a/admin_web_app/Source_webapp/public/favicon.ico b/admin_web_app/public/favicon.ico similarity index 100% rename from admin_web_app/Source_webapp/public/favicon.ico rename to admin_web_app/public/favicon.ico diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-1.jpg b/admin_web_app/public/img/avatars/thumb-1.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-1.jpg rename to admin_web_app/public/img/avatars/thumb-1.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-10.jpg b/admin_web_app/public/img/avatars/thumb-10.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-10.jpg rename to admin_web_app/public/img/avatars/thumb-10.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-11.jpg b/admin_web_app/public/img/avatars/thumb-11.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-11.jpg rename to admin_web_app/public/img/avatars/thumb-11.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-12.jpg b/admin_web_app/public/img/avatars/thumb-12.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-12.jpg rename to admin_web_app/public/img/avatars/thumb-12.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-13.jpg b/admin_web_app/public/img/avatars/thumb-13.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-13.jpg rename to admin_web_app/public/img/avatars/thumb-13.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-14.jpg b/admin_web_app/public/img/avatars/thumb-14.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-14.jpg rename to admin_web_app/public/img/avatars/thumb-14.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-15.jpg b/admin_web_app/public/img/avatars/thumb-15.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-15.jpg rename to admin_web_app/public/img/avatars/thumb-15.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-16.jpg b/admin_web_app/public/img/avatars/thumb-16.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-16.jpg rename to admin_web_app/public/img/avatars/thumb-16.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-2.jpg b/admin_web_app/public/img/avatars/thumb-2.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-2.jpg rename to admin_web_app/public/img/avatars/thumb-2.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-3.jpg b/admin_web_app/public/img/avatars/thumb-3.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-3.jpg rename to admin_web_app/public/img/avatars/thumb-3.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-4.jpg b/admin_web_app/public/img/avatars/thumb-4.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-4.jpg rename to admin_web_app/public/img/avatars/thumb-4.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-5.jpg b/admin_web_app/public/img/avatars/thumb-5.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-5.jpg rename to admin_web_app/public/img/avatars/thumb-5.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-6.jpg b/admin_web_app/public/img/avatars/thumb-6.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-6.jpg rename to admin_web_app/public/img/avatars/thumb-6.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-7.jpg b/admin_web_app/public/img/avatars/thumb-7.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-7.jpg rename to admin_web_app/public/img/avatars/thumb-7.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-8.jpg b/admin_web_app/public/img/avatars/thumb-8.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-8.jpg rename to admin_web_app/public/img/avatars/thumb-8.jpg diff --git a/admin_web_app/Source_webapp/public/img/avatars/thumb-9.jpg b/admin_web_app/public/img/avatars/thumb-9.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/avatars/thumb-9.jpg rename to admin_web_app/public/img/avatars/thumb-9.jpg diff --git a/admin_web_app/Source_webapp/public/img/blockly/devices.jpg b/admin_web_app/public/img/blockly/devices.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/blockly/devices.jpg rename to admin_web_app/public/img/blockly/devices.jpg diff --git a/admin_web_app/Source_webapp/public/img/blockly/email.jpg b/admin_web_app/public/img/blockly/email.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/blockly/email.jpg rename to admin_web_app/public/img/blockly/email.jpg diff --git a/admin_web_app/Source_webapp/public/img/blockly/notif.jpg b/admin_web_app/public/img/blockly/notif.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/blockly/notif.jpg rename to admin_web_app/public/img/blockly/notif.jpg diff --git a/admin_web_app/Source_webapp/public/img/countries/ar.png b/admin_web_app/public/img/countries/ar.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/ar.png rename to admin_web_app/public/img/countries/ar.png diff --git a/admin_web_app/Source_webapp/public/img/countries/cn.png b/admin_web_app/public/img/countries/cn.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/cn.png rename to admin_web_app/public/img/countries/cn.png diff --git a/admin_web_app/Source_webapp/public/img/countries/fr.png b/admin_web_app/public/img/countries/fr.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/fr.png rename to admin_web_app/public/img/countries/fr.png diff --git a/admin_web_app/Source_webapp/public/img/countries/ir.png b/admin_web_app/public/img/countries/ir.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/ir.png rename to admin_web_app/public/img/countries/ir.png diff --git a/admin_web_app/Source_webapp/public/img/countries/jp.png b/admin_web_app/public/img/countries/jp.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/jp.png rename to admin_web_app/public/img/countries/jp.png diff --git a/admin_web_app/Source_webapp/public/img/countries/sp.png b/admin_web_app/public/img/countries/sp.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/sp.png rename to admin_web_app/public/img/countries/sp.png diff --git a/admin_web_app/Source_webapp/public/img/countries/us.png b/admin_web_app/public/img/countries/us.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/countries/us.png rename to admin_web_app/public/img/countries/us.png diff --git a/admin_web_app/Source_webapp/public/img/logo/logo-captcha.png b/admin_web_app/public/img/logo/logo-captcha.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/logo-captcha.png rename to admin_web_app/public/img/logo/logo-captcha.png diff --git a/admin_web_app/Source_webapp/public/img/logo/logo-dark-full.png b/admin_web_app/public/img/logo/logo-dark-full.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/logo-dark-full.png rename to admin_web_app/public/img/logo/logo-dark-full.png diff --git a/admin_web_app/Source_webapp/public/img/logo/logo-dark-streamline.png b/admin_web_app/public/img/logo/logo-dark-streamline.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/logo-dark-streamline.png rename to admin_web_app/public/img/logo/logo-dark-streamline.png diff --git a/admin_web_app/Source_webapp/public/img/logo/logo-light-full.png b/admin_web_app/public/img/logo/logo-light-full.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/logo-light-full.png rename to admin_web_app/public/img/logo/logo-light-full.png diff --git a/admin_web_app/Source_webapp/public/img/logo/logo-light-streamline.png b/admin_web_app/public/img/logo/logo-light-streamline.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/logo-light-streamline.png rename to admin_web_app/public/img/logo/logo-light-streamline.png diff --git a/admin_web_app/Source_webapp/public/img/logo/old-logo-dark-full.png b/admin_web_app/public/img/logo/old-logo-dark-full.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/old-logo-dark-full.png rename to admin_web_app/public/img/logo/old-logo-dark-full.png diff --git a/admin_web_app/Source_webapp/public/img/logo/old-logo-dark-streamline.png b/admin_web_app/public/img/logo/old-logo-dark-streamline.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/old-logo-dark-streamline.png rename to admin_web_app/public/img/logo/old-logo-dark-streamline.png diff --git a/admin_web_app/Source_webapp/public/img/logo/old-logo-light-full.png b/admin_web_app/public/img/logo/old-logo-light-full.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/old-logo-light-full.png rename to admin_web_app/public/img/logo/old-logo-light-full.png diff --git a/admin_web_app/Source_webapp/public/img/logo/old-logo-light-streamline.png b/admin_web_app/public/img/logo/old-logo-light-streamline.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/logo/old-logo-light-streamline.png rename to admin_web_app/public/img/logo/old-logo-light-streamline.png diff --git a/admin_web_app/Source_webapp/public/img/others/auth-cover-bg.jpg b/admin_web_app/public/img/others/auth-cover-bg.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/auth-cover-bg.jpg rename to admin_web_app/public/img/others/auth-cover-bg.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/auth-side-bg.jpg b/admin_web_app/public/img/others/auth-side-bg.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/auth-side-bg.jpg rename to admin_web_app/public/img/others/auth-side-bg.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/blank-dark.jpg b/admin_web_app/public/img/others/docs/blank-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/blank-dark.jpg rename to admin_web_app/public/img/others/docs/blank-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/blank.jpg b/admin_web_app/public/img/others/docs/blank.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/blank.jpg rename to admin_web_app/public/img/others/docs/blank.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/classic-dark.jpg b/admin_web_app/public/img/others/docs/classic-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/classic-dark.jpg rename to admin_web_app/public/img/others/docs/classic-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/classic.jpg b/admin_web_app/public/img/others/docs/classic.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/classic.jpg rename to admin_web_app/public/img/others/docs/classic.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/decked-dark.jpg b/admin_web_app/public/img/others/docs/decked-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/decked-dark.jpg rename to admin_web_app/public/img/others/docs/decked-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/decked.jpg b/admin_web_app/public/img/others/docs/decked.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/decked.jpg rename to admin_web_app/public/img/others/docs/decked.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/modern-dark.jpg b/admin_web_app/public/img/others/docs/modern-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/modern-dark.jpg rename to admin_web_app/public/img/others/docs/modern-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/modern.jpg b/admin_web_app/public/img/others/docs/modern.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/modern.jpg rename to admin_web_app/public/img/others/docs/modern.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/simple-dark.jpg b/admin_web_app/public/img/others/docs/simple-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/simple-dark.jpg rename to admin_web_app/public/img/others/docs/simple-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/simple.jpg b/admin_web_app/public/img/others/docs/simple.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/simple.jpg rename to admin_web_app/public/img/others/docs/simple.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/stackedSide-dark.jpg b/admin_web_app/public/img/others/docs/stackedSide-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/stackedSide-dark.jpg rename to admin_web_app/public/img/others/docs/stackedSide-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/docs/stackedSide.jpg b/admin_web_app/public/img/others/docs/stackedSide.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/docs/stackedSide.jpg rename to admin_web_app/public/img/others/docs/stackedSide.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-1.jpg b/admin_web_app/public/img/others/img-1.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-1.jpg rename to admin_web_app/public/img/others/img-1.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-10.png b/admin_web_app/public/img/others/img-10.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-10.png rename to admin_web_app/public/img/others/img-10.png diff --git a/admin_web_app/Source_webapp/public/img/others/img-11.jpg b/admin_web_app/public/img/others/img-11.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-11.jpg rename to admin_web_app/public/img/others/img-11.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-13.jpg b/admin_web_app/public/img/others/img-13.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-13.jpg rename to admin_web_app/public/img/others/img-13.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-14.jpg b/admin_web_app/public/img/others/img-14.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-14.jpg rename to admin_web_app/public/img/others/img-14.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-15.jpg b/admin_web_app/public/img/others/img-15.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-15.jpg rename to admin_web_app/public/img/others/img-15.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-16.jpg b/admin_web_app/public/img/others/img-16.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-16.jpg rename to admin_web_app/public/img/others/img-16.jpg diff --git a/admin_web_app/Source_webapp/public/img/others/img-17.png b/admin_web_app/public/img/others/img-17.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-17.png rename to admin_web_app/public/img/others/img-17.png diff --git a/admin_web_app/Source_webapp/public/img/others/img-2-dark.png b/admin_web_app/public/img/others/img-2-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-2-dark.png rename to admin_web_app/public/img/others/img-2-dark.png diff --git a/admin_web_app/Source_webapp/public/img/others/img-2.png b/admin_web_app/public/img/others/img-2.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-2.png rename to admin_web_app/public/img/others/img-2.png diff --git a/admin_web_app/Source_webapp/public/img/others/img-8.png b/admin_web_app/public/img/others/img-8.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-8.png rename to admin_web_app/public/img/others/img-8.png diff --git a/admin_web_app/Source_webapp/public/img/others/img-9.png b/admin_web_app/public/img/others/img-9.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/img-9.png rename to admin_web_app/public/img/others/img-9.png diff --git a/admin_web_app/Source_webapp/public/img/others/no-mail-selected-dark.png b/admin_web_app/public/img/others/no-mail-selected-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/no-mail-selected-dark.png rename to admin_web_app/public/img/others/no-mail-selected-dark.png diff --git a/admin_web_app/Source_webapp/public/img/others/no-mail-selected.png b/admin_web_app/public/img/others/no-mail-selected.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/no-mail-selected.png rename to admin_web_app/public/img/others/no-mail-selected.png diff --git a/admin_web_app/Source_webapp/public/img/others/no-notification.png b/admin_web_app/public/img/others/no-notification.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/no-notification.png rename to admin_web_app/public/img/others/no-notification.png diff --git a/admin_web_app/Source_webapp/public/img/others/pending-approval-dark.png b/admin_web_app/public/img/others/pending-approval-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/pending-approval-dark.png rename to admin_web_app/public/img/others/pending-approval-dark.png diff --git a/admin_web_app/Source_webapp/public/img/others/pending-approval.png b/admin_web_app/public/img/others/pending-approval.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/pending-approval.png rename to admin_web_app/public/img/others/pending-approval.png diff --git a/admin_web_app/Source_webapp/public/img/others/success.png b/admin_web_app/public/img/others/success.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/success.png rename to admin_web_app/public/img/others/success.png diff --git a/admin_web_app/Source_webapp/public/img/others/upload-dark.png b/admin_web_app/public/img/others/upload-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/upload-dark.png rename to admin_web_app/public/img/others/upload-dark.png diff --git a/admin_web_app/Source_webapp/public/img/others/upload.png b/admin_web_app/public/img/others/upload.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/upload.png rename to admin_web_app/public/img/others/upload.png diff --git a/admin_web_app/Source_webapp/public/img/others/welcome-dark.png b/admin_web_app/public/img/others/welcome-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/welcome-dark.png rename to admin_web_app/public/img/others/welcome-dark.png diff --git a/admin_web_app/Source_webapp/public/img/others/welcome.png b/admin_web_app/public/img/others/welcome.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/others/welcome.png rename to admin_web_app/public/img/others/welcome.png diff --git a/admin_web_app/Source_webapp/public/img/products/product-1-2.jpg b/admin_web_app/public/img/products/product-1-2.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-1-2.jpg rename to admin_web_app/public/img/products/product-1-2.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-1-3.jpg b/admin_web_app/public/img/products/product-1-3.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-1-3.jpg rename to admin_web_app/public/img/products/product-1-3.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-1-4.jpg b/admin_web_app/public/img/products/product-1-4.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-1-4.jpg rename to admin_web_app/public/img/products/product-1-4.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-1.jpg b/admin_web_app/public/img/products/product-1.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-1.jpg rename to admin_web_app/public/img/products/product-1.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-10.jpg b/admin_web_app/public/img/products/product-10.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-10.jpg rename to admin_web_app/public/img/products/product-10.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-11.jpg b/admin_web_app/public/img/products/product-11.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-11.jpg rename to admin_web_app/public/img/products/product-11.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-12.jpg b/admin_web_app/public/img/products/product-12.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-12.jpg rename to admin_web_app/public/img/products/product-12.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-2-2.jpg b/admin_web_app/public/img/products/product-2-2.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-2-2.jpg rename to admin_web_app/public/img/products/product-2-2.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-2.jpg b/admin_web_app/public/img/products/product-2.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-2.jpg rename to admin_web_app/public/img/products/product-2.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-3.jpg b/admin_web_app/public/img/products/product-3.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-3.jpg rename to admin_web_app/public/img/products/product-3.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-4.jpg b/admin_web_app/public/img/products/product-4.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-4.jpg rename to admin_web_app/public/img/products/product-4.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-5.jpg b/admin_web_app/public/img/products/product-5.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-5.jpg rename to admin_web_app/public/img/products/product-5.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-6.jpg b/admin_web_app/public/img/products/product-6.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-6.jpg rename to admin_web_app/public/img/products/product-6.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-7.jpg b/admin_web_app/public/img/products/product-7.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-7.jpg rename to admin_web_app/public/img/products/product-7.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-8.jpg b/admin_web_app/public/img/products/product-8.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-8.jpg rename to admin_web_app/public/img/products/product-8.jpg diff --git a/admin_web_app/Source_webapp/public/img/products/product-9.jpg b/admin_web_app/public/img/products/product-9.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/products/product-9.jpg rename to admin_web_app/public/img/products/product-9.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/adobe-xd.png b/admin_web_app/public/img/thumbs/adobe-xd.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/adobe-xd.png rename to admin_web_app/public/img/thumbs/adobe-xd.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/avalanche.png b/admin_web_app/public/img/thumbs/avalanche.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/avalanche.png rename to admin_web_app/public/img/thumbs/avalanche.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/bitcoin-cash.png b/admin_web_app/public/img/thumbs/bitcoin-cash.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/bitcoin-cash.png rename to admin_web_app/public/img/thumbs/bitcoin-cash.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/bitcoin-sv.png b/admin_web_app/public/img/thumbs/bitcoin-sv.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/bitcoin-sv.png rename to admin_web_app/public/img/thumbs/bitcoin-sv.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/bitcoin.png b/admin_web_app/public/img/thumbs/bitcoin.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/bitcoin.png rename to admin_web_app/public/img/thumbs/bitcoin.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/cardano.png b/admin_web_app/public/img/thumbs/cardano.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/cardano.png rename to admin_web_app/public/img/thumbs/cardano.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/chainlink.png b/admin_web_app/public/img/thumbs/chainlink.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/chainlink.png rename to admin_web_app/public/img/thumbs/chainlink.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/doge.png b/admin_web_app/public/img/thumbs/doge.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/doge.png rename to admin_web_app/public/img/thumbs/doge.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/drivers-license-back-dark.png b/admin_web_app/public/img/thumbs/drivers-license-back-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/drivers-license-back-dark.png rename to admin_web_app/public/img/thumbs/drivers-license-back-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/drivers-license-back.png b/admin_web_app/public/img/thumbs/drivers-license-back.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/drivers-license-back.png rename to admin_web_app/public/img/thumbs/drivers-license-back.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/drivers-license-front-dark.png b/admin_web_app/public/img/thumbs/drivers-license-front-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/drivers-license-front-dark.png rename to admin_web_app/public/img/thumbs/drivers-license-front-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/drivers-license-front.png b/admin_web_app/public/img/thumbs/drivers-license-front.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/drivers-license-front.png rename to admin_web_app/public/img/thumbs/drivers-license-front.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/dropbox.png b/admin_web_app/public/img/thumbs/dropbox.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/dropbox.png rename to admin_web_app/public/img/thumbs/dropbox.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/eos.png b/admin_web_app/public/img/thumbs/eos.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/eos.png rename to admin_web_app/public/img/thumbs/eos.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/ethereum.png b/admin_web_app/public/img/thumbs/ethereum.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/ethereum.png rename to admin_web_app/public/img/thumbs/ethereum.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/figma.png b/admin_web_app/public/img/thumbs/figma.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/figma.png rename to admin_web_app/public/img/thumbs/figma.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/github.png b/admin_web_app/public/img/thumbs/github.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/github.png rename to admin_web_app/public/img/thumbs/github.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/gitlab.png b/admin_web_app/public/img/thumbs/gitlab.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/gitlab.png rename to admin_web_app/public/img/thumbs/gitlab.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/google-drive.png b/admin_web_app/public/img/thumbs/google-drive.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/google-drive.png rename to admin_web_app/public/img/thumbs/google-drive.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-0-dark.png b/admin_web_app/public/img/thumbs/help-center-category-0-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-0-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-0-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-0.png b/admin_web_app/public/img/thumbs/help-center-category-0.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-0.png rename to admin_web_app/public/img/thumbs/help-center-category-0.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-1-dark.png b/admin_web_app/public/img/thumbs/help-center-category-1-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-1-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-1-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-1.png b/admin_web_app/public/img/thumbs/help-center-category-1.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-1.png rename to admin_web_app/public/img/thumbs/help-center-category-1.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-2-dark.png b/admin_web_app/public/img/thumbs/help-center-category-2-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-2-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-2-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-2.png b/admin_web_app/public/img/thumbs/help-center-category-2.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-2.png rename to admin_web_app/public/img/thumbs/help-center-category-2.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-3-dark.png b/admin_web_app/public/img/thumbs/help-center-category-3-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-3-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-3-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-3.png b/admin_web_app/public/img/thumbs/help-center-category-3.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-3.png rename to admin_web_app/public/img/thumbs/help-center-category-3.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-4-dark.png b/admin_web_app/public/img/thumbs/help-center-category-4-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-4-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-4-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-4.png b/admin_web_app/public/img/thumbs/help-center-category-4.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-4.png rename to admin_web_app/public/img/thumbs/help-center-category-4.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-5-dark.png b/admin_web_app/public/img/thumbs/help-center-category-5-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-5-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-5-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-5.png b/admin_web_app/public/img/thumbs/help-center-category-5.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-5.png rename to admin_web_app/public/img/thumbs/help-center-category-5.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-6-dark.png b/admin_web_app/public/img/thumbs/help-center-category-6-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-6-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-6-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-6.png b/admin_web_app/public/img/thumbs/help-center-category-6.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-6.png rename to admin_web_app/public/img/thumbs/help-center-category-6.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-7-dark.png b/admin_web_app/public/img/thumbs/help-center-category-7-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-7-dark.png rename to admin_web_app/public/img/thumbs/help-center-category-7-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/help-center-category-7.png b/admin_web_app/public/img/thumbs/help-center-category-7.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/help-center-category-7.png rename to admin_web_app/public/img/thumbs/help-center-category-7.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/hubspot.png b/admin_web_app/public/img/thumbs/hubspot.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/hubspot.png rename to admin_web_app/public/img/thumbs/hubspot.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/id-card-back-dark.png b/admin_web_app/public/img/thumbs/id-card-back-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/id-card-back-dark.png rename to admin_web_app/public/img/thumbs/id-card-back-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/id-card-back.png b/admin_web_app/public/img/thumbs/id-card-back.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/id-card-back.png rename to admin_web_app/public/img/thumbs/id-card-back.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/id-card-front-dark.png b/admin_web_app/public/img/thumbs/id-card-front-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/id-card-front-dark.png rename to admin_web_app/public/img/thumbs/id-card-front-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/id-card-front.png b/admin_web_app/public/img/thumbs/id-card-front.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/id-card-front.png rename to admin_web_app/public/img/thumbs/id-card-front.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/jira.png b/admin_web_app/public/img/thumbs/jira.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/jira.png rename to admin_web_app/public/img/thumbs/jira.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/blank-dark.jpg b/admin_web_app/public/img/thumbs/layouts/blank-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/blank-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/blank-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/blank.jpg b/admin_web_app/public/img/thumbs/layouts/blank.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/blank.jpg rename to admin_web_app/public/img/thumbs/layouts/blank.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/classic-dark.jpg b/admin_web_app/public/img/thumbs/layouts/classic-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/classic-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/classic-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/classic.jpg b/admin_web_app/public/img/thumbs/layouts/classic.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/classic.jpg rename to admin_web_app/public/img/thumbs/layouts/classic.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/decked-dark.jpg b/admin_web_app/public/img/thumbs/layouts/decked-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/decked-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/decked-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/decked.jpg b/admin_web_app/public/img/thumbs/layouts/decked.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/decked.jpg rename to admin_web_app/public/img/thumbs/layouts/decked.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/modern-dark.jpg b/admin_web_app/public/img/thumbs/layouts/modern-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/modern-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/modern-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/modern.jpg b/admin_web_app/public/img/thumbs/layouts/modern.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/modern.jpg rename to admin_web_app/public/img/thumbs/layouts/modern.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/simple-dark.jpg b/admin_web_app/public/img/thumbs/layouts/simple-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/simple-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/simple-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/simple.jpg b/admin_web_app/public/img/thumbs/layouts/simple.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/simple.jpg rename to admin_web_app/public/img/thumbs/layouts/simple.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/stackedSide-dark.jpg b/admin_web_app/public/img/thumbs/layouts/stackedSide-dark.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/stackedSide-dark.jpg rename to admin_web_app/public/img/thumbs/layouts/stackedSide-dark.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/layouts/stackedSide.jpg b/admin_web_app/public/img/thumbs/layouts/stackedSide.jpg similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/layouts/stackedSide.jpg rename to admin_web_app/public/img/thumbs/layouts/stackedSide.jpg diff --git a/admin_web_app/Source_webapp/public/img/thumbs/litecoin.png b/admin_web_app/public/img/thumbs/litecoin.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/litecoin.png rename to admin_web_app/public/img/thumbs/litecoin.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/miota.png b/admin_web_app/public/img/thumbs/miota.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/miota.png rename to admin_web_app/public/img/thumbs/miota.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/monero.png b/admin_web_app/public/img/thumbs/monero.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/monero.png rename to admin_web_app/public/img/thumbs/monero.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/notion.png b/admin_web_app/public/img/thumbs/notion.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/notion.png rename to admin_web_app/public/img/thumbs/notion.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/passport-dark.png b/admin_web_app/public/img/thumbs/passport-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/passport-dark.png rename to admin_web_app/public/img/thumbs/passport-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/passport-data-dark.png b/admin_web_app/public/img/thumbs/passport-data-dark.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/passport-data-dark.png rename to admin_web_app/public/img/thumbs/passport-data-dark.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/passport-data.png b/admin_web_app/public/img/thumbs/passport-data.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/passport-data.png rename to admin_web_app/public/img/thumbs/passport-data.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/passport.png b/admin_web_app/public/img/thumbs/passport.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/passport.png rename to admin_web_app/public/img/thumbs/passport.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/polkadot.png b/admin_web_app/public/img/thumbs/polkadot.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/polkadot.png rename to admin_web_app/public/img/thumbs/polkadot.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/polygon.png b/admin_web_app/public/img/thumbs/polygon.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/polygon.png rename to admin_web_app/public/img/thumbs/polygon.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/ripple.png b/admin_web_app/public/img/thumbs/ripple.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/ripple.png rename to admin_web_app/public/img/thumbs/ripple.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/saleforce-crm.png b/admin_web_app/public/img/thumbs/saleforce-crm.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/saleforce-crm.png rename to admin_web_app/public/img/thumbs/saleforce-crm.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/shiba-inu.png b/admin_web_app/public/img/thumbs/shiba-inu.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/shiba-inu.png rename to admin_web_app/public/img/thumbs/shiba-inu.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/sketch.png b/admin_web_app/public/img/thumbs/sketch.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/sketch.png rename to admin_web_app/public/img/thumbs/sketch.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/slack.png b/admin_web_app/public/img/thumbs/slack.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/slack.png rename to admin_web_app/public/img/thumbs/slack.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/solana.png b/admin_web_app/public/img/thumbs/solana.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/solana.png rename to admin_web_app/public/img/thumbs/solana.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/stellar-lumens.png b/admin_web_app/public/img/thumbs/stellar-lumens.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/stellar-lumens.png rename to admin_web_app/public/img/thumbs/stellar-lumens.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/tether-us.png b/admin_web_app/public/img/thumbs/tether-us.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/tether-us.png rename to admin_web_app/public/img/thumbs/tether-us.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/tron.png b/admin_web_app/public/img/thumbs/tron.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/tron.png rename to admin_web_app/public/img/thumbs/tron.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/zapier.png b/admin_web_app/public/img/thumbs/zapier.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/zapier.png rename to admin_web_app/public/img/thumbs/zapier.png diff --git a/admin_web_app/Source_webapp/public/img/thumbs/zendesk.png b/admin_web_app/public/img/thumbs/zendesk.png similarity index 100% rename from admin_web_app/Source_webapp/public/img/thumbs/zendesk.png rename to admin_web_app/public/img/thumbs/zendesk.png diff --git a/admin_web_app/Source_webapp/public/index.html b/admin_web_app/public/index.html similarity index 100% rename from admin_web_app/Source_webapp/public/index.html rename to admin_web_app/public/index.html diff --git a/admin_web_app/Source_webapp/public/manifest.json b/admin_web_app/public/manifest.json similarity index 100% rename from admin_web_app/Source_webapp/public/manifest.json rename to admin_web_app/public/manifest.json diff --git a/admin_web_app/Source_webapp/public/robots.txt b/admin_web_app/public/robots.txt similarity index 100% rename from admin_web_app/Source_webapp/public/robots.txt rename to admin_web_app/public/robots.txt diff --git a/admin_web_app/Source_webapp/safelist.txt b/admin_web_app/safelist.txt similarity index 100% rename from admin_web_app/Source_webapp/safelist.txt rename to admin_web_app/safelist.txt diff --git a/admin_web_app/Source_webapp/src/@types/auth.ts b/admin_web_app/src/@types/auth.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/auth.ts rename to admin_web_app/src/@types/auth.ts diff --git a/admin_web_app/Source_webapp/src/@types/chart.ts b/admin_web_app/src/@types/chart.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/chart.ts rename to admin_web_app/src/@types/chart.ts diff --git a/admin_web_app/Source_webapp/src/@types/common.ts b/admin_web_app/src/@types/common.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/common.ts rename to admin_web_app/src/@types/common.ts diff --git a/admin_web_app/Source_webapp/src/@types/docs.ts b/admin_web_app/src/@types/docs.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/docs.ts rename to admin_web_app/src/@types/docs.ts diff --git a/admin_web_app/Source_webapp/src/@types/navigation.ts b/admin_web_app/src/@types/navigation.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/navigation.ts rename to admin_web_app/src/@types/navigation.ts diff --git a/admin_web_app/Source_webapp/src/@types/routes.tsx b/admin_web_app/src/@types/routes.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/@types/routes.tsx rename to admin_web_app/src/@types/routes.tsx diff --git a/admin_web_app/Source_webapp/src/@types/theme.ts b/admin_web_app/src/@types/theme.ts similarity index 100% rename from admin_web_app/Source_webapp/src/@types/theme.ts rename to admin_web_app/src/@types/theme.ts diff --git a/admin_web_app/Source_webapp/src/App.tsx b/admin_web_app/src/App.tsx similarity index 81% rename from admin_web_app/Source_webapp/src/App.tsx rename to admin_web_app/src/App.tsx index 71daed05..8d52d9e8 100644 --- a/admin_web_app/Source_webapp/src/App.tsx +++ b/admin_web_app/src/App.tsx @@ -4,23 +4,11 @@ import { PersistGate } from 'redux-persist/integration/react' import store, { persistor } from './store' import Theme from '@/components/template/Theme' import Layout from '@/components/layouts' -import mockServer from './mock' -import appConfig from '@/configs/app.config' import './locales' import { QueryClient, QueryClientProvider } from '@tanstack/react-query' import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import { GoogleOAuthProvider } from '@react-oauth/google' -const environment = process.env.NODE_ENV - -/** - * Set enableMock(Default false) to true at configs/app.config.js - * If you wish to enable mock api - */ -if (environment !== 'production' && appConfig.enableMock) { - mockServer({ environment }) -} - const STALE_TIME_SECONDS = Infinity function App() { diff --git a/admin_web_app/Source_webapp/src/assets/maps/allstates.json b/admin_web_app/src/assets/maps/allstates.json similarity index 100% rename from admin_web_app/Source_webapp/src/assets/maps/allstates.json rename to admin_web_app/src/assets/maps/allstates.json diff --git a/admin_web_app/Source_webapp/src/assets/maps/us-albers.json b/admin_web_app/src/assets/maps/us-albers.json similarity index 100% rename from admin_web_app/Source_webapp/src/assets/maps/us-albers.json rename to admin_web_app/src/assets/maps/us-albers.json diff --git a/admin_web_app/Source_webapp/src/assets/maps/world-countries-sans-antarctica.json b/admin_web_app/src/assets/maps/world-countries-sans-antarctica.json similarity index 100% rename from admin_web_app/Source_webapp/src/assets/maps/world-countries-sans-antarctica.json rename to admin_web_app/src/assets/maps/world-countries-sans-antarctica.json diff --git a/admin_web_app/Source_webapp/src/assets/styles/app.css b/admin_web_app/src/assets/styles/app.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/app.css rename to admin_web_app/src/assets/styles/app.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_alert.css b/admin_web_app/src/assets/styles/components/_alert.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_alert.css rename to admin_web_app/src/assets/styles/components/_alert.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_avatar.css b/admin_web_app/src/assets/styles/components/_avatar.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_avatar.css rename to admin_web_app/src/assets/styles/components/_avatar.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_badge.css b/admin_web_app/src/assets/styles/components/_badge.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_badge.css rename to admin_web_app/src/assets/styles/components/_badge.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_button.css b/admin_web_app/src/assets/styles/components/_button.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_button.css rename to admin_web_app/src/assets/styles/components/_button.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_card.css b/admin_web_app/src/assets/styles/components/_card.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_card.css rename to admin_web_app/src/assets/styles/components/_card.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_checkbox.css b/admin_web_app/src/assets/styles/components/_checkbox.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_checkbox.css rename to admin_web_app/src/assets/styles/components/_checkbox.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_close-button.css b/admin_web_app/src/assets/styles/components/_close-button.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_close-button.css rename to admin_web_app/src/assets/styles/components/_close-button.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_date-picker.css b/admin_web_app/src/assets/styles/components/_date-picker.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_date-picker.css rename to admin_web_app/src/assets/styles/components/_date-picker.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_dialog.css b/admin_web_app/src/assets/styles/components/_dialog.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_dialog.css rename to admin_web_app/src/assets/styles/components/_dialog.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_drawer.css b/admin_web_app/src/assets/styles/components/_drawer.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_drawer.css rename to admin_web_app/src/assets/styles/components/_drawer.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_dropdown.css b/admin_web_app/src/assets/styles/components/_dropdown.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_dropdown.css rename to admin_web_app/src/assets/styles/components/_dropdown.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_form.css b/admin_web_app/src/assets/styles/components/_form.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_form.css rename to admin_web_app/src/assets/styles/components/_form.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_input-group.css b/admin_web_app/src/assets/styles/components/_input-group.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_input-group.css rename to admin_web_app/src/assets/styles/components/_input-group.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_input.css b/admin_web_app/src/assets/styles/components/_input.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_input.css rename to admin_web_app/src/assets/styles/components/_input.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_menu-item.css b/admin_web_app/src/assets/styles/components/_menu-item.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_menu-item.css rename to admin_web_app/src/assets/styles/components/_menu-item.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_menu.css b/admin_web_app/src/assets/styles/components/_menu.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_menu.css rename to admin_web_app/src/assets/styles/components/_menu.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_notification.css b/admin_web_app/src/assets/styles/components/_notification.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_notification.css rename to admin_web_app/src/assets/styles/components/_notification.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_pagination.css b/admin_web_app/src/assets/styles/components/_pagination.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_pagination.css rename to admin_web_app/src/assets/styles/components/_pagination.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_progress.css b/admin_web_app/src/assets/styles/components/_progress.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_progress.css rename to admin_web_app/src/assets/styles/components/_progress.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_radio.css b/admin_web_app/src/assets/styles/components/_radio.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_radio.css rename to admin_web_app/src/assets/styles/components/_radio.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_segment.css b/admin_web_app/src/assets/styles/components/_segment.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_segment.css rename to admin_web_app/src/assets/styles/components/_segment.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_select.css b/admin_web_app/src/assets/styles/components/_select.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_select.css rename to admin_web_app/src/assets/styles/components/_select.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_skeleton.css b/admin_web_app/src/assets/styles/components/_skeleton.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_skeleton.css rename to admin_web_app/src/assets/styles/components/_skeleton.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_steps.css b/admin_web_app/src/assets/styles/components/_steps.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_steps.css rename to admin_web_app/src/assets/styles/components/_steps.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_switcher.css b/admin_web_app/src/assets/styles/components/_switcher.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_switcher.css rename to admin_web_app/src/assets/styles/components/_switcher.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_tables.css b/admin_web_app/src/assets/styles/components/_tables.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_tables.css rename to admin_web_app/src/assets/styles/components/_tables.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_tabs.css b/admin_web_app/src/assets/styles/components/_tabs.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_tabs.css rename to admin_web_app/src/assets/styles/components/_tabs.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_tag.css b/admin_web_app/src/assets/styles/components/_tag.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_tag.css rename to admin_web_app/src/assets/styles/components/_tag.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_time-input.css b/admin_web_app/src/assets/styles/components/_time-input.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_time-input.css rename to admin_web_app/src/assets/styles/components/_time-input.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_timeline.css b/admin_web_app/src/assets/styles/components/_timeline.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_timeline.css rename to admin_web_app/src/assets/styles/components/_timeline.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_toast.css b/admin_web_app/src/assets/styles/components/_toast.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_toast.css rename to admin_web_app/src/assets/styles/components/_toast.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_tooltip.css b/admin_web_app/src/assets/styles/components/_tooltip.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_tooltip.css rename to admin_web_app/src/assets/styles/components/_tooltip.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/_upload.css b/admin_web_app/src/assets/styles/components/_upload.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/_upload.css rename to admin_web_app/src/assets/styles/components/_upload.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/components/index.css b/admin_web_app/src/assets/styles/components/index.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/components/index.css rename to admin_web_app/src/assets/styles/components/index.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/tailwind/index.css b/admin_web_app/src/assets/styles/tailwind/index.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/tailwind/index.css rename to admin_web_app/src/assets/styles/tailwind/index.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/template/_header.css b/admin_web_app/src/assets/styles/template/_header.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/template/_header.css rename to admin_web_app/src/assets/styles/template/_header.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/template/_secondary-header.css b/admin_web_app/src/assets/styles/template/_secondary-header.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/template/_secondary-header.css rename to admin_web_app/src/assets/styles/template/_secondary-header.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/template/_side-nav.css b/admin_web_app/src/assets/styles/template/_side-nav.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/template/_side-nav.css rename to admin_web_app/src/assets/styles/template/_side-nav.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/template/_stacked-side-nav.css b/admin_web_app/src/assets/styles/template/_stacked-side-nav.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/template/_stacked-side-nav.css rename to admin_web_app/src/assets/styles/template/_stacked-side-nav.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/template/index.css b/admin_web_app/src/assets/styles/template/index.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/template/index.css rename to admin_web_app/src/assets/styles/template/index.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/vendors/_apex-chart.css b/admin_web_app/src/assets/styles/vendors/_apex-chart.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/vendors/_apex-chart.css rename to admin_web_app/src/assets/styles/vendors/_apex-chart.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/vendors/_full-calendar.css b/admin_web_app/src/assets/styles/vendors/_full-calendar.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/vendors/_full-calendar.css rename to admin_web_app/src/assets/styles/vendors/_full-calendar.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/vendors/_react-quill.css b/admin_web_app/src/assets/styles/vendors/_react-quill.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/vendors/_react-quill.css rename to admin_web_app/src/assets/styles/vendors/_react-quill.css diff --git a/admin_web_app/Source_webapp/src/assets/styles/vendors/index.css b/admin_web_app/src/assets/styles/vendors/index.css similarity index 100% rename from admin_web_app/Source_webapp/src/assets/styles/vendors/index.css rename to admin_web_app/src/assets/styles/vendors/index.css diff --git a/admin_web_app/Source_webapp/src/assets/svg/DriversLicenseSvg.tsx b/admin_web_app/src/assets/svg/DriversLicenseSvg.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/assets/svg/DriversLicenseSvg.tsx rename to admin_web_app/src/assets/svg/DriversLicenseSvg.tsx diff --git a/admin_web_app/Source_webapp/src/assets/svg/NationalIdSvg.tsx b/admin_web_app/src/assets/svg/NationalIdSvg.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/assets/svg/NationalIdSvg.tsx rename to admin_web_app/src/assets/svg/NationalIdSvg.tsx diff --git a/admin_web_app/Source_webapp/src/assets/svg/PassportSvg.tsx b/admin_web_app/src/assets/svg/PassportSvg.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/assets/svg/PassportSvg.tsx rename to admin_web_app/src/assets/svg/PassportSvg.tsx diff --git a/admin_web_app/Source_webapp/src/assets/svg/index.ts b/admin_web_app/src/assets/svg/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/assets/svg/index.ts rename to admin_web_app/src/assets/svg/index.ts diff --git a/admin_web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx b/admin_web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx similarity index 93% rename from admin_web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx rename to admin_web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx index 73f4ba6d..d2c97fad 100644 --- a/admin_web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx +++ b/admin_web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx @@ -15,7 +15,6 @@ const GoogleLoginButton: React.FC = () => { const { signIn } = useAuth() const handleSuccess = async (credentialResponse: any) => { - console.log('Google Login Success:', credentialResponse) const response = await signIn({ tokenId: credentialResponse.credential, }) @@ -31,7 +30,6 @@ const GoogleLoginButton: React.FC = () => { const login = useGoogleLogin({ onSuccess: async (tokenResponse) => { - console.log('Google Login Success:', tokenResponse) const response = await signIn({ accessToken: tokenResponse.access_token, }) diff --git a/admin_web_app/Source_webapp/src/components/layouts/AuthLayout/AuthLayout.tsx b/admin_web_app/src/components/layouts/AuthLayout/AuthLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/AuthLayout/AuthLayout.tsx rename to admin_web_app/src/components/layouts/AuthLayout/AuthLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Cover.tsx b/admin_web_app/src/components/layouts/AuthLayout/Cover.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Cover.tsx rename to admin_web_app/src/components/layouts/AuthLayout/Cover.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Side.tsx b/admin_web_app/src/components/layouts/AuthLayout/Side.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Side.tsx rename to admin_web_app/src/components/layouts/AuthLayout/Side.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Simple.tsx b/admin_web_app/src/components/layouts/AuthLayout/Simple.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/AuthLayout/Simple.tsx rename to admin_web_app/src/components/layouts/AuthLayout/Simple.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/AuthLayout/index.ts b/admin_web_app/src/components/layouts/AuthLayout/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/AuthLayout/index.ts rename to admin_web_app/src/components/layouts/AuthLayout/index.ts diff --git a/admin_web_app/Source_webapp/src/components/layouts/BlankLayout.tsx b/admin_web_app/src/components/layouts/BlankLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/BlankLayout.tsx rename to admin_web_app/src/components/layouts/BlankLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/ClassicLayout.tsx b/admin_web_app/src/components/layouts/ClassicLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/ClassicLayout.tsx rename to admin_web_app/src/components/layouts/ClassicLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/DeckedLayout.tsx b/admin_web_app/src/components/layouts/DeckedLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/DeckedLayout.tsx rename to admin_web_app/src/components/layouts/DeckedLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/Layouts.tsx b/admin_web_app/src/components/layouts/Layouts.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/Layouts.tsx rename to admin_web_app/src/components/layouts/Layouts.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/ModernLayout.tsx b/admin_web_app/src/components/layouts/ModernLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/ModernLayout.tsx rename to admin_web_app/src/components/layouts/ModernLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/SimpleLayout.tsx b/admin_web_app/src/components/layouts/SimpleLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/SimpleLayout.tsx rename to admin_web_app/src/components/layouts/SimpleLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/StackedSideLayout.tsx b/admin_web_app/src/components/layouts/StackedSideLayout.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/StackedSideLayout.tsx rename to admin_web_app/src/components/layouts/StackedSideLayout.tsx diff --git a/admin_web_app/Source_webapp/src/components/layouts/ThemeApply.tsx b/admin_web_app/src/components/layouts/ThemeApply.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/components/layouts/ThemeApply.tsx rename to admin_web_app/src/components/layouts/ThemeApply.tsx index b0f2bf21..030e04fe 100644 --- a/admin_web_app/Source_webapp/src/components/layouts/ThemeApply.tsx +++ b/admin_web_app/src/components/layouts/ThemeApply.tsx @@ -360,8 +360,6 @@ export default function ThemeApply() { '#' + data.button ).split('-') - console.log('Theme apply') - dispatch(setThemeColor(buttonColorSplited[0])) dispatch(setThemeColorLevel(buttonColorSplited[1])) diff --git a/admin_web_app/Source_webapp/src/components/layouts/index.ts b/admin_web_app/src/components/layouts/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/layouts/index.ts rename to admin_web_app/src/components/layouts/index.ts diff --git a/admin_web_app/Source_webapp/src/components/map/CirclesLayer.tsx b/admin_web_app/src/components/map/CirclesLayer.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/map/CirclesLayer.tsx rename to admin_web_app/src/components/map/CirclesLayer.tsx diff --git a/admin_web_app/Source_webapp/src/components/map/MapComponent.tsx b/admin_web_app/src/components/map/MapComponent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/map/MapComponent.tsx rename to admin_web_app/src/components/map/MapComponent.tsx diff --git a/admin_web_app/Source_webapp/src/components/map/MarkerCluster.tsx b/admin_web_app/src/components/map/MarkerCluster.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/map/MarkerCluster.tsx rename to admin_web_app/src/components/map/MarkerCluster.tsx diff --git a/admin_web_app/Source_webapp/src/components/route/AppRoute.tsx b/admin_web_app/src/components/route/AppRoute.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/route/AppRoute.tsx rename to admin_web_app/src/components/route/AppRoute.tsx diff --git a/admin_web_app/Source_webapp/src/components/route/AuthorityGuard.tsx b/admin_web_app/src/components/route/AuthorityGuard.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/route/AuthorityGuard.tsx rename to admin_web_app/src/components/route/AuthorityGuard.tsx diff --git a/admin_web_app/Source_webapp/src/components/route/ProtectedRoute.tsx b/admin_web_app/src/components/route/ProtectedRoute.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/route/ProtectedRoute.tsx rename to admin_web_app/src/components/route/ProtectedRoute.tsx diff --git a/admin_web_app/Source_webapp/src/components/route/PublicRoute.tsx b/admin_web_app/src/components/route/PublicRoute.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/route/PublicRoute.tsx rename to admin_web_app/src/components/route/PublicRoute.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/ActionLink.tsx b/admin_web_app/src/components/shared/ActionLink.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/ActionLink.tsx rename to admin_web_app/src/components/shared/ActionLink.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/AdaptableCard.tsx b/admin_web_app/src/components/shared/AdaptableCard.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/AdaptableCard.tsx rename to admin_web_app/src/components/shared/AdaptableCard.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/Affix.tsx b/admin_web_app/src/components/shared/Affix.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/Affix.tsx rename to admin_web_app/src/components/shared/Affix.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/AuthorityCheck.tsx b/admin_web_app/src/components/shared/AuthorityCheck.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/AuthorityCheck.tsx rename to admin_web_app/src/components/shared/AuthorityCheck.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/CalendarView.tsx b/admin_web_app/src/components/shared/CalendarView.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/CalendarView.tsx rename to admin_web_app/src/components/shared/CalendarView.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/Chart.tsx b/admin_web_app/src/components/shared/Chart.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/Chart.tsx rename to admin_web_app/src/components/shared/Chart.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/ConfirmDialog.tsx b/admin_web_app/src/components/shared/ConfirmDialog.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/ConfirmDialog.tsx rename to admin_web_app/src/components/shared/ConfirmDialog.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/Container.tsx b/admin_web_app/src/components/shared/Container.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/Container.tsx rename to admin_web_app/src/components/shared/Container.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/DataTable.tsx b/admin_web_app/src/components/shared/DataTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/DataTable.tsx rename to admin_web_app/src/components/shared/DataTable.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/DoubleSidedImage.tsx b/admin_web_app/src/components/shared/DoubleSidedImage.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/DoubleSidedImage.tsx rename to admin_web_app/src/components/shared/DoubleSidedImage.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/EllipsisButton.tsx b/admin_web_app/src/components/shared/EllipsisButton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/EllipsisButton.tsx rename to admin_web_app/src/components/shared/EllipsisButton.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/FormCustomFormatInput.tsx b/admin_web_app/src/components/shared/FormCustomFormatInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/FormCustomFormatInput.tsx rename to admin_web_app/src/components/shared/FormCustomFormatInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/FormNumericInput.tsx b/admin_web_app/src/components/shared/FormNumericInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/FormNumericInput.tsx rename to admin_web_app/src/components/shared/FormNumericInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/FormPatternInput.tsx b/admin_web_app/src/components/shared/FormPatternInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/FormPatternInput.tsx rename to admin_web_app/src/components/shared/FormPatternInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/GrowShrinkTag.tsx b/admin_web_app/src/components/shared/GrowShrinkTag.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/GrowShrinkTag.tsx rename to admin_web_app/src/components/shared/GrowShrinkTag.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/IconText.tsx b/admin_web_app/src/components/shared/IconText.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/IconText.tsx rename to admin_web_app/src/components/shared/IconText.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/Loading.tsx b/admin_web_app/src/components/shared/Loading.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/Loading.tsx rename to admin_web_app/src/components/shared/Loading.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/NavToggle.tsx b/admin_web_app/src/components/shared/NavToggle.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/NavToggle.tsx rename to admin_web_app/src/components/shared/NavToggle.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/PasswordInput.tsx b/admin_web_app/src/components/shared/PasswordInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/PasswordInput.tsx rename to admin_web_app/src/components/shared/PasswordInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/RegionMap.tsx b/admin_web_app/src/components/shared/RegionMap.tsx similarity index 96% rename from admin_web_app/Source_webapp/src/components/shared/RegionMap.tsx rename to admin_web_app/src/components/shared/RegionMap.tsx index 3042bde0..8451ab7c 100644 --- a/admin_web_app/Source_webapp/src/components/shared/RegionMap.tsx +++ b/admin_web_app/src/components/shared/RegionMap.tsx @@ -80,15 +80,16 @@ const MapChart = ({ prefix, }: MapChartProps) => { const mode = useAppSelector((state) => state.theme.mode) - const [position, setPosition] = useState({ coordinates: [20, 0], zoom: 0.4 }) + const [position, setPosition] = useState({ + coordinates: [20, 0], + zoom: 0.4, + }) const handleZoomIn = () => { setPosition((pos) => ({ ...pos, zoom: Math.min(pos.zoom * 1.5, 4) })) } const handleZoomOut = () => { - console.log(Math.max(position.zoom / 1.5, 0.1)) - setPosition((pos) => ({ ...pos, zoom: Math.max(pos.zoom / 1.5, 0.4) })) } @@ -183,9 +184,6 @@ const MapChart = ({ if (item.location.coordinates) { return ( - console.log(item.deviceName) - } key={index} coordinates={[ item.location.coordinates[1] - 1.5, diff --git a/admin_web_app/Source_webapp/src/components/shared/RichTextEditor.tsx b/admin_web_app/src/components/shared/RichTextEditor.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/RichTextEditor.tsx rename to admin_web_app/src/components/shared/RichTextEditor.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/SegmentItemOption.tsx b/admin_web_app/src/components/shared/SegmentItemOption.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/SegmentItemOption.tsx rename to admin_web_app/src/components/shared/SegmentItemOption.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/StickyFooter.tsx b/admin_web_app/src/components/shared/StickyFooter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/StickyFooter.tsx rename to admin_web_app/src/components/shared/StickyFooter.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/SvgIcon.tsx b/admin_web_app/src/components/shared/SvgIcon.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/SvgIcon.tsx rename to admin_web_app/src/components/shared/SvgIcon.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/SvgLocation.tsx b/admin_web_app/src/components/shared/SvgLocation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/SvgLocation.tsx rename to admin_web_app/src/components/shared/SvgLocation.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/SyntaxHighlighter.tsx b/admin_web_app/src/components/shared/SyntaxHighlighter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/SyntaxHighlighter.tsx rename to admin_web_app/src/components/shared/SyntaxHighlighter.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/TextEllipsis.tsx b/admin_web_app/src/components/shared/TextEllipsis.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/TextEllipsis.tsx rename to admin_web_app/src/components/shared/TextEllipsis.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/UsersAvatarGroup.tsx b/admin_web_app/src/components/shared/UsersAvatarGroup.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/UsersAvatarGroup.tsx rename to admin_web_app/src/components/shared/UsersAvatarGroup.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/index.ts b/admin_web_app/src/components/shared/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/index.ts rename to admin_web_app/src/components/shared/index.ts diff --git a/admin_web_app/Source_webapp/src/components/shared/loaders/MediaSkeleton.tsx b/admin_web_app/src/components/shared/loaders/MediaSkeleton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/loaders/MediaSkeleton.tsx rename to admin_web_app/src/components/shared/loaders/MediaSkeleton.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/loaders/TableRowSkeleton.tsx b/admin_web_app/src/components/shared/loaders/TableRowSkeleton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/loaders/TableRowSkeleton.tsx rename to admin_web_app/src/components/shared/loaders/TableRowSkeleton.tsx diff --git a/admin_web_app/Source_webapp/src/components/shared/loaders/TextBlockSkeleton.tsx b/admin_web_app/src/components/shared/loaders/TextBlockSkeleton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/shared/loaders/TextBlockSkeleton.tsx rename to admin_web_app/src/components/shared/loaders/TextBlockSkeleton.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/Footer.tsx b/admin_web_app/src/components/template/Footer.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Footer.tsx rename to admin_web_app/src/components/template/Footer.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/Header.tsx b/admin_web_app/src/components/template/Header.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Header.tsx rename to admin_web_app/src/components/template/Header.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HeaderLogo.tsx b/admin_web_app/src/components/template/HeaderLogo.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HeaderLogo.tsx rename to admin_web_app/src/components/template/HeaderLogo.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx b/admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx rename to admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx b/admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx rename to admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx b/admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx rename to admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx b/admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx rename to admin_web_app/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/index.ts b/admin_web_app/src/components/template/HorizontalMenuContent/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalMenuContent/index.ts rename to admin_web_app/src/components/template/HorizontalMenuContent/index.ts diff --git a/admin_web_app/Source_webapp/src/components/template/HorizontalNav.tsx b/admin_web_app/src/components/template/HorizontalNav.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/HorizontalNav.tsx rename to admin_web_app/src/components/template/HorizontalNav.tsx diff --git a/web_app/Source_webapp/src/components/template/LanguageSelector.tsx b/admin_web_app/src/components/template/LanguageSelector.tsx similarity index 98% rename from web_app/Source_webapp/src/components/template/LanguageSelector.tsx rename to admin_web_app/src/components/template/LanguageSelector.tsx index a1c6ef6c..7cdf83fd 100644 --- a/web_app/Source_webapp/src/components/template/LanguageSelector.tsx +++ b/admin_web_app/src/components/template/LanguageSelector.tsx @@ -44,7 +44,6 @@ const _LanguageSelector = ({ className }: CommonProps) => { const formattedLang = lang.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase() }) - console.log(formattedLang) setLoading(true) diff --git a/admin_web_app/Source_webapp/src/components/template/Logo.tsx b/admin_web_app/src/components/template/Logo.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Logo.tsx rename to admin_web_app/src/components/template/Logo.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/MobileNav.tsx b/admin_web_app/src/components/template/MobileNav.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/MobileNav.tsx rename to admin_web_app/src/components/template/MobileNav.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/Notification.tsx b/admin_web_app/src/components/template/Notification.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Notification.tsx rename to admin_web_app/src/components/template/Notification.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/PageContainer.tsx b/admin_web_app/src/components/template/PageContainer.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/PageContainer.tsx rename to admin_web_app/src/components/template/PageContainer.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/Search.tsx b/admin_web_app/src/components/template/Search.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Search.tsx rename to admin_web_app/src/components/template/Search.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SecondaryHeader.tsx b/admin_web_app/src/components/template/SecondaryHeader.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SecondaryHeader.tsx rename to admin_web_app/src/components/template/SecondaryHeader.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SideNav.tsx b/admin_web_app/src/components/template/SideNav.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SideNav.tsx rename to admin_web_app/src/components/template/SideNav.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SideNavToggle.tsx b/admin_web_app/src/components/template/SideNavToggle.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SideNavToggle.tsx rename to admin_web_app/src/components/template/SideNavToggle.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SidePanel/SidePanel.tsx b/admin_web_app/src/components/template/SidePanel/SidePanel.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SidePanel/SidePanel.tsx rename to admin_web_app/src/components/template/SidePanel/SidePanel.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SidePanel/SidePanelContent.tsx b/admin_web_app/src/components/template/SidePanel/SidePanelContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SidePanel/SidePanelContent.tsx rename to admin_web_app/src/components/template/SidePanel/SidePanelContent.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/SidePanel/index.ts b/admin_web_app/src/components/template/SidePanel/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/SidePanel/index.ts rename to admin_web_app/src/components/template/SidePanel/index.ts diff --git a/admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNav.tsx b/admin_web_app/src/components/template/StackedSideNav/StackedSideNav.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNav.tsx rename to admin_web_app/src/components/template/StackedSideNav/StackedSideNav.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavMini.tsx b/admin_web_app/src/components/template/StackedSideNav/StackedSideNavMini.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavMini.tsx rename to admin_web_app/src/components/template/StackedSideNav/StackedSideNavMini.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx b/admin_web_app/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx rename to admin_web_app/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/StackedSideNav/index.ts b/admin_web_app/src/components/template/StackedSideNav/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/StackedSideNav/index.ts rename to admin_web_app/src/components/template/StackedSideNav/index.ts diff --git a/admin_web_app/Source_webapp/src/components/template/Theme.tsx b/admin_web_app/src/components/template/Theme.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/Theme.tsx rename to admin_web_app/src/components/template/Theme.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/CopyButton.tsx b/admin_web_app/src/components/template/ThemeConfigurator/CopyButton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/CopyButton.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/CopyButton.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx b/admin_web_app/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx b/admin_web_app/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ModeSwitcher.tsx b/admin_web_app/src/components/template/ThemeConfigurator/ModeSwitcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ModeSwitcher.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/ModeSwitcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx b/admin_web_app/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx b/admin_web_app/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx b/admin_web_app/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx rename to admin_web_app/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/index.ts b/admin_web_app/src/components/template/ThemeConfigurator/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/ThemeConfigurator/index.ts rename to admin_web_app/src/components/template/ThemeConfigurator/index.ts diff --git a/admin_web_app/Source_webapp/src/components/template/UserDropdown.tsx b/admin_web_app/src/components/template/UserDropdown.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/UserDropdown.tsx rename to admin_web_app/src/components/template/UserDropdown.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx b/admin_web_app/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx rename to admin_web_app/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx b/admin_web_app/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx rename to admin_web_app/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx b/admin_web_app/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx rename to admin_web_app/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx b/admin_web_app/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx rename to admin_web_app/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/index.ts b/admin_web_app/src/components/template/VerticalMenuContent/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/template/VerticalMenuContent/index.ts rename to admin_web_app/src/components/template/VerticalMenuContent/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/@types/common.ts b/admin_web_app/src/components/ui/@types/common.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/@types/common.ts rename to admin_web_app/src/components/ui/@types/common.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/@types/date.ts b/admin_web_app/src/components/ui/@types/date.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/@types/date.ts rename to admin_web_app/src/components/ui/@types/date.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/@types/placement.ts b/admin_web_app/src/components/ui/@types/placement.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/@types/placement.ts rename to admin_web_app/src/components/ui/@types/placement.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Alert/Alert.tsx b/admin_web_app/src/components/ui/Alert/Alert.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Alert/Alert.tsx rename to admin_web_app/src/components/ui/Alert/Alert.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Alert/index.tsx b/admin_web_app/src/components/ui/Alert/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Alert/index.tsx rename to admin_web_app/src/components/ui/Alert/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Avatar/Avatar.tsx b/admin_web_app/src/components/ui/Avatar/Avatar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Avatar/Avatar.tsx rename to admin_web_app/src/components/ui/Avatar/Avatar.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Avatar/AvatarGroup.tsx b/admin_web_app/src/components/ui/Avatar/AvatarGroup.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Avatar/AvatarGroup.tsx rename to admin_web_app/src/components/ui/Avatar/AvatarGroup.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Avatar/index.tsx b/admin_web_app/src/components/ui/Avatar/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Avatar/index.tsx rename to admin_web_app/src/components/ui/Avatar/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Badge/Badge.tsx b/admin_web_app/src/components/ui/Badge/Badge.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Badge/Badge.tsx rename to admin_web_app/src/components/ui/Badge/Badge.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Badge/index.tsx b/admin_web_app/src/components/ui/Badge/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Badge/index.tsx rename to admin_web_app/src/components/ui/Badge/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Button/Button.tsx b/admin_web_app/src/components/ui/Button/Button.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Button/Button.tsx rename to admin_web_app/src/components/ui/Button/Button.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Button/index.tsx b/admin_web_app/src/components/ui/Button/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Button/index.tsx rename to admin_web_app/src/components/ui/Button/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Calendar/index.ts b/admin_web_app/src/components/ui/Calendar/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Calendar/index.ts rename to admin_web_app/src/components/ui/Calendar/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Card/Card.tsx b/admin_web_app/src/components/ui/Card/Card.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Card/Card.tsx rename to admin_web_app/src/components/ui/Card/Card.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Card/index.tsx b/admin_web_app/src/components/ui/Card/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Card/index.tsx rename to admin_web_app/src/components/ui/Card/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Card/style.css b/admin_web_app/src/components/ui/Card/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Card/style.css rename to admin_web_app/src/components/ui/Card/style.css diff --git a/admin_web_app/Source_webapp/src/components/ui/CardHolder/index.tsx b/admin_web_app/src/components/ui/CardHolder/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/CardHolder/index.tsx rename to admin_web_app/src/components/ui/CardHolder/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/CardHolder/style.scss b/admin_web_app/src/components/ui/CardHolder/style.scss similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/CardHolder/style.scss rename to admin_web_app/src/components/ui/CardHolder/style.scss diff --git a/admin_web_app/Source_webapp/src/components/ui/Checkbox/Checkbox.tsx b/admin_web_app/src/components/ui/Checkbox/Checkbox.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Checkbox/Checkbox.tsx rename to admin_web_app/src/components/ui/Checkbox/Checkbox.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Checkbox/Group.tsx b/admin_web_app/src/components/ui/Checkbox/Group.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Checkbox/Group.tsx rename to admin_web_app/src/components/ui/Checkbox/Group.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Checkbox/context.tsx b/admin_web_app/src/components/ui/Checkbox/context.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Checkbox/context.tsx rename to admin_web_app/src/components/ui/Checkbox/context.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Checkbox/index.tsx b/admin_web_app/src/components/ui/Checkbox/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Checkbox/index.tsx rename to admin_web_app/src/components/ui/Checkbox/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/CloseButton/CloseButton.tsx b/admin_web_app/src/components/ui/CloseButton/CloseButton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/CloseButton/CloseButton.tsx rename to admin_web_app/src/components/ui/CloseButton/CloseButton.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/CloseButton/index.tsx b/admin_web_app/src/components/ui/CloseButton/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/CloseButton/index.tsx rename to admin_web_app/src/components/ui/CloseButton/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/ConfigProvider/ConfigProvider.ts b/admin_web_app/src/components/ui/ConfigProvider/ConfigProvider.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/ConfigProvider/ConfigProvider.ts rename to admin_web_app/src/components/ui/ConfigProvider/ConfigProvider.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/ConfigProvider/index.ts b/admin_web_app/src/components/ui/ConfigProvider/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/ConfigProvider/index.ts rename to admin_web_app/src/components/ui/ConfigProvider/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/BasePicker.tsx b/admin_web_app/src/components/ui/DatePicker/BasePicker.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/BasePicker.tsx rename to admin_web_app/src/components/ui/DatePicker/BasePicker.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/Calendar.tsx b/admin_web_app/src/components/ui/DatePicker/Calendar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/Calendar.tsx rename to admin_web_app/src/components/ui/DatePicker/Calendar.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/CalendarBase.tsx b/admin_web_app/src/components/ui/DatePicker/CalendarBase.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/CalendarBase.tsx rename to admin_web_app/src/components/ui/DatePicker/CalendarBase.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/DatePicker.tsx b/admin_web_app/src/components/ui/DatePicker/DatePicker.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/DatePicker.tsx rename to admin_web_app/src/components/ui/DatePicker/DatePicker.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/DatePickerRange.tsx b/admin_web_app/src/components/ui/DatePicker/DatePickerRange.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/DatePickerRange.tsx rename to admin_web_app/src/components/ui/DatePicker/DatePickerRange.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/DateTimepicker.tsx b/admin_web_app/src/components/ui/DatePicker/DateTimepicker.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/DateTimepicker.tsx rename to admin_web_app/src/components/ui/DatePicker/DateTimepicker.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/RangeCalendar.tsx b/admin_web_app/src/components/ui/DatePicker/RangeCalendar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/RangeCalendar.tsx rename to admin_web_app/src/components/ui/DatePicker/RangeCalendar.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/index.tsx b/admin_web_app/src/components/ui/DatePicker/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/index.tsx rename to admin_web_app/src/components/ui/DatePicker/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/DateTable.tsx b/admin_web_app/src/components/ui/DatePicker/tables/DateTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/DateTable.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/DateTable.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/Header.tsx b/admin_web_app/src/components/ui/DatePicker/tables/Header.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/Header.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/Header.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/MonthTable.tsx b/admin_web_app/src/components/ui/DatePicker/tables/MonthTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/MonthTable.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/MonthTable.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/YearTable.tsx b/admin_web_app/src/components/ui/DatePicker/tables/YearTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/YearTable.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/YearTable.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Day.tsx b/admin_web_app/src/components/ui/DatePicker/tables/components/Day.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Day.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/components/Day.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Month.tsx b/admin_web_app/src/components/ui/DatePicker/tables/components/Month.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Month.tsx rename to admin_web_app/src/components/ui/DatePicker/tables/components/Month.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getDayProps.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/props/getDayProps.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getDayProps.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/props/getDayProps.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isDisabled.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/props/isDisabled.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isDisabled.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/props/isDisabled.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isOutside.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/props/isOutside.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isOutside.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/props/isOutside.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isWeekend.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/props/isWeekend.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isWeekend.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/props/isWeekend.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/types.ts b/admin_web_app/src/components/ui/DatePicker/tables/components/types.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/tables/components/types.ts rename to admin_web_app/src/components/ui/DatePicker/tables/components/types.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/formatYear.tsx b/admin_web_app/src/components/ui/DatePicker/utils/formatYear.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/formatYear.tsx rename to admin_web_app/src/components/ui/DatePicker/utils/formatYear.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getDecadeRange.ts b/admin_web_app/src/components/ui/DatePicker/utils/getDecadeRange.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getDecadeRange.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getDecadeRange.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getEndOfWeek.ts b/admin_web_app/src/components/ui/DatePicker/utils/getEndOfWeek.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getEndOfWeek.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getEndOfWeek.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthDays.ts b/admin_web_app/src/components/ui/DatePicker/utils/getMonthDays.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthDays.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getMonthDays.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthsNames.ts b/admin_web_app/src/components/ui/DatePicker/utils/getMonthsNames.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthsNames.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getMonthsNames.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getStartOfWeek.ts b/admin_web_app/src/components/ui/DatePicker/utils/getStartOfWeek.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getStartOfWeek.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getStartOfWeek.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getWeekdaysNames.ts b/admin_web_app/src/components/ui/DatePicker/utils/getWeekdaysNames.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getWeekdaysNames.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getWeekdaysNames.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getYearsRange.ts b/admin_web_app/src/components/ui/DatePicker/utils/getYearsRange.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/getYearsRange.ts rename to admin_web_app/src/components/ui/DatePicker/utils/getYearsRange.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/index.ts b/admin_web_app/src/components/ui/DatePicker/utils/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/index.ts rename to admin_web_app/src/components/ui/DatePicker/utils/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isMonthInRange.ts b/admin_web_app/src/components/ui/DatePicker/utils/isMonthInRange.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isMonthInRange.ts rename to admin_web_app/src/components/ui/DatePicker/utils/isMonthInRange.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameDate.ts b/admin_web_app/src/components/ui/DatePicker/utils/isSameDate.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameDate.ts rename to admin_web_app/src/components/ui/DatePicker/utils/isSameDate.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameMonth.ts b/admin_web_app/src/components/ui/DatePicker/utils/isSameMonth.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameMonth.ts rename to admin_web_app/src/components/ui/DatePicker/utils/isSameMonth.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Dialog/Dialog.tsx b/admin_web_app/src/components/ui/Dialog/Dialog.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dialog/Dialog.tsx rename to admin_web_app/src/components/ui/Dialog/Dialog.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dialog/index.tsx b/admin_web_app/src/components/ui/Dialog/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dialog/index.tsx rename to admin_web_app/src/components/ui/Dialog/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Drawer/Drawer.tsx b/admin_web_app/src/components/ui/Drawer/Drawer.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Drawer/Drawer.tsx rename to admin_web_app/src/components/ui/Drawer/Drawer.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Drawer/index.tsx b/admin_web_app/src/components/ui/Drawer/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Drawer/index.tsx rename to admin_web_app/src/components/ui/Drawer/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/Dropdown.tsx b/admin_web_app/src/components/ui/Dropdown/Dropdown.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/Dropdown.tsx rename to admin_web_app/src/components/ui/Dropdown/Dropdown.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownInnerMenu.tsx b/admin_web_app/src/components/ui/Dropdown/DropdownInnerMenu.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownInnerMenu.tsx rename to admin_web_app/src/components/ui/Dropdown/DropdownInnerMenu.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownItem.tsx b/admin_web_app/src/components/ui/Dropdown/DropdownItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownItem.tsx rename to admin_web_app/src/components/ui/Dropdown/DropdownItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownMenu.tsx b/admin_web_app/src/components/ui/Dropdown/DropdownMenu.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownMenu.tsx rename to admin_web_app/src/components/ui/Dropdown/DropdownMenu.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownToggle.tsx b/admin_web_app/src/components/ui/Dropdown/DropdownToggle.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/DropdownToggle.tsx rename to admin_web_app/src/components/ui/Dropdown/DropdownToggle.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownContext.ts b/admin_web_app/src/components/ui/Dropdown/context/dropdownContext.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownContext.ts rename to admin_web_app/src/components/ui/Dropdown/context/dropdownContext.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownMenuContext.ts b/admin_web_app/src/components/ui/Dropdown/context/dropdownMenuContext.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownMenuContext.ts rename to admin_web_app/src/components/ui/Dropdown/context/dropdownMenuContext.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/context/menuContext.ts b/admin_web_app/src/components/ui/Dropdown/context/menuContext.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/context/menuContext.ts rename to admin_web_app/src/components/ui/Dropdown/context/menuContext.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Dropdown/index.tsx b/admin_web_app/src/components/ui/Dropdown/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Dropdown/index.tsx rename to admin_web_app/src/components/ui/Dropdown/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Form/FormContainer.tsx b/admin_web_app/src/components/ui/Form/FormContainer.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Form/FormContainer.tsx rename to admin_web_app/src/components/ui/Form/FormContainer.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Form/FormItem.tsx b/admin_web_app/src/components/ui/Form/FormItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Form/FormItem.tsx rename to admin_web_app/src/components/ui/Form/FormItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Form/context.ts b/admin_web_app/src/components/ui/Form/context.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Form/context.ts rename to admin_web_app/src/components/ui/Form/context.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Form/index.tsx b/admin_web_app/src/components/ui/Form/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Form/index.tsx rename to admin_web_app/src/components/ui/Form/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Input/Input.tsx b/admin_web_app/src/components/ui/Input/Input.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Input/Input.tsx rename to admin_web_app/src/components/ui/Input/Input.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Input/index.tsx b/admin_web_app/src/components/ui/Input/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Input/index.tsx rename to admin_web_app/src/components/ui/Input/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/InputGroup/Addon.tsx b/admin_web_app/src/components/ui/InputGroup/Addon.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/InputGroup/Addon.tsx rename to admin_web_app/src/components/ui/InputGroup/Addon.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/InputGroup/InputGroup.tsx b/admin_web_app/src/components/ui/InputGroup/InputGroup.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/InputGroup/InputGroup.tsx rename to admin_web_app/src/components/ui/InputGroup/InputGroup.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/InputGroup/context.ts b/admin_web_app/src/components/ui/InputGroup/context.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/InputGroup/context.ts rename to admin_web_app/src/components/ui/InputGroup/context.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/InputGroup/index.tsx b/admin_web_app/src/components/ui/InputGroup/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/InputGroup/index.tsx rename to admin_web_app/src/components/ui/InputGroup/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/Menu.tsx b/admin_web_app/src/components/ui/Menu/Menu.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/Menu.tsx rename to admin_web_app/src/components/ui/Menu/Menu.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/MenuCollapse.tsx b/admin_web_app/src/components/ui/Menu/MenuCollapse.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/MenuCollapse.tsx rename to admin_web_app/src/components/ui/Menu/MenuCollapse.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/MenuGroup.tsx b/admin_web_app/src/components/ui/Menu/MenuGroup.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/MenuGroup.tsx rename to admin_web_app/src/components/ui/Menu/MenuGroup.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/MenuItem.tsx b/admin_web_app/src/components/ui/Menu/MenuItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/MenuItem.tsx rename to admin_web_app/src/components/ui/Menu/MenuItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/context/collapseContext.tsx b/admin_web_app/src/components/ui/Menu/context/collapseContext.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/context/collapseContext.tsx rename to admin_web_app/src/components/ui/Menu/context/collapseContext.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/context/groupContext.tsx b/admin_web_app/src/components/ui/Menu/context/groupContext.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/context/groupContext.tsx rename to admin_web_app/src/components/ui/Menu/context/groupContext.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/context/menuContext.tsx b/admin_web_app/src/components/ui/Menu/context/menuContext.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/context/menuContext.tsx rename to admin_web_app/src/components/ui/Menu/context/menuContext.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Menu/index.tsx b/admin_web_app/src/components/ui/Menu/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Menu/index.tsx rename to admin_web_app/src/components/ui/Menu/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/MenuItem/index.tsx b/admin_web_app/src/components/ui/MenuItem/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/MenuItem/index.tsx rename to admin_web_app/src/components/ui/MenuItem/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Notification/Notification.tsx b/admin_web_app/src/components/ui/Notification/Notification.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Notification/Notification.tsx rename to admin_web_app/src/components/ui/Notification/Notification.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Notification/index.tsx b/admin_web_app/src/components/ui/Notification/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Notification/index.tsx rename to admin_web_app/src/components/ui/Notification/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/Next.tsx b/admin_web_app/src/components/ui/Pagination/Next.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/Next.tsx rename to admin_web_app/src/components/ui/Pagination/Next.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/Pagers.tsx b/admin_web_app/src/components/ui/Pagination/Pagers.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/Pagers.tsx rename to admin_web_app/src/components/ui/Pagination/Pagers.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/Pagination.tsx b/admin_web_app/src/components/ui/Pagination/Pagination.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/Pagination.tsx rename to admin_web_app/src/components/ui/Pagination/Pagination.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/Prev.tsx b/admin_web_app/src/components/ui/Pagination/Prev.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/Prev.tsx rename to admin_web_app/src/components/ui/Pagination/Prev.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/Total.tsx b/admin_web_app/src/components/ui/Pagination/Total.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/Total.tsx rename to admin_web_app/src/components/ui/Pagination/Total.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Pagination/index.tsx b/admin_web_app/src/components/ui/Pagination/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Pagination/index.tsx rename to admin_web_app/src/components/ui/Pagination/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Progress/Circle.tsx b/admin_web_app/src/components/ui/Progress/Circle.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Progress/Circle.tsx rename to admin_web_app/src/components/ui/Progress/Circle.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Progress/Line.tsx b/admin_web_app/src/components/ui/Progress/Line.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Progress/Line.tsx rename to admin_web_app/src/components/ui/Progress/Line.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Progress/Progress.tsx b/admin_web_app/src/components/ui/Progress/Progress.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Progress/Progress.tsx rename to admin_web_app/src/components/ui/Progress/Progress.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Progress/index.tsx b/admin_web_app/src/components/ui/Progress/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Progress/index.tsx rename to admin_web_app/src/components/ui/Progress/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Radio/Group.tsx b/admin_web_app/src/components/ui/Radio/Group.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Radio/Group.tsx rename to admin_web_app/src/components/ui/Radio/Group.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Radio/Radio.tsx b/admin_web_app/src/components/ui/Radio/Radio.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Radio/Radio.tsx rename to admin_web_app/src/components/ui/Radio/Radio.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Radio/context.tsx b/admin_web_app/src/components/ui/Radio/context.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Radio/context.tsx rename to admin_web_app/src/components/ui/Radio/context.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Radio/index.tsx b/admin_web_app/src/components/ui/Radio/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Radio/index.tsx rename to admin_web_app/src/components/ui/Radio/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/RangeCalendar/index.ts b/admin_web_app/src/components/ui/RangeCalendar/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/RangeCalendar/index.ts rename to admin_web_app/src/components/ui/RangeCalendar/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/ScrollBar/ScrollBar.tsx b/admin_web_app/src/components/ui/ScrollBar/ScrollBar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/ScrollBar/ScrollBar.tsx rename to admin_web_app/src/components/ui/ScrollBar/ScrollBar.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/ScrollBar/index.tsx b/admin_web_app/src/components/ui/ScrollBar/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/ScrollBar/index.tsx rename to admin_web_app/src/components/ui/ScrollBar/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Segment/Segment.tsx b/admin_web_app/src/components/ui/Segment/Segment.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Segment/Segment.tsx rename to admin_web_app/src/components/ui/Segment/Segment.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Segment/SegmentItem.tsx b/admin_web_app/src/components/ui/Segment/SegmentItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Segment/SegmentItem.tsx rename to admin_web_app/src/components/ui/Segment/SegmentItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Segment/context.ts b/admin_web_app/src/components/ui/Segment/context.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Segment/context.ts rename to admin_web_app/src/components/ui/Segment/context.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Segment/index.tsx b/admin_web_app/src/components/ui/Segment/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Segment/index.tsx rename to admin_web_app/src/components/ui/Segment/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Select/Select.tsx b/admin_web_app/src/components/ui/Select/Select.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Select/Select.tsx rename to admin_web_app/src/components/ui/Select/Select.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Select/index.tsx b/admin_web_app/src/components/ui/Select/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Select/index.tsx rename to admin_web_app/src/components/ui/Select/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Skeleton/Skeleton.tsx b/admin_web_app/src/components/ui/Skeleton/Skeleton.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Skeleton/Skeleton.tsx rename to admin_web_app/src/components/ui/Skeleton/Skeleton.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Skeleton/index.tsx b/admin_web_app/src/components/ui/Skeleton/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Skeleton/index.tsx rename to admin_web_app/src/components/ui/Skeleton/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Spinner/Spinner.tsx b/admin_web_app/src/components/ui/Spinner/Spinner.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Spinner/Spinner.tsx rename to admin_web_app/src/components/ui/Spinner/Spinner.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Spinner/index.ts b/admin_web_app/src/components/ui/Spinner/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Spinner/index.ts rename to admin_web_app/src/components/ui/Spinner/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/StatusIcon/StatusIcon.tsx b/admin_web_app/src/components/ui/StatusIcon/StatusIcon.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/StatusIcon/StatusIcon.tsx rename to admin_web_app/src/components/ui/StatusIcon/StatusIcon.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/StatusIcon/index.tsx b/admin_web_app/src/components/ui/StatusIcon/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/StatusIcon/index.tsx rename to admin_web_app/src/components/ui/StatusIcon/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Steps/StepItem.tsx b/admin_web_app/src/components/ui/Steps/StepItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Steps/StepItem.tsx rename to admin_web_app/src/components/ui/Steps/StepItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Steps/Steps.tsx b/admin_web_app/src/components/ui/Steps/Steps.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Steps/Steps.tsx rename to admin_web_app/src/components/ui/Steps/Steps.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Steps/index.tsx b/admin_web_app/src/components/ui/Steps/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Steps/index.tsx rename to admin_web_app/src/components/ui/Steps/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Switcher/Switcher.tsx b/admin_web_app/src/components/ui/Switcher/Switcher.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Switcher/Switcher.tsx rename to admin_web_app/src/components/ui/Switcher/Switcher.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Switcher/index.tsx b/admin_web_app/src/components/ui/Switcher/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Switcher/index.tsx rename to admin_web_app/src/components/ui/Switcher/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Pagination.tsx b/admin_web_app/src/components/ui/Table/Pagination.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Pagination.tsx rename to admin_web_app/src/components/ui/Table/Pagination.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Sorter.tsx b/admin_web_app/src/components/ui/Table/Sorter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Sorter.tsx rename to admin_web_app/src/components/ui/Table/Sorter.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/TBody.tsx b/admin_web_app/src/components/ui/Table/TBody.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/TBody.tsx rename to admin_web_app/src/components/ui/Table/TBody.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/TFoot.tsx b/admin_web_app/src/components/ui/Table/TFoot.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/TFoot.tsx rename to admin_web_app/src/components/ui/Table/TFoot.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/THead.tsx b/admin_web_app/src/components/ui/Table/THead.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/THead.tsx rename to admin_web_app/src/components/ui/Table/THead.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Table.tsx b/admin_web_app/src/components/ui/Table/Table.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Table.tsx rename to admin_web_app/src/components/ui/Table/Table.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Td.tsx b/admin_web_app/src/components/ui/Table/Td.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Td.tsx rename to admin_web_app/src/components/ui/Table/Td.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Th.tsx b/admin_web_app/src/components/ui/Table/Th.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Th.tsx rename to admin_web_app/src/components/ui/Table/Th.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/Tr.tsx b/admin_web_app/src/components/ui/Table/Tr.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/Tr.tsx rename to admin_web_app/src/components/ui/Table/Tr.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Table/index.tsx b/admin_web_app/src/components/ui/Table/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Table/index.tsx rename to admin_web_app/src/components/ui/Table/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/TabContent.tsx b/admin_web_app/src/components/ui/Tabs/TabContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/TabContent.tsx rename to admin_web_app/src/components/ui/Tabs/TabContent.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/TabList.tsx b/admin_web_app/src/components/ui/Tabs/TabList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/TabList.tsx rename to admin_web_app/src/components/ui/Tabs/TabList.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/TabNav.tsx b/admin_web_app/src/components/ui/Tabs/TabNav.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/TabNav.tsx rename to admin_web_app/src/components/ui/Tabs/TabNav.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/Tabs.tsx b/admin_web_app/src/components/ui/Tabs/Tabs.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/Tabs.tsx rename to admin_web_app/src/components/ui/Tabs/Tabs.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/context.ts b/admin_web_app/src/components/ui/Tabs/context.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/context.ts rename to admin_web_app/src/components/ui/Tabs/context.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Tabs/index.tsx b/admin_web_app/src/components/ui/Tabs/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tabs/index.tsx rename to admin_web_app/src/components/ui/Tabs/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tag/Tag.tsx b/admin_web_app/src/components/ui/Tag/Tag.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tag/Tag.tsx rename to admin_web_app/src/components/ui/Tag/Tag.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tag/index.tsx b/admin_web_app/src/components/ui/Tag/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tag/index.tsx rename to admin_web_app/src/components/ui/Tag/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/AmPmInput.tsx b/admin_web_app/src/components/ui/TimeInput/AmPmInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/AmPmInput.tsx rename to admin_web_app/src/components/ui/TimeInput/AmPmInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInput.tsx b/admin_web_app/src/components/ui/TimeInput/TimeInput.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInput.tsx rename to admin_web_app/src/components/ui/TimeInput/TimeInput.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInputField.tsx b/admin_web_app/src/components/ui/TimeInput/TimeInputField.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInputField.tsx rename to admin_web_app/src/components/ui/TimeInput/TimeInputField.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInputRange.tsx b/admin_web_app/src/components/ui/TimeInput/TimeInputRange.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/TimeInputRange.tsx rename to admin_web_app/src/components/ui/TimeInput/TimeInputRange.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/index.tsx b/admin_web_app/src/components/ui/TimeInput/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/index.tsx rename to admin_web_app/src/components/ui/TimeInput/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/clamp.ts b/admin_web_app/src/components/ui/TimeInput/utils/clamp.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/clamp.ts rename to admin_web_app/src/components/ui/TimeInput/utils/clamp.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/createAmPmHandler.ts b/admin_web_app/src/components/ui/TimeInput/utils/createAmPmHandler.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/createAmPmHandler.ts rename to admin_web_app/src/components/ui/TimeInput/utils/createAmPmHandler.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/createTimeHandler.ts b/admin_web_app/src/components/ui/TimeInput/utils/createTimeHandler.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/createTimeHandler.ts rename to admin_web_app/src/components/ui/TimeInput/utils/createTimeHandler.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/getDate.ts b/admin_web_app/src/components/ui/TimeInput/utils/getDate.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/getDate.ts rename to admin_web_app/src/components/ui/TimeInput/utils/getDate.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/getTimeValues.ts b/admin_web_app/src/components/ui/TimeInput/utils/getTimeValues.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/getTimeValues.ts rename to admin_web_app/src/components/ui/TimeInput/utils/getTimeValues.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/index.ts b/admin_web_app/src/components/ui/TimeInput/utils/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/index.ts rename to admin_web_app/src/components/ui/TimeInput/utils/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/padTime.ts b/admin_web_app/src/components/ui/TimeInput/utils/padTime.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/TimeInput/utils/padTime.ts rename to admin_web_app/src/components/ui/TimeInput/utils/padTime.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/Timeline/TimeLineItem.tsx b/admin_web_app/src/components/ui/Timeline/TimeLineItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Timeline/TimeLineItem.tsx rename to admin_web_app/src/components/ui/Timeline/TimeLineItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Timeline/Timeline.tsx b/admin_web_app/src/components/ui/Timeline/Timeline.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Timeline/Timeline.tsx rename to admin_web_app/src/components/ui/Timeline/Timeline.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Timeline/index.tsx b/admin_web_app/src/components/ui/Timeline/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Timeline/index.tsx rename to admin_web_app/src/components/ui/Timeline/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tooltip/Arrow.tsx b/admin_web_app/src/components/ui/Tooltip/Arrow.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tooltip/Arrow.tsx rename to admin_web_app/src/components/ui/Tooltip/Arrow.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tooltip/Tooltip.tsx b/admin_web_app/src/components/ui/Tooltip/Tooltip.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tooltip/Tooltip.tsx rename to admin_web_app/src/components/ui/Tooltip/Tooltip.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Tooltip/index.tsx b/admin_web_app/src/components/ui/Tooltip/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Tooltip/index.tsx rename to admin_web_app/src/components/ui/Tooltip/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Upload/FileItem.tsx b/admin_web_app/src/components/ui/Upload/FileItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Upload/FileItem.tsx rename to admin_web_app/src/components/ui/Upload/FileItem.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Upload/Upload.tsx b/admin_web_app/src/components/ui/Upload/Upload.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Upload/Upload.tsx rename to admin_web_app/src/components/ui/Upload/Upload.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/Upload/index.tsx b/admin_web_app/src/components/ui/Upload/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/Upload/index.tsx rename to admin_web_app/src/components/ui/Upload/index.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/index.ts b/admin_web_app/src/components/ui/hooks/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/index.ts rename to admin_web_app/src/components/ui/hooks/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useCallbackRef.ts b/admin_web_app/src/components/ui/hooks/useCallbackRef.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useCallbackRef.ts rename to admin_web_app/src/components/ui/hooks/useCallbackRef.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useColorLevel.ts b/admin_web_app/src/components/ui/hooks/useColorLevel.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useColorLevel.ts rename to admin_web_app/src/components/ui/hooks/useColorLevel.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useControllableState.ts b/admin_web_app/src/components/ui/hooks/useControllableState.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useControllableState.ts rename to admin_web_app/src/components/ui/hooks/useControllableState.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useDidUpdate.ts b/admin_web_app/src/components/ui/hooks/useDidUpdate.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useDidUpdate.ts rename to admin_web_app/src/components/ui/hooks/useDidUpdate.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useMergeRef.ts b/admin_web_app/src/components/ui/hooks/useMergeRef.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useMergeRef.ts rename to admin_web_app/src/components/ui/hooks/useMergeRef.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useRootClose.ts b/admin_web_app/src/components/ui/hooks/useRootClose.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useRootClose.ts rename to admin_web_app/src/components/ui/hooks/useRootClose.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useTimeout.ts b/admin_web_app/src/components/ui/hooks/useTimeout.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useTimeout.ts rename to admin_web_app/src/components/ui/hooks/useTimeout.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useUncertainRef.ts b/admin_web_app/src/components/ui/hooks/useUncertainRef.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useUncertainRef.ts rename to admin_web_app/src/components/ui/hooks/useUncertainRef.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useUniqueId.ts b/admin_web_app/src/components/ui/hooks/useUniqueId.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useUniqueId.ts rename to admin_web_app/src/components/ui/hooks/useUniqueId.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/hooks/useWindowSize.ts b/admin_web_app/src/components/ui/hooks/useWindowSize.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/hooks/useWindowSize.ts rename to admin_web_app/src/components/ui/hooks/useWindowSize.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/index.ts b/admin_web_app/src/components/ui/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/index.ts rename to admin_web_app/src/components/ui/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/toast/ToastWrapper.tsx b/admin_web_app/src/components/ui/toast/ToastWrapper.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/toast/ToastWrapper.tsx rename to admin_web_app/src/components/ui/toast/ToastWrapper.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/toast/index.ts b/admin_web_app/src/components/ui/toast/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/toast/index.ts rename to admin_web_app/src/components/ui/toast/index.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/toast/toast.tsx b/admin_web_app/src/components/ui/toast/toast.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/toast/toast.tsx rename to admin_web_app/src/components/ui/toast/toast.tsx diff --git a/admin_web_app/Source_webapp/src/components/ui/toast/transition.ts b/admin_web_app/src/components/ui/toast/transition.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/toast/transition.ts rename to admin_web_app/src/components/ui/toast/transition.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/arrayIndexOf.ts b/admin_web_app/src/components/ui/utils/arrayIndexOf.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/arrayIndexOf.ts rename to admin_web_app/src/components/ui/utils/arrayIndexOf.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/capitalize.ts b/admin_web_app/src/components/ui/utils/capitalize.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/capitalize.ts rename to admin_web_app/src/components/ui/utils/capitalize.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/chainedFunction.ts b/admin_web_app/src/components/ui/utils/chainedFunction.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/chainedFunction.ts rename to admin_web_app/src/components/ui/utils/chainedFunction.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/constants.ts b/admin_web_app/src/components/ui/utils/constants.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/constants.ts rename to admin_web_app/src/components/ui/utils/constants.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/createUid.ts b/admin_web_app/src/components/ui/utils/createUid.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/createUid.ts rename to admin_web_app/src/components/ui/utils/createUid.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/mapCloneElement.ts b/admin_web_app/src/components/ui/utils/mapCloneElement.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/mapCloneElement.ts rename to admin_web_app/src/components/ui/utils/mapCloneElement.ts diff --git a/admin_web_app/Source_webapp/src/components/ui/utils/shallowEqual.ts b/admin_web_app/src/components/ui/utils/shallowEqual.ts similarity index 100% rename from admin_web_app/Source_webapp/src/components/ui/utils/shallowEqual.ts rename to admin_web_app/src/components/ui/utils/shallowEqual.ts diff --git a/admin_web_app/Source_webapp/src/configs/app.config.ts b/admin_web_app/src/configs/app.config.ts similarity index 100% rename from admin_web_app/Source_webapp/src/configs/app.config.ts rename to admin_web_app/src/configs/app.config.ts diff --git a/admin_web_app/Source_webapp/src/configs/chart.config.ts b/admin_web_app/src/configs/chart.config.ts similarity index 100% rename from admin_web_app/Source_webapp/src/configs/chart.config.ts rename to admin_web_app/src/configs/chart.config.ts diff --git a/admin_web_app/Source_webapp/src/configs/navigation-icon.config.tsx b/admin_web_app/src/configs/navigation-icon.config.tsx similarity index 97% rename from admin_web_app/Source_webapp/src/configs/navigation-icon.config.tsx rename to admin_web_app/src/configs/navigation-icon.config.tsx index 65f79044..bfd4b3d5 100644 --- a/admin_web_app/Source_webapp/src/configs/navigation-icon.config.tsx +++ b/admin_web_app/src/configs/navigation-icon.config.tsx @@ -35,6 +35,7 @@ const navigationIcon: NavigationIcons = { list: , user: , device: , + logs: , collapseMenu: , groupSingleMenu: , groupCollapseMenu: , diff --git a/admin_web_app/Source_webapp/src/configs/navigation.config/index.ts b/admin_web_app/src/configs/navigation.config/index.ts similarity index 96% rename from admin_web_app/Source_webapp/src/configs/navigation.config/index.ts rename to admin_web_app/src/configs/navigation.config/index.ts index ee92eb24..62ad0b45 100644 --- a/admin_web_app/Source_webapp/src/configs/navigation.config/index.ts +++ b/admin_web_app/src/configs/navigation.config/index.ts @@ -111,6 +111,16 @@ const navigationConfig: NavigationTree[] = [ authority: [], subMenu: [], }, + { + key: 'systemLogs', + path: '/system-logs', + title: 'Activity/System Logs', + translateKey: 'Activity/System Logs', + icon: 'logs', + type: NAV_ITEM_TYPE_ITEM, + authority: [], + subMenu: [], + }, ] export async function fixNavigationWithRoles(userEmail: string) { diff --git a/admin_web_app/Source_webapp/src/configs/routes.config/authRoute.tsx b/admin_web_app/src/configs/routes.config/authRoute.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/configs/routes.config/authRoute.tsx rename to admin_web_app/src/configs/routes.config/authRoute.tsx diff --git a/admin_web_app/Source_webapp/src/configs/routes.config/index.ts b/admin_web_app/src/configs/routes.config/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/configs/routes.config/index.ts rename to admin_web_app/src/configs/routes.config/index.ts diff --git a/admin_web_app/Source_webapp/src/configs/routes.config/routes.config.ts b/admin_web_app/src/configs/routes.config/routes.config.ts similarity index 95% rename from admin_web_app/Source_webapp/src/configs/routes.config/routes.config.ts rename to admin_web_app/src/configs/routes.config/routes.config.ts index 12458af5..8b675933 100644 --- a/admin_web_app/Source_webapp/src/configs/routes.config/routes.config.ts +++ b/admin_web_app/src/configs/routes.config/routes.config.ts @@ -89,6 +89,12 @@ export const protectedRoutes = [ component: lazy(() => import('@/views/market')), authority: [], }, + { + key: 'systemLogs', + path: '/system-logs', + component: lazy(() => import('@/views/systemlogs')), + authority: [], + }, { key: 'requests', path: '/requests', diff --git a/admin_web_app/Source_webapp/src/configs/theme.config.ts b/admin_web_app/src/configs/theme.config.ts similarity index 100% rename from admin_web_app/Source_webapp/src/configs/theme.config.ts rename to admin_web_app/src/configs/theme.config.ts diff --git a/admin_web_app/Source_webapp/src/constants/api.constant.ts b/admin_web_app/src/constants/api.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/api.constant.ts rename to admin_web_app/src/constants/api.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/app.constant.ts b/admin_web_app/src/constants/app.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/app.constant.ts rename to admin_web_app/src/constants/app.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/chart.constant.ts b/admin_web_app/src/constants/chart.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/chart.constant.ts rename to admin_web_app/src/constants/chart.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/countries.constant.ts b/admin_web_app/src/constants/countries.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/countries.constant.ts rename to admin_web_app/src/constants/countries.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/navigation.constant.ts b/admin_web_app/src/constants/navigation.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/navigation.constant.ts rename to admin_web_app/src/constants/navigation.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/roles.constant.ts b/admin_web_app/src/constants/roles.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/roles.constant.ts rename to admin_web_app/src/constants/roles.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/route.constant.ts b/admin_web_app/src/constants/route.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/route.constant.ts rename to admin_web_app/src/constants/route.constant.ts diff --git a/admin_web_app/Source_webapp/src/constants/theme.constant.ts b/admin_web_app/src/constants/theme.constant.ts similarity index 100% rename from admin_web_app/Source_webapp/src/constants/theme.constant.ts rename to admin_web_app/src/constants/theme.constant.ts diff --git a/admin_web_app/Source_webapp/src/history.ts b/admin_web_app/src/history.ts similarity index 100% rename from admin_web_app/Source_webapp/src/history.ts rename to admin_web_app/src/history.ts diff --git a/admin_web_app/Source_webapp/src/index.css b/admin_web_app/src/index.css similarity index 100% rename from admin_web_app/Source_webapp/src/index.css rename to admin_web_app/src/index.css diff --git a/admin_web_app/Source_webapp/src/locales/index.ts b/admin_web_app/src/locales/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/locales/index.ts rename to admin_web_app/src/locales/index.ts diff --git a/admin_web_app/Source_webapp/src/locales/lang/en.json b/admin_web_app/src/locales/lang/en.json similarity index 100% rename from admin_web_app/Source_webapp/src/locales/lang/en.json rename to admin_web_app/src/locales/lang/en.json diff --git a/admin_web_app/Source_webapp/src/locales/lang/fa.json b/admin_web_app/src/locales/lang/fa.json similarity index 100% rename from admin_web_app/Source_webapp/src/locales/lang/fa.json rename to admin_web_app/src/locales/lang/fa.json diff --git a/admin_web_app/Source_webapp/src/locales/locales.ts b/admin_web_app/src/locales/locales.ts similarity index 100% rename from admin_web_app/Source_webapp/src/locales/locales.ts rename to admin_web_app/src/locales/locales.ts diff --git a/admin_web_app/Source_webapp/src/main.tsx b/admin_web_app/src/main.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/main.tsx rename to admin_web_app/src/main.tsx diff --git a/admin_web_app/Source_webapp/src/services/AccountServices.ts b/admin_web_app/src/services/AccountServices.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/AccountServices.ts rename to admin_web_app/src/services/AccountServices.ts diff --git a/admin_web_app/Source_webapp/src/services/ApiService.ts b/admin_web_app/src/services/ApiService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/ApiService.ts rename to admin_web_app/src/services/ApiService.ts diff --git a/admin_web_app/Source_webapp/src/services/AuthService.ts b/admin_web_app/src/services/AuthService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/AuthService.ts rename to admin_web_app/src/services/AuthService.ts diff --git a/admin_web_app/Source_webapp/src/services/BaseService.ts b/admin_web_app/src/services/BaseService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/BaseService.ts rename to admin_web_app/src/services/BaseService.ts diff --git a/admin_web_app/Source_webapp/src/services/ContractService.ts b/admin_web_app/src/services/ContractService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/ContractService.ts rename to admin_web_app/src/services/ContractService.ts diff --git a/admin_web_app/Source_webapp/src/services/CrmService.ts b/admin_web_app/src/services/CrmService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/CrmService.ts rename to admin_web_app/src/services/CrmService.ts diff --git a/admin_web_app/Source_webapp/src/services/DeviceApi.ts b/admin_web_app/src/services/DeviceApi.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/DeviceApi.ts rename to admin_web_app/src/services/DeviceApi.ts diff --git a/admin_web_app/src/services/LogApi.ts b/admin_web_app/src/services/LogApi.ts new file mode 100644 index 00000000..1ffb7344 --- /dev/null +++ b/admin_web_app/src/services/LogApi.ts @@ -0,0 +1,9 @@ +import ApiService from './ApiService' + +export async function apiGetLogs() { + return ApiService.fetchData({ + url: import.meta.env.VITE_URL + 'v1/logs', + method: 'get', + }) +} + diff --git a/admin_web_app/Source_webapp/src/services/MediaAPI.ts b/admin_web_app/src/services/MediaAPI.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/MediaAPI.ts rename to admin_web_app/src/services/MediaAPI.ts diff --git a/admin_web_app/Source_webapp/src/services/NotificationService.ts b/admin_web_app/src/services/NotificationService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/NotificationService.ts rename to admin_web_app/src/services/NotificationService.ts diff --git a/admin_web_app/Source_webapp/src/services/RtkQueryService.ts b/admin_web_app/src/services/RtkQueryService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/RtkQueryService.ts rename to admin_web_app/src/services/RtkQueryService.ts diff --git a/admin_web_app/Source_webapp/src/services/SalesService.ts b/admin_web_app/src/services/SalesService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/SalesService.ts rename to admin_web_app/src/services/SalesService.ts diff --git a/admin_web_app/Source_webapp/src/services/ServiceAPI.ts b/admin_web_app/src/services/ServiceAPI.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/ServiceAPI.ts rename to admin_web_app/src/services/ServiceAPI.ts diff --git a/admin_web_app/Source_webapp/src/services/UserApi.ts b/admin_web_app/src/services/UserApi.ts similarity index 100% rename from admin_web_app/Source_webapp/src/services/UserApi.ts rename to admin_web_app/src/services/UserApi.ts diff --git a/admin_web_app/Source_webapp/src/store/hook.ts b/admin_web_app/src/store/hook.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/hook.ts rename to admin_web_app/src/store/hook.ts diff --git a/admin_web_app/Source_webapp/src/store/index.ts b/admin_web_app/src/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/index.ts rename to admin_web_app/src/store/index.ts diff --git a/admin_web_app/Source_webapp/src/store/rootReducer.ts b/admin_web_app/src/store/rootReducer.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/rootReducer.ts rename to admin_web_app/src/store/rootReducer.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/auth/constants.ts b/admin_web_app/src/store/slices/auth/constants.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/auth/constants.ts rename to admin_web_app/src/store/slices/auth/constants.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/auth/index.ts b/admin_web_app/src/store/slices/auth/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/auth/index.ts rename to admin_web_app/src/store/slices/auth/index.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/auth/sessionSlice.ts b/admin_web_app/src/store/slices/auth/sessionSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/auth/sessionSlice.ts rename to admin_web_app/src/store/slices/auth/sessionSlice.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/auth/userSlice.ts b/admin_web_app/src/store/slices/auth/userSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/auth/userSlice.ts rename to admin_web_app/src/store/slices/auth/userSlice.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/base/commonSlice.ts b/admin_web_app/src/store/slices/base/commonSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/base/commonSlice.ts rename to admin_web_app/src/store/slices/base/commonSlice.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/base/constants.ts b/admin_web_app/src/store/slices/base/constants.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/base/constants.ts rename to admin_web_app/src/store/slices/base/constants.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/base/index.ts b/admin_web_app/src/store/slices/base/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/base/index.ts rename to admin_web_app/src/store/slices/base/index.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/locale/index.ts b/admin_web_app/src/store/slices/locale/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/locale/index.ts rename to admin_web_app/src/store/slices/locale/index.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/locale/localeSlice.ts b/admin_web_app/src/store/slices/locale/localeSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/locale/localeSlice.ts rename to admin_web_app/src/store/slices/locale/localeSlice.ts diff --git a/admin_web_app/Source_webapp/src/store/slices/theme/themeSlice.ts b/admin_web_app/src/store/slices/theme/themeSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/slices/theme/themeSlice.ts rename to admin_web_app/src/store/slices/theme/themeSlice.ts diff --git a/admin_web_app/Source_webapp/src/store/storeSetup.ts b/admin_web_app/src/store/storeSetup.ts similarity index 100% rename from admin_web_app/Source_webapp/src/store/storeSetup.ts rename to admin_web_app/src/store/storeSetup.ts diff --git a/admin_web_app/Source_webapp/src/utils/acronym.ts b/admin_web_app/src/utils/acronym.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/acronym.ts rename to admin_web_app/src/utils/acronym.ts diff --git a/admin_web_app/Source_webapp/src/utils/components/ImageWithFallBack.tsx b/admin_web_app/src/utils/components/ImageWithFallBack.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/utils/components/ImageWithFallBack.tsx rename to admin_web_app/src/utils/components/ImageWithFallBack.tsx diff --git a/admin_web_app/Source_webapp/src/utils/deepParseJson.ts b/admin_web_app/src/utils/deepParseJson.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/deepParseJson.ts rename to admin_web_app/src/utils/deepParseJson.ts diff --git a/admin_web_app/Source_webapp/src/utils/functions/FilterUsersCsvData.ts b/admin_web_app/src/utils/functions/FilterUsersCsvData.ts similarity index 88% rename from admin_web_app/Source_webapp/src/utils/functions/FilterUsersCsvData.ts rename to admin_web_app/src/utils/functions/FilterUsersCsvData.ts index 52e1d33c..ea92dfe4 100644 --- a/admin_web_app/Source_webapp/src/utils/functions/FilterUsersCsvData.ts +++ b/admin_web_app/src/utils/functions/FilterUsersCsvData.ts @@ -17,7 +17,9 @@ export function transformCsvData(inputArray: UserData[]): OutputObject[] { return inputArray.map((obj) => { // Construct telephone string from tel object const telephone = obj.tel - ? `${obj.tel?.countryCode?.value || ''} ${obj.tel?.phoneNumber || ''}` + ? `${obj.tel?.countryCode?.value || ''} ${ + obj.tel?.phoneNumber || '' + }` : null // Destructure necessary fields and rename address lines @@ -42,9 +44,6 @@ export function transformCsvData(inputArray: UserData[]): OutputObject[] { telephone, } - // Log each result - console.log(result) - return result }) } diff --git a/admin_web_app/Source_webapp/src/utils/growShrinkColor.ts b/admin_web_app/src/utils/growShrinkColor.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/growShrinkColor.ts rename to admin_web_app/src/utils/growShrinkColor.ts diff --git a/admin_web_app/Source_webapp/src/utils/hoc/withHeaderItem.tsx b/admin_web_app/src/utils/hoc/withHeaderItem.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hoc/withHeaderItem.tsx rename to admin_web_app/src/utils/hoc/withHeaderItem.tsx diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useApi.ts b/admin_web_app/src/utils/hooks/useApi.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useApi.ts rename to admin_web_app/src/utils/hooks/useApi.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useAuth.ts b/admin_web_app/src/utils/hooks/useAuth.ts similarity index 94% rename from admin_web_app/Source_webapp/src/utils/hooks/useAuth.ts rename to admin_web_app/src/utils/hooks/useAuth.ts index 7e7e7b0e..f6bd1af1 100644 --- a/admin_web_app/Source_webapp/src/utils/hooks/useAuth.ts +++ b/admin_web_app/src/utils/hooks/useAuth.ts @@ -1,4 +1,9 @@ -import { apiSignIn, apiAdminSignInGoogle, apiSignOut, apiSignUp } from '@/services/AuthService' +import { + apiSignIn, + apiAdminSignInGoogle, + apiSignOut, + apiSignUp, +} from '@/services/AuthService' import { setUser, signInSuccess, @@ -37,7 +42,10 @@ function useAuth() { if (values.tokenId || values.accessToken) { try { - resp = await apiAdminSignInGoogle(values.tokenId || null, values.accessToken || null) + resp = await apiAdminSignInGoogle( + values.tokenId || null, + values.accessToken || null + ) } catch (error: any) { return { message: error.response.data.message, @@ -86,7 +94,7 @@ function useAuth() { const signUp = async (values: SignUpCredential) => { try { const resp = await apiSignUp(values) - console.log(resp) + if (resp.data) { const token = resp.data.data.tokens.accessToken //dispatch(signInSuccess(token)) diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useAuthority.ts b/admin_web_app/src/utils/hooks/useAuthority.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useAuthority.ts rename to admin_web_app/src/utils/hooks/useAuthority.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useDarkmode.ts b/admin_web_app/src/utils/hooks/useDarkmode.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useDarkmode.ts rename to admin_web_app/src/utils/hooks/useDarkmode.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useDeleteService.ts b/admin_web_app/src/utils/hooks/useDeleteService.ts similarity index 97% rename from admin_web_app/Source_webapp/src/utils/hooks/useDeleteService.ts rename to admin_web_app/src/utils/hooks/useDeleteService.ts index a0d7740c..00817c54 100644 --- a/admin_web_app/Source_webapp/src/utils/hooks/useDeleteService.ts +++ b/admin_web_app/src/utils/hooks/useDeleteService.ts @@ -9,7 +9,6 @@ type ApiResponse = { message: string } - type BlocklyJson = { blocks: { languageVersion: number @@ -41,7 +40,6 @@ type Variable = { export function useDeleteService() { const { serviceId } = useParams() - console.log(serviceId) const { data: service, status } = useQuery({ queryKey: ['service'], diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useDirection.ts b/admin_web_app/src/utils/hooks/useDirection.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useDirection.ts rename to admin_web_app/src/utils/hooks/useDirection.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useEditService.ts b/admin_web_app/src/utils/hooks/useEditService.ts similarity index 98% rename from admin_web_app/Source_webapp/src/utils/hooks/useEditService.ts rename to admin_web_app/src/utils/hooks/useEditService.ts index 58acf0a6..9d5cd50b 100644 --- a/admin_web_app/Source_webapp/src/utils/hooks/useEditService.ts +++ b/admin_web_app/src/utils/hooks/useEditService.ts @@ -62,7 +62,7 @@ export function useEditService() { //const { serviceId } = useParams() const { serviceId } = useAppSelector((state) => state.) - console.log(serviceId) + const { data: service, status } = useQuery({ queryKey: ['service'], diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useGetCurUserProfile.ts b/admin_web_app/src/utils/hooks/useGetCurUserProfile.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useGetCurUserProfile.ts rename to admin_web_app/src/utils/hooks/useGetCurUserProfile.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useGetDevices.ts b/admin_web_app/src/utils/hooks/useGetDevices.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useGetDevices.ts rename to admin_web_app/src/utils/hooks/useGetDevices.ts diff --git a/admin_web_app/src/utils/hooks/useGetLogs.ts b/admin_web_app/src/utils/hooks/useGetLogs.ts new file mode 100644 index 00000000..ab55d453 --- /dev/null +++ b/admin_web_app/src/utils/hooks/useGetLogs.ts @@ -0,0 +1,49 @@ +import { useState, useEffect } from 'react' +import { apiGetLogs } from '@/services/LogApi' + +type ApiResponse = { + statusCode: number + success: boolean + date: string + message: string + data: LogData[] +} + +export type LogData = { + _id: string + message: string + timestamp: string + level: string + source?: string + serviceId?: string +} + +export const useGetLogs = () => { + const [logs, setLogs] = useState([]) + const [loading, setLoading] = useState(true) + const [error, setError] = useState(null) + + const fetchLogs = async () => { + try { + setLoading(true) + const response = await apiGetLogs() + if (response && (response as any).data) { + setLogs((response as any).data.data || []) + } else { + setError('Failed to fetch logs') + } + } catch (err) { + setError('Failed to fetch logs') + console.error('Error fetching logs:', err) + } finally { + setLoading(false) + } + } + + useEffect(() => { + fetchLogs() + }, []) + + return { logs, loading, error, refetch: fetchLogs } +} + diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useGetService.ts b/admin_web_app/src/utils/hooks/useGetService.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useGetService.ts rename to admin_web_app/src/utils/hooks/useGetService.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useGetServices.ts b/admin_web_app/src/utils/hooks/useGetServices.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useGetServices.ts rename to admin_web_app/src/utils/hooks/useGetServices.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useLocale.ts b/admin_web_app/src/utils/hooks/useLocale.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useLocale.ts rename to admin_web_app/src/utils/hooks/useLocale.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useMenuActive.ts b/admin_web_app/src/utils/hooks/useMenuActive.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useMenuActive.ts rename to admin_web_app/src/utils/hooks/useMenuActive.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useQuery.ts b/admin_web_app/src/utils/hooks/useQuery.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useQuery.ts rename to admin_web_app/src/utils/hooks/useQuery.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useResponsive.ts b/admin_web_app/src/utils/hooks/useResponsive.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useResponsive.ts rename to admin_web_app/src/utils/hooks/useResponsive.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useThemeClass.ts b/admin_web_app/src/utils/hooks/useThemeClass.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useThemeClass.ts rename to admin_web_app/src/utils/hooks/useThemeClass.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useTimeOutMessage.ts b/admin_web_app/src/utils/hooks/useTimeOutMessage.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useTimeOutMessage.ts rename to admin_web_app/src/utils/hooks/useTimeOutMessage.ts diff --git a/admin_web_app/Source_webapp/src/utils/hooks/useTwColorByName.ts b/admin_web_app/src/utils/hooks/useTwColorByName.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/hooks/useTwColorByName.ts rename to admin_web_app/src/utils/hooks/useTwColorByName.ts diff --git a/admin_web_app/Source_webapp/src/utils/isLastChild.ts b/admin_web_app/src/utils/isLastChild.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/isLastChild.ts rename to admin_web_app/src/utils/isLastChild.ts diff --git a/admin_web_app/Source_webapp/src/utils/paginate.ts b/admin_web_app/src/utils/paginate.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/paginate.ts rename to admin_web_app/src/utils/paginate.ts diff --git a/admin_web_app/Source_webapp/src/utils/requiredFieldValidation.ts b/admin_web_app/src/utils/requiredFieldValidation.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/requiredFieldValidation.ts rename to admin_web_app/src/utils/requiredFieldValidation.ts diff --git a/admin_web_app/Source_webapp/src/utils/shadeColor.ts b/admin_web_app/src/utils/shadeColor.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/shadeColor.ts rename to admin_web_app/src/utils/shadeColor.ts diff --git a/admin_web_app/Source_webapp/src/utils/sortBy.ts b/admin_web_app/src/utils/sortBy.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/sortBy.ts rename to admin_web_app/src/utils/sortBy.ts diff --git a/admin_web_app/Source_webapp/src/utils/wildCardSearch.ts b/admin_web_app/src/utils/wildCardSearch.ts similarity index 100% rename from admin_web_app/Source_webapp/src/utils/wildCardSearch.ts rename to admin_web_app/src/utils/wildCardSearch.ts diff --git a/admin_web_app/Source_webapp/src/views/Home.tsx b/admin_web_app/src/views/Home.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/Home.tsx rename to admin_web_app/src/views/Home.tsx diff --git a/admin_web_app/Source_webapp/src/views/Views.tsx b/admin_web_app/src/views/Views.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/Views.tsx rename to admin_web_app/src/views/Views.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/ActivityLog.tsx b/admin_web_app/src/views/account/ActivityLog/ActivityLog.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/ActivityLog.tsx rename to admin_web_app/src/views/account/ActivityLog/ActivityLog.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/components/Event.tsx b/admin_web_app/src/views/account/ActivityLog/components/Event.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/components/Event.tsx rename to admin_web_app/src/views/account/ActivityLog/components/Event.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/components/Log.tsx b/admin_web_app/src/views/account/ActivityLog/components/Log.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/components/Log.tsx rename to admin_web_app/src/views/account/ActivityLog/components/Log.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/components/LogFilter.tsx b/admin_web_app/src/views/account/ActivityLog/components/LogFilter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/components/LogFilter.tsx rename to admin_web_app/src/views/account/ActivityLog/components/LogFilter.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/components/TimeLineAvatar.tsx b/admin_web_app/src/views/account/ActivityLog/components/TimeLineAvatar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/components/TimeLineAvatar.tsx rename to admin_web_app/src/views/account/ActivityLog/components/TimeLineAvatar.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/constants.ts b/admin_web_app/src/views/account/ActivityLog/constants.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/constants.ts rename to admin_web_app/src/views/account/ActivityLog/constants.ts diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/index.ts b/admin_web_app/src/views/account/ActivityLog/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/index.ts rename to admin_web_app/src/views/account/ActivityLog/index.ts diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/store/activityLogSlice.ts b/admin_web_app/src/views/account/ActivityLog/store/activityLogSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/store/activityLogSlice.ts rename to admin_web_app/src/views/account/ActivityLog/store/activityLogSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/account/ActivityLog/store/index.ts b/admin_web_app/src/views/account/ActivityLog/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/ActivityLog/store/index.ts rename to admin_web_app/src/views/account/ActivityLog/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/account/Invoice/Invoice.tsx b/admin_web_app/src/views/account/Invoice/Invoice.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Invoice/Invoice.tsx rename to admin_web_app/src/views/account/Invoice/Invoice.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Invoice/components/ContentTable.tsx b/admin_web_app/src/views/account/Invoice/components/ContentTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Invoice/components/ContentTable.tsx rename to admin_web_app/src/views/account/Invoice/components/ContentTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Invoice/components/InvoiceContent.tsx b/admin_web_app/src/views/account/Invoice/components/InvoiceContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Invoice/components/InvoiceContent.tsx rename to admin_web_app/src/views/account/Invoice/components/InvoiceContent.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Invoice/index.ts b/admin_web_app/src/views/account/Invoice/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Invoice/index.ts rename to admin_web_app/src/views/account/Invoice/index.ts diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/KycForm.tsx b/admin_web_app/src/views/account/KycForm/KycForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/KycForm.tsx rename to admin_web_app/src/views/account/KycForm/KycForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/AccountReview.tsx b/admin_web_app/src/views/account/KycForm/components/AccountReview.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/AccountReview.tsx rename to admin_web_app/src/views/account/KycForm/components/AccountReview.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/AddressInfomation.tsx b/admin_web_app/src/views/account/KycForm/components/AddressInfomation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/AddressInfomation.tsx rename to admin_web_app/src/views/account/KycForm/components/AddressInfomation.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/FinancialInformation.tsx b/admin_web_app/src/views/account/KycForm/components/FinancialInformation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/FinancialInformation.tsx rename to admin_web_app/src/views/account/KycForm/components/FinancialInformation.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/FormStep.tsx b/admin_web_app/src/views/account/KycForm/components/FormStep.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/FormStep.tsx rename to admin_web_app/src/views/account/KycForm/components/FormStep.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/Identification.tsx b/admin_web_app/src/views/account/KycForm/components/Identification.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/Identification.tsx rename to admin_web_app/src/views/account/KycForm/components/Identification.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/components/PersonalInformation.tsx b/admin_web_app/src/views/account/KycForm/components/PersonalInformation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/components/PersonalInformation.tsx rename to admin_web_app/src/views/account/KycForm/components/PersonalInformation.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/constants.ts b/admin_web_app/src/views/account/KycForm/constants.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/constants.ts rename to admin_web_app/src/views/account/KycForm/constants.ts diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/index.ts b/admin_web_app/src/views/account/KycForm/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/index.ts rename to admin_web_app/src/views/account/KycForm/index.ts diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/store/index.ts b/admin_web_app/src/views/account/KycForm/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/store/index.ts rename to admin_web_app/src/views/account/KycForm/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/account/KycForm/store/kycFormSlice.ts b/admin_web_app/src/views/account/KycForm/store/kycFormSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/KycForm/store/kycFormSlice.ts rename to admin_web_app/src/views/account/KycForm/store/kycFormSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/Settings.tsx b/admin_web_app/src/views/account/Settings/Settings.tsx similarity index 93% rename from admin_web_app/Source_webapp/src/views/account/Settings/Settings.tsx rename to admin_web_app/src/views/account/Settings/Settings.tsx index a781f9cc..0d45486c 100644 --- a/admin_web_app/Source_webapp/src/views/account/Settings/Settings.tsx +++ b/admin_web_app/src/views/account/Settings/Settings.tsx @@ -55,8 +55,6 @@ const Settings = () => { ) const onTabChange = (val: string) => { - console.log(val) - setCurrentTab(val) navigate(`/account/settings/${val}`) } @@ -76,7 +74,7 @@ const Settings = () => { return ( - + onTabChange(val)}> {Object.keys(settingsMenu).map((key) => ( @@ -88,9 +86,7 @@ const Settings = () => {
}> - {currentTab === 'profile' && ( - - )} + {currentTab === 'profile' && } {currentTab === 'password' && ( )} diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/Billing.tsx b/admin_web_app/src/views/account/Settings/components/Billing.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/Billing.tsx rename to admin_web_app/src/views/account/Settings/components/Billing.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/BillingHistory.tsx b/admin_web_app/src/views/account/Settings/components/BillingHistory.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/BillingHistory.tsx rename to admin_web_app/src/views/account/Settings/components/BillingHistory.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx b/admin_web_app/src/views/account/Settings/components/CreditCardForm.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx rename to admin_web_app/src/views/account/Settings/components/CreditCardForm.tsx index 84b5da4d..357de2fb 100644 --- a/admin_web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx +++ b/admin_web_app/src/views/account/Settings/components/CreditCardForm.tsx @@ -109,7 +109,7 @@ const CreditCardForm = ({ card, type, onUpdate }: CreditCardFormProps) => { cardType: 'VISA', } } - console.log('updatedCard', updatedCard) + onUpdate(updatedCard) } } diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/DownloadCsv.tsx b/admin_web_app/src/views/account/Settings/components/DownloadCsv.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/DownloadCsv.tsx rename to admin_web_app/src/views/account/Settings/components/DownloadCsv.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/FormDesription.tsx b/admin_web_app/src/views/account/Settings/components/FormDesription.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/FormDesription.tsx rename to admin_web_app/src/views/account/Settings/components/FormDesription.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/FormRow.tsx b/admin_web_app/src/views/account/Settings/components/FormRow.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/FormRow.tsx rename to admin_web_app/src/views/account/Settings/components/FormRow.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/Integration.tsx b/admin_web_app/src/views/account/Settings/components/Integration.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/Integration.tsx rename to admin_web_app/src/views/account/Settings/components/Integration.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx b/admin_web_app/src/views/account/Settings/components/NotificationSetting.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx rename to admin_web_app/src/views/account/Settings/components/NotificationSetting.tsx index 813fe67f..4c527d84 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx +++ b/admin_web_app/src/views/account/Settings/components/NotificationSetting.tsx @@ -166,7 +166,6 @@ const NotificationSetting = ({ } ) setSubmitting(false) - console.log(values) } return ( diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/Password.tsx b/admin_web_app/src/views/account/Settings/components/Password.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/Password.tsx rename to admin_web_app/src/views/account/Settings/components/Password.tsx index 035ec4cf..25b0e209 100644 --- a/admin_web_app/Source_webapp/src/views/account/Settings/components/Password.tsx +++ b/admin_web_app/src/views/account/Settings/components/Password.tsx @@ -64,7 +64,6 @@ const Password = ({ data }: { data?: LoginHistory[] }) => { placement: 'top-center', }) setSubmitting(false) - console.log('values', values) } return ( diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/Profile.tsx b/admin_web_app/src/views/account/Settings/components/Profile.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/Profile.tsx rename to admin_web_app/src/views/account/Settings/components/Profile.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/ReChart.tsx b/admin_web_app/src/views/account/Settings/components/ReChart.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/ReChart.tsx rename to admin_web_app/src/views/account/Settings/components/ReChart.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/Table2D.tsx b/admin_web_app/src/views/account/Settings/components/Table2D.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/Table2D.tsx rename to admin_web_app/src/views/account/Settings/components/Table2D.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/TimeZone.tsx b/admin_web_app/src/views/account/Settings/components/TimeZone.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/TimeZone.tsx rename to admin_web_app/src/views/account/Settings/components/TimeZone.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/TimezoneSelector.tsx b/admin_web_app/src/views/account/Settings/components/TimezoneSelector.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/TimezoneSelector.tsx rename to admin_web_app/src/views/account/Settings/components/TimezoneSelector.tsx diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/timezone.json b/admin_web_app/src/views/account/Settings/components/timezone.json similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/timezone.json rename to admin_web_app/src/views/account/Settings/components/timezone.json diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/index.ts b/admin_web_app/src/views/account/Settings/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/account/Settings/index.ts rename to admin_web_app/src/views/account/Settings/index.ts diff --git a/admin_web_app/Source_webapp/src/views/admins/Admins.tsx b/admin_web_app/src/views/admins/Admins.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/admins/Admins.tsx rename to admin_web_app/src/views/admins/Admins.tsx diff --git a/admin_web_app/Source_webapp/src/views/admins/components/AdminsList.tsx b/admin_web_app/src/views/admins/components/AdminsList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/admins/components/AdminsList.tsx rename to admin_web_app/src/views/admins/components/AdminsList.tsx diff --git a/admin_web_app/Source_webapp/src/views/admins/components/MakeAdmin.tsx b/admin_web_app/src/views/admins/components/MakeAdmin.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/admins/components/MakeAdmin.tsx rename to admin_web_app/src/views/admins/components/MakeAdmin.tsx index fde5236b..a00abb9b 100644 --- a/admin_web_app/Source_webapp/src/views/admins/components/MakeAdmin.tsx +++ b/admin_web_app/src/views/admins/components/MakeAdmin.tsx @@ -143,9 +143,6 @@ export default function MakeAdmin() { const userRoles = userDatas.roles || [] - console.log('userRoles:', userRoles) - console.log('adminRanks:', adminRanks) - // Check if user has 'super_admin' role const isSuperAdmin = userRoles.some( (role: any) => role.name === 'super_admin' diff --git a/admin_web_app/Source_webapp/src/views/admins/index.ts b/admin_web_app/src/views/admins/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/admins/index.ts rename to admin_web_app/src/views/admins/index.ts diff --git a/admin_web_app/Source_webapp/src/views/alldevices/DevicesList.tsx b/admin_web_app/src/views/alldevices/DevicesList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/DevicesList.tsx rename to admin_web_app/src/views/alldevices/DevicesList.tsx diff --git a/admin_web_app/Source_webapp/src/views/alldevices/components/DeviceTable.tsx b/admin_web_app/src/views/alldevices/components/DeviceTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/components/DeviceTable.tsx rename to admin_web_app/src/views/alldevices/components/DeviceTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/alldevices/components/ProductTableSearch.tsx b/admin_web_app/src/views/alldevices/components/ProductTableSearch.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/components/ProductTableSearch.tsx rename to admin_web_app/src/views/alldevices/components/ProductTableSearch.tsx diff --git a/admin_web_app/Source_webapp/src/views/alldevices/components/ProductTableTools.tsx b/admin_web_app/src/views/alldevices/components/ProductTableTools.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/components/ProductTableTools.tsx rename to admin_web_app/src/views/alldevices/components/ProductTableTools.tsx diff --git a/admin_web_app/Source_webapp/src/views/alldevices/index.ts b/admin_web_app/src/views/alldevices/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/index.ts rename to admin_web_app/src/views/alldevices/index.ts diff --git a/admin_web_app/Source_webapp/src/views/alldevices/store/index.ts b/admin_web_app/src/views/alldevices/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/store/index.ts rename to admin_web_app/src/views/alldevices/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/alldevices/store/productListSlice.tsx b/admin_web_app/src/views/alldevices/store/productListSlice.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/alldevices/store/productListSlice.tsx rename to admin_web_app/src/views/alldevices/store/productListSlice.tsx diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/InstalledServicesList.tsx b/admin_web_app/src/views/allinstalledservices/InstalledServicesList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/InstalledServicesList.tsx rename to admin_web_app/src/views/allinstalledservices/InstalledServicesList.tsx diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/components/InstalledServicesTable.tsx b/admin_web_app/src/views/allinstalledservices/components/InstalledServicesTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/components/InstalledServicesTable.tsx rename to admin_web_app/src/views/allinstalledservices/components/InstalledServicesTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/components/ProductTableSearch.tsx b/admin_web_app/src/views/allinstalledservices/components/ProductTableSearch.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/components/ProductTableSearch.tsx rename to admin_web_app/src/views/allinstalledservices/components/ProductTableSearch.tsx diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/components/ProductTableTools.tsx b/admin_web_app/src/views/allinstalledservices/components/ProductTableTools.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/components/ProductTableTools.tsx rename to admin_web_app/src/views/allinstalledservices/components/ProductTableTools.tsx diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/index.ts b/admin_web_app/src/views/allinstalledservices/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/index.ts rename to admin_web_app/src/views/allinstalledservices/index.ts diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/store/index.ts b/admin_web_app/src/views/allinstalledservices/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/store/index.ts rename to admin_web_app/src/views/allinstalledservices/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/allinstalledservices/store/productListSlice.tsx b/admin_web_app/src/views/allinstalledservices/store/productListSlice.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allinstalledservices/store/productListSlice.tsx rename to admin_web_app/src/views/allinstalledservices/store/productListSlice.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/DevicesList.tsx b/admin_web_app/src/views/allusers/DevicesList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/DevicesList.tsx rename to admin_web_app/src/views/allusers/DevicesList.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/components/ProductTableSearch.tsx b/admin_web_app/src/views/allusers/components/ProductTableSearch.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/components/ProductTableSearch.tsx rename to admin_web_app/src/views/allusers/components/ProductTableSearch.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/components/ProductTableTools.tsx b/admin_web_app/src/views/allusers/components/ProductTableTools.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/components/ProductTableTools.tsx rename to admin_web_app/src/views/allusers/components/ProductTableTools.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/components/UserTable.tsx b/admin_web_app/src/views/allusers/components/UserTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/components/UserTable.tsx rename to admin_web_app/src/views/allusers/components/UserTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/index.ts b/admin_web_app/src/views/allusers/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/index.ts rename to admin_web_app/src/views/allusers/index.ts diff --git a/admin_web_app/Source_webapp/src/views/allusers/store/index.ts b/admin_web_app/src/views/allusers/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/store/index.ts rename to admin_web_app/src/views/allusers/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/allusers/store/productListSlice.tsx b/admin_web_app/src/views/allusers/store/productListSlice.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/store/productListSlice.tsx rename to admin_web_app/src/views/allusers/store/productListSlice.tsx diff --git a/admin_web_app/Source_webapp/src/views/allusers/style.css b/admin_web_app/src/views/allusers/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/views/allusers/style.css rename to admin_web_app/src/views/allusers/style.css diff --git a/admin_web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPassword.tsx b/admin_web_app/src/views/auth/ForgotPassword/ForgotPassword.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPassword.tsx rename to admin_web_app/src/views/auth/ForgotPassword/ForgotPassword.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx b/admin_web_app/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx rename to admin_web_app/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/ForgotPassword/index.tsx b/admin_web_app/src/views/auth/ForgotPassword/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ForgotPassword/index.tsx rename to admin_web_app/src/views/auth/ForgotPassword/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/Message/SignUpSuccess.tsx b/admin_web_app/src/views/auth/Message/SignUpSuccess.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/Message/SignUpSuccess.tsx rename to admin_web_app/src/views/auth/Message/SignUpSuccess.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/Message/index.tsx b/admin_web_app/src/views/auth/Message/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/Message/index.tsx rename to admin_web_app/src/views/auth/Message/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/ResetPassword/ResetPassword.tsx b/admin_web_app/src/views/auth/ResetPassword/ResetPassword.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ResetPassword/ResetPassword.tsx rename to admin_web_app/src/views/auth/ResetPassword/ResetPassword.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/ResetPassword/ResetPasswordForm.tsx b/admin_web_app/src/views/auth/ResetPassword/ResetPasswordForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ResetPassword/ResetPasswordForm.tsx rename to admin_web_app/src/views/auth/ResetPassword/ResetPasswordForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/ResetPassword/index.tsx b/admin_web_app/src/views/auth/ResetPassword/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/ResetPassword/index.tsx rename to admin_web_app/src/views/auth/ResetPassword/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/SignIn/SignIn.tsx b/admin_web_app/src/views/auth/SignIn/SignIn.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/SignIn/SignIn.tsx rename to admin_web_app/src/views/auth/SignIn/SignIn.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/SignIn/SignInForm.tsx b/admin_web_app/src/views/auth/SignIn/SignInForm.tsx similarity index 95% rename from admin_web_app/Source_webapp/src/views/auth/SignIn/SignInForm.tsx rename to admin_web_app/src/views/auth/SignIn/SignInForm.tsx index f830a824..cdd29ee2 100644 --- a/admin_web_app/Source_webapp/src/views/auth/SignIn/SignInForm.tsx +++ b/admin_web_app/src/views/auth/SignIn/SignInForm.tsx @@ -34,7 +34,7 @@ const SignInForm = (props: SignInFormProps) => { disableSubmit = false, className, forgotPasswordUrl = '/forgot-password', - signUpUrl = '/sign-up', /*'https://fidesinnova.io'*/ + signUpUrl = '/sign-up' /*'https://fidesinnova.io'*/, } = props const [message, setMessage] = useTimeOutMessage() @@ -49,11 +49,10 @@ const SignInForm = (props: SignInFormProps) => { setSubmitting(true) const result = await signIn({ email, password }) - console.log("res:", result); - + if (result?.status === 'failed') { - setMessage("Username or password is invalid") - } else if ( result?.status === 'permission' ) { + setMessage('Username or password is invalid') + } else if (result?.status === 'permission') { setMessage(result.message) } setSubmitting(false) diff --git a/admin_web_app/Source_webapp/src/views/auth/SignIn/index.ts b/admin_web_app/src/views/auth/SignIn/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/SignIn/index.ts rename to admin_web_app/src/views/auth/SignIn/index.ts diff --git a/admin_web_app/Source_webapp/src/views/auth/SignUp/SignUp.tsx b/admin_web_app/src/views/auth/SignUp/SignUp.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/SignUp/SignUp.tsx rename to admin_web_app/src/views/auth/SignUp/SignUp.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/SignUp/SignUpForm.tsx b/admin_web_app/src/views/auth/SignUp/SignUpForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/SignUp/SignUpForm.tsx rename to admin_web_app/src/views/auth/SignUp/SignUpForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/auth/SignUp/index.ts b/admin_web_app/src/views/auth/SignUp/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/auth/SignUp/index.ts rename to admin_web_app/src/views/auth/SignUp/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Calendar/Calendar.tsx b/admin_web_app/src/views/crm/Calendar/Calendar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Calendar/Calendar.tsx rename to admin_web_app/src/views/crm/Calendar/Calendar.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Calendar/components/EventDialog.tsx b/admin_web_app/src/views/crm/Calendar/components/EventDialog.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Calendar/components/EventDialog.tsx rename to admin_web_app/src/views/crm/Calendar/components/EventDialog.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Calendar/index.ts b/admin_web_app/src/views/crm/Calendar/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Calendar/index.ts rename to admin_web_app/src/views/crm/Calendar/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Calendar/store/calendarSlice.ts b/admin_web_app/src/views/crm/Calendar/store/calendarSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Calendar/store/calendarSlice.ts rename to admin_web_app/src/views/crm/Calendar/store/calendarSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Calendar/store/index.ts b/admin_web_app/src/views/crm/Calendar/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Calendar/store/index.ts rename to admin_web_app/src/views/crm/Calendar/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/CrmDashboard.tsx b/admin_web_app/src/views/crm/CrmDashboard/CrmDashboard.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/CrmDashboard.tsx rename to admin_web_app/src/views/crm/CrmDashboard/CrmDashboard.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/ActiveUsers.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/ActiveUsers.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/ActiveUsers.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/ActiveUsers.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/LeadByCountries.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/LeadByCountries.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/LeadByCountries.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/LeadByCountries.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/Leads.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/Leads.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/Leads.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/Leads.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/ServiceTable.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/ServiceTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/ServiceTable.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/ServiceTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/Statistic.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/Statistic.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/Statistic.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/Statistic.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/UserRatio.tsx b/admin_web_app/src/views/crm/CrmDashboard/components/UserRatio.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/UserRatio.tsx rename to admin_web_app/src/views/crm/CrmDashboard/components/UserRatio.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/style.css b/admin_web_app/src/views/crm/CrmDashboard/components/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/components/style.css rename to admin_web_app/src/views/crm/CrmDashboard/components/style.css diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/index.ts b/admin_web_app/src/views/crm/CrmDashboard/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/index.ts rename to admin_web_app/src/views/crm/CrmDashboard/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts b/admin_web_app/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts rename to admin_web_app/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CrmDashboard/store/index.ts b/admin_web_app/src/views/crm/CrmDashboard/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CrmDashboard/store/index.ts rename to admin_web_app/src/views/crm/CrmDashboard/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/CustomerDetail.tsx b/admin_web_app/src/views/crm/CustomerDetail/CustomerDetail.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/CustomerDetail.tsx rename to admin_web_app/src/views/crm/CustomerDetail/CustomerDetail.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/CustomerProfile.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/CustomerProfile.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/CustomerProfile.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/CustomerProfile.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentHistory.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/PaymentHistory.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentHistory.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/PaymentHistory.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentMethods.tsx b/admin_web_app/src/views/crm/CustomerDetail/components/PaymentMethods.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentMethods.tsx rename to admin_web_app/src/views/crm/CustomerDetail/components/PaymentMethods.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/index.ts b/admin_web_app/src/views/crm/CustomerDetail/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/index.ts rename to admin_web_app/src/views/crm/CustomerDetail/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/store/customerDetailSlice.ts b/admin_web_app/src/views/crm/CustomerDetail/store/customerDetailSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/store/customerDetailSlice.ts rename to admin_web_app/src/views/crm/CustomerDetail/store/customerDetailSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerDetail/store/index.ts b/admin_web_app/src/views/crm/CustomerDetail/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerDetail/store/index.ts rename to admin_web_app/src/views/crm/CustomerDetail/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerForm/CustomerForm.tsx b/admin_web_app/src/views/crm/CustomerForm/CustomerForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerForm/CustomerForm.tsx rename to admin_web_app/src/views/crm/CustomerForm/CustomerForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerForm/PersonalInfoForm.tsx b/admin_web_app/src/views/crm/CustomerForm/PersonalInfoForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerForm/PersonalInfoForm.tsx rename to admin_web_app/src/views/crm/CustomerForm/PersonalInfoForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerForm/SocialLinkForm.tsx b/admin_web_app/src/views/crm/CustomerForm/SocialLinkForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerForm/SocialLinkForm.tsx rename to admin_web_app/src/views/crm/CustomerForm/SocialLinkForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/CustomerForm/index.ts b/admin_web_app/src/views/crm/CustomerForm/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/CustomerForm/index.ts rename to admin_web_app/src/views/crm/CustomerForm/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/Customers.tsx b/admin_web_app/src/views/crm/Customers/Customers.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/Customers.tsx rename to admin_web_app/src/views/crm/Customers/Customers.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditContent.tsx b/admin_web_app/src/views/crm/Customers/components/CustomerEditContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditContent.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomerEditContent.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditDialog.tsx b/admin_web_app/src/views/crm/Customers/components/CustomerEditDialog.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditDialog.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomerEditDialog.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerStatistic.tsx b/admin_web_app/src/views/crm/Customers/components/CustomerStatistic.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerStatistic.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomerStatistic.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableFilter.tsx b/admin_web_app/src/views/crm/Customers/components/CustomerTableFilter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableFilter.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomerTableFilter.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableSearch.tsx b/admin_web_app/src/views/crm/Customers/components/CustomerTableSearch.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableSearch.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomerTableSearch.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomersTable.tsx b/admin_web_app/src/views/crm/Customers/components/CustomersTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomersTable.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomersTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomersTableTools.tsx b/admin_web_app/src/views/crm/Customers/components/CustomersTableTools.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/components/CustomersTableTools.tsx rename to admin_web_app/src/views/crm/Customers/components/CustomersTableTools.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/index.ts b/admin_web_app/src/views/crm/Customers/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/index.ts rename to admin_web_app/src/views/crm/Customers/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/store/customersSlice.ts b/admin_web_app/src/views/crm/Customers/store/customersSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/store/customersSlice.ts rename to admin_web_app/src/views/crm/Customers/store/customersSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Customers/store/index.ts b/admin_web_app/src/views/crm/Customers/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Customers/store/index.ts rename to admin_web_app/src/views/crm/Customers/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/Mail.tsx b/admin_web_app/src/views/crm/Mail/Mail.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/Mail.tsx rename to admin_web_app/src/views/crm/Mail/Mail.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailBody.tsx b/admin_web_app/src/views/crm/Mail/components/MailBody.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailBody.tsx rename to admin_web_app/src/views/crm/Mail/components/MailBody.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetail.tsx b/admin_web_app/src/views/crm/Mail/components/MailDetail.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetail.tsx rename to admin_web_app/src/views/crm/Mail/components/MailDetail.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetailActionBar.tsx b/admin_web_app/src/views/crm/Mail/components/MailDetailActionBar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetailActionBar.tsx rename to admin_web_app/src/views/crm/Mail/components/MailDetailActionBar.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetailContent.tsx b/admin_web_app/src/views/crm/Mail/components/MailDetailContent.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailDetailContent.tsx rename to admin_web_app/src/views/crm/Mail/components/MailDetailContent.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailEditor.tsx b/admin_web_app/src/views/crm/Mail/components/MailEditor.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailEditor.tsx rename to admin_web_app/src/views/crm/Mail/components/MailEditor.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailList.tsx b/admin_web_app/src/views/crm/Mail/components/MailList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailList.tsx rename to admin_web_app/src/views/crm/Mail/components/MailList.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MailSidebar.tsx b/admin_web_app/src/views/crm/Mail/components/MailSidebar.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MailSidebar.tsx rename to admin_web_app/src/views/crm/Mail/components/MailSidebar.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/components/MainCompose.tsx b/admin_web_app/src/views/crm/Mail/components/MainCompose.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/components/MainCompose.tsx rename to admin_web_app/src/views/crm/Mail/components/MainCompose.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/constants.tsx b/admin_web_app/src/views/crm/Mail/constants.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/constants.tsx rename to admin_web_app/src/views/crm/Mail/constants.tsx diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/index.ts b/admin_web_app/src/views/crm/Mail/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/index.ts rename to admin_web_app/src/views/crm/Mail/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/store/index.ts b/admin_web_app/src/views/crm/Mail/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/store/index.ts rename to admin_web_app/src/views/crm/Mail/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/crm/Mail/store/mailSlice.ts b/admin_web_app/src/views/crm/Mail/store/mailSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/crm/Mail/store/mailSlice.ts rename to admin_web_app/src/views/crm/Mail/store/mailSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/demo/CollapseMenuItemView1.tsx b/admin_web_app/src/views/demo/CollapseMenuItemView1.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/CollapseMenuItemView1.tsx rename to admin_web_app/src/views/demo/CollapseMenuItemView1.tsx diff --git a/admin_web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView1.tsx b/admin_web_app/src/views/demo/GroupCollapseMenuItemView1.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView1.tsx rename to admin_web_app/src/views/demo/GroupCollapseMenuItemView1.tsx diff --git a/admin_web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView2.tsx b/admin_web_app/src/views/demo/GroupCollapseMenuItemView2.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView2.tsx rename to admin_web_app/src/views/demo/GroupCollapseMenuItemView2.tsx diff --git a/admin_web_app/Source_webapp/src/views/demo/GroupSingleMenuItemView.tsx b/admin_web_app/src/views/demo/GroupSingleMenuItemView.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/GroupSingleMenuItemView.tsx rename to admin_web_app/src/views/demo/GroupSingleMenuItemView.tsx diff --git a/admin_web_app/Source_webapp/src/views/demo/SingleMenuView.tsx b/admin_web_app/src/views/demo/SingleMenuView.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/SingleMenuView.tsx rename to admin_web_app/src/views/demo/SingleMenuView.tsx diff --git a/admin_web_app/Source_webapp/src/views/demo/component/index.tsx b/admin_web_app/src/views/demo/component/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/demo/component/index.tsx rename to admin_web_app/src/views/demo/component/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceDetails/DeviceDetails.tsx b/admin_web_app/src/views/devices/DeviceDetails/DeviceDetails.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceDetails/DeviceDetails.tsx rename to admin_web_app/src/views/devices/DeviceDetails/DeviceDetails.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx b/admin_web_app/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx rename to admin_web_app/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/MapLocation.tsx b/admin_web_app/src/views/devices/DeviceDetails/componetns/MapLocation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/MapLocation.tsx rename to admin_web_app/src/views/devices/DeviceDetails/componetns/MapLocation.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/UserInfo.tsx b/admin_web_app/src/views/devices/DeviceDetails/componetns/UserInfo.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/UserInfo.tsx rename to admin_web_app/src/views/devices/DeviceDetails/componetns/UserInfo.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceDetails/index.ts b/admin_web_app/src/views/devices/DeviceDetails/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceDetails/index.ts rename to admin_web_app/src/views/devices/DeviceDetails/index.ts diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/DevicesList.tsx b/admin_web_app/src/views/devices/DeviceList/DevicesList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/DevicesList.tsx rename to admin_web_app/src/views/devices/DeviceList/DevicesList.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/DeviceTable.tsx b/admin_web_app/src/views/devices/DeviceList/components/DeviceTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/DeviceTable.tsx rename to admin_web_app/src/views/devices/DeviceList/components/DeviceTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductDeleteConfirmation.tsx b/admin_web_app/src/views/devices/DeviceList/components/ProductDeleteConfirmation.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductDeleteConfirmation.tsx rename to admin_web_app/src/views/devices/DeviceList/components/ProductDeleteConfirmation.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductFilter.tsx b/admin_web_app/src/views/devices/DeviceList/components/ProductFilter.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductFilter.tsx rename to admin_web_app/src/views/devices/DeviceList/components/ProductFilter.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTable.tsx b/admin_web_app/src/views/devices/DeviceList/components/ProductTable.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTable.tsx rename to admin_web_app/src/views/devices/DeviceList/components/ProductTable.tsx index f658bbfc..6a769f0b 100644 --- a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTable.tsx +++ b/admin_web_app/src/views/devices/DeviceList/components/ProductTable.tsx @@ -122,7 +122,6 @@ const ProductTable = () => { const { devices, status } = useGetDevices() const loading = status === 'pending' const data = devices?.data.data - console.log(data) // const loading = useAppSelector( // (state) => state.salesProductList.data.loading diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTableSearch.tsx b/admin_web_app/src/views/devices/DeviceList/components/ProductTableSearch.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTableSearch.tsx rename to admin_web_app/src/views/devices/DeviceList/components/ProductTableSearch.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTableTools.tsx b/admin_web_app/src/views/devices/DeviceList/components/ProductTableTools.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/components/ProductTableTools.tsx rename to admin_web_app/src/views/devices/DeviceList/components/ProductTableTools.tsx diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/index.ts b/admin_web_app/src/views/devices/DeviceList/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/index.ts rename to admin_web_app/src/views/devices/DeviceList/index.ts diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/store/index.ts b/admin_web_app/src/views/devices/DeviceList/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/store/index.ts rename to admin_web_app/src/views/devices/DeviceList/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/devices/DeviceList/store/productListSlice.tsx b/admin_web_app/src/views/devices/DeviceList/store/productListSlice.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/devices/DeviceList/store/productListSlice.tsx rename to admin_web_app/src/views/devices/DeviceList/store/productListSlice.tsx diff --git a/admin_web_app/Source_webapp/src/views/index.ts b/admin_web_app/src/views/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/index.ts rename to admin_web_app/src/views/index.ts diff --git a/admin_web_app/Source_webapp/src/views/market/Market.tsx b/admin_web_app/src/views/market/Market.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/Market.tsx rename to admin_web_app/src/views/market/Market.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/Card.tsx b/admin_web_app/src/views/market/components/Card.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/Card.tsx rename to admin_web_app/src/views/market/components/Card.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/PaginationList.tsx b/admin_web_app/src/views/market/components/PaginationList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/PaginationList.tsx rename to admin_web_app/src/views/market/components/PaginationList.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/PaginationTable.tsx b/admin_web_app/src/views/market/components/PaginationTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/PaginationTable.tsx rename to admin_web_app/src/views/market/components/PaginationTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/Sorting.tsx b/admin_web_app/src/views/market/components/Sorting.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/Sorting.tsx rename to admin_web_app/src/views/market/components/Sorting.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/Statistic.tsx b/admin_web_app/src/views/market/components/Statistic.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/Statistic.tsx rename to admin_web_app/src/views/market/components/Statistic.tsx diff --git a/admin_web_app/Source_webapp/src/views/market/components/data/index.ts b/admin_web_app/src/views/market/components/data/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/data/index.ts rename to admin_web_app/src/views/market/components/data/index.ts diff --git a/admin_web_app/Source_webapp/src/views/market/components/style.css b/admin_web_app/src/views/market/components/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/components/style.css rename to admin_web_app/src/views/market/components/style.css diff --git a/admin_web_app/Source_webapp/src/views/market/index.ts b/admin_web_app/src/views/market/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/index.ts rename to admin_web_app/src/views/market/index.ts diff --git a/admin_web_app/Source_webapp/src/views/market/store/crmDashboardSlice.ts b/admin_web_app/src/views/market/store/crmDashboardSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/store/crmDashboardSlice.ts rename to admin_web_app/src/views/market/store/crmDashboardSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/market/store/index.ts b/admin_web_app/src/views/market/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/market/store/index.ts rename to admin_web_app/src/views/market/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/notification/Notification.tsx b/admin_web_app/src/views/notification/Notification.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/notification/Notification.tsx rename to admin_web_app/src/views/notification/Notification.tsx diff --git a/admin_web_app/Source_webapp/src/views/notification/index.ts b/admin_web_app/src/views/notification/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/notification/index.ts rename to admin_web_app/src/views/notification/index.ts diff --git a/admin_web_app/Source_webapp/src/views/requests/RequestsList.tsx b/admin_web_app/src/views/requests/RequestsList.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/requests/RequestsList.tsx rename to admin_web_app/src/views/requests/RequestsList.tsx diff --git a/admin_web_app/Source_webapp/src/views/requests/components/RequestTable.tsx b/admin_web_app/src/views/requests/components/RequestTable.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/requests/components/RequestTable.tsx rename to admin_web_app/src/views/requests/components/RequestTable.tsx index 30bfedf3..fe085881 100644 --- a/admin_web_app/Source_webapp/src/views/requests/components/RequestTable.tsx +++ b/admin_web_app/src/views/requests/components/RequestTable.tsx @@ -61,7 +61,8 @@ const RequestTable: React.FC = ({ setCount }) => { item.published == true) && (!item.nodeServiceId || item.nodeServiceId == null || - item.nodeServiceId == undefined || item.nodeServiceId == "undefined") + item.nodeServiceId == undefined || + item.nodeServiceId == 'undefined') ) setData(data.data) setFilteredData(data.data) @@ -196,7 +197,6 @@ const RequestTable: React.FC = ({ setCount }) => { const res = (await apiGetUserProfileByUserId( props.row.original?.insertedBy || '' )) as any - console.log(res?.data.data) setUserProfile(res?.data.data) } diff --git a/admin_web_app/Source_webapp/src/views/requests/components/style.css b/admin_web_app/src/views/requests/components/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/views/requests/components/style.css rename to admin_web_app/src/views/requests/components/style.css diff --git a/admin_web_app/Source_webapp/src/views/requests/index.ts b/admin_web_app/src/views/requests/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/requests/index.ts rename to admin_web_app/src/views/requests/index.ts diff --git a/admin_web_app/Source_webapp/src/views/security/CheckPage.tsx b/admin_web_app/src/views/security/CheckPage.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/security/CheckPage.tsx rename to admin_web_app/src/views/security/CheckPage.tsx diff --git a/web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx b/admin_web_app/src/views/services/CreateNewService/CreateNewService.tsx similarity index 99% rename from web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx rename to admin_web_app/src/views/services/CreateNewService/CreateNewService.tsx index eb5a7e7b..ebe1bd9a 100644 --- a/web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx +++ b/admin_web_app/src/views/services/CreateNewService/CreateNewService.tsx @@ -55,8 +55,6 @@ const createNewService = () => { ) const onTabChange = (val: string) => { - console.log(val) - setCurrentTab(val) navigate(`/account/settings/${val}`) } diff --git a/admin_web_app/Source_webapp/src/views/services/CreateNewService/index.ts b/admin_web_app/src/views/services/CreateNewService/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/CreateNewService/index.ts rename to admin_web_app/src/views/services/CreateNewService/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceCode/ServiceCode.tsx b/admin_web_app/src/views/services/ServiceCode/ServiceCode.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceCode/ServiceCode.tsx rename to admin_web_app/src/views/services/ServiceCode/ServiceCode.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceCode/components/BlocklyEditor.tsx b/admin_web_app/src/views/services/ServiceCode/components/BlocklyEditor.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceCode/components/BlocklyEditor.tsx rename to admin_web_app/src/views/services/ServiceCode/components/BlocklyEditor.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.js b/admin_web_app/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.js similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.js rename to admin_web_app/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.js diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceCode/components/style.scss b/admin_web_app/src/views/services/ServiceCode/components/style.scss similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceCode/components/style.scss rename to admin_web_app/src/views/services/ServiceCode/components/style.scss diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceCode/index.tsx b/admin_web_app/src/views/services/ServiceCode/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceCode/index.tsx rename to admin_web_app/src/views/services/ServiceCode/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/BasicInformationFields.tsx b/admin_web_app/src/views/services/ServiceForm/BasicInformationFields.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/BasicInformationFields.tsx rename to admin_web_app/src/views/services/ServiceForm/BasicInformationFields.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/OrganizationFields.tsx b/admin_web_app/src/views/services/ServiceForm/OrganizationFields.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/OrganizationFields.tsx rename to admin_web_app/src/views/services/ServiceForm/OrganizationFields.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/PricingFields.tsx b/admin_web_app/src/views/services/ServiceForm/PricingFields.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/PricingFields.tsx rename to admin_web_app/src/views/services/ServiceForm/PricingFields.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/ProductForm.tsx b/admin_web_app/src/views/services/ServiceForm/ProductForm.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/ProductForm.tsx rename to admin_web_app/src/views/services/ServiceForm/ProductForm.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx b/admin_web_app/src/views/services/ServiceForm/ProductImages.tsx similarity index 99% rename from web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx rename to admin_web_app/src/views/services/ServiceForm/ProductImages.tsx index b49878dd..bd52b622 100644 --- a/web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx +++ b/admin_web_app/src/views/services/ServiceForm/ProductImages.tsx @@ -164,7 +164,6 @@ const ProductImages = (props: ProductImagesProps) => { img: URL.createObjectURL(files[latestUpload]), } const imageList = [...values.imgList, ...[image]] - console.log('imageList', imageList) form.setFieldValue(field.name, imageList) } diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/index.ts b/admin_web_app/src/views/services/ServiceForm/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/index.ts rename to admin_web_app/src/views/services/ServiceForm/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceCreate.tsx b/admin_web_app/src/views/services/ServiceView/ServiceCreate.tsx similarity index 98% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceCreate.tsx rename to admin_web_app/src/views/services/ServiceView/ServiceCreate.tsx index 89ea59ca..e66968f9 100644 --- a/admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceCreate.tsx +++ b/admin_web_app/src/views/services/ServiceView/ServiceCreate.tsx @@ -211,10 +211,7 @@ const createService = ({ } } catch (error) { toast.push( - , + , { placement: 'top-center', } @@ -247,7 +244,6 @@ const createService = ({ const width = svgElement.getAttribute('width') const height = svgElement.getAttribute('height') - console.log(width + ' , ' + height) if (parseInt(width!) <= 300 && parseInt(height!) <= 175) { setSvgContent(svgText) diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx b/admin_web_app/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx rename to admin_web_app/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx index 38a4626e..2d913c29 100644 --- a/admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx +++ b/admin_web_app/src/views/services/ServiceView/ServiceEdit/ServiceEdit.tsx @@ -31,8 +31,6 @@ const ServiceEdit = () => { (service) => service._id === serviceId )[0] - console.log(curService) - const dispatch = useAppDispatch() const location = useLocation() diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceEdit/index.ts b/admin_web_app/src/views/services/ServiceView/ServiceEdit/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/ServiceEdit/index.ts rename to admin_web_app/src/views/services/ServiceView/ServiceEdit/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/index.ts b/admin_web_app/src/views/services/ServiceView/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/index.ts rename to admin_web_app/src/views/services/ServiceView/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/store/index.ts b/admin_web_app/src/views/services/ServiceView/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/store/index.ts rename to admin_web_app/src/views/services/ServiceView/store/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceView/store/productEditSlice.ts b/admin_web_app/src/views/services/ServiceView/store/productEditSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/ServiceView/store/productEditSlice.ts rename to admin_web_app/src/views/services/ServiceView/store/productEditSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/services/Services/Services.tsx b/admin_web_app/src/views/services/Services/Services.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/Services.tsx rename to admin_web_app/src/views/services/Services/Services.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/Card.tsx b/admin_web_app/src/views/services/Services/components/Card.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/Card.tsx rename to admin_web_app/src/views/services/Services/components/Card.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/PaginationTable.tsx b/admin_web_app/src/views/services/Services/components/PaginationTable.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/PaginationTable.tsx rename to admin_web_app/src/views/services/Services/components/PaginationTable.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/Sorting.tsx b/admin_web_app/src/views/services/Services/components/Sorting.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/Sorting.tsx rename to admin_web_app/src/views/services/Services/components/Sorting.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/Statistic.tsx b/admin_web_app/src/views/services/Services/components/Statistic.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/Statistic.tsx rename to admin_web_app/src/views/services/Services/components/Statistic.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/data/index.ts b/admin_web_app/src/views/services/Services/components/data/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/data/index.ts rename to admin_web_app/src/views/services/Services/components/data/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/Services/components/style.css b/admin_web_app/src/views/services/Services/components/style.css similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/components/style.css rename to admin_web_app/src/views/services/Services/components/style.css diff --git a/admin_web_app/Source_webapp/src/views/services/Services/index.ts b/admin_web_app/src/views/services/Services/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/index.ts rename to admin_web_app/src/views/services/Services/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/Services/store/crmDashboardSlice.ts b/admin_web_app/src/views/services/Services/store/crmDashboardSlice.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/store/crmDashboardSlice.ts rename to admin_web_app/src/views/services/Services/store/crmDashboardSlice.ts diff --git a/admin_web_app/Source_webapp/src/views/services/Services/store/index.ts b/admin_web_app/src/views/services/Services/store/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/services/Services/store/index.ts rename to admin_web_app/src/views/services/Services/store/index.ts diff --git a/admin_web_app/src/views/systemlogs/SystemLogs.tsx b/admin_web_app/src/views/systemlogs/SystemLogs.tsx new file mode 100644 index 00000000..4a71a2f7 --- /dev/null +++ b/admin_web_app/src/views/systemlogs/SystemLogs.tsx @@ -0,0 +1,19 @@ +import Container from '@/components/shared/Container' +import AdaptableCard from '@/components/shared/AdaptableCard' +import LogTable from '@/views/systemlogs/components/LogTable' + +const SystemLogs = () => { + return ( + + +
+

Activity/System Logs

+
+ +
+
+ ) +} + +export default SystemLogs + diff --git a/admin_web_app/src/views/systemlogs/components/LogTable.tsx b/admin_web_app/src/views/systemlogs/components/LogTable.tsx new file mode 100644 index 00000000..a4dbb0cc --- /dev/null +++ b/admin_web_app/src/views/systemlogs/components/LogTable.tsx @@ -0,0 +1,45 @@ +import Table from '@/components/ui/Table' +import { LogData, useGetLogs } from '@/utils/hooks/useGetLogs' + +const { Tr, Th, Td, THead, TBody } = Table + +const LogTable = () => { + const { logs } = useGetLogs() + + return ( +
+ + + + + + + + + + {logs && logs.length > 0 ? ( + logs.slice(0, 10).map((log: LogData, i: number) => ( + + + + + + )) + ) : ( + + + + )} + +
MessageTimestampLevel
{log.message} + {new Date( + log.timestamp + ).toLocaleString()} + {log.level}
+ No logs available. +
+
+ ) +} + +export default LogTable diff --git a/admin_web_app/src/views/systemlogs/index.ts b/admin_web_app/src/views/systemlogs/index.ts new file mode 100644 index 00000000..c0f5f374 --- /dev/null +++ b/admin_web_app/src/views/systemlogs/index.ts @@ -0,0 +1,4 @@ +import SystemLogs from './SystemLogs' + +export default SystemLogs + diff --git a/admin_web_app/Source_webapp/src/views/users/user-details/UserDetails.tsx b/admin_web_app/src/views/users/user-details/UserDetails.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/users/user-details/UserDetails.tsx rename to admin_web_app/src/views/users/user-details/UserDetails.tsx diff --git a/admin_web_app/Source_webapp/src/views/users/user-details/index.tsx b/admin_web_app/src/views/users/user-details/index.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/users/user-details/index.tsx rename to admin_web_app/src/views/users/user-details/index.tsx diff --git a/admin_web_app/Source_webapp/src/views/walletAccounts/WalletAccounts.tsx b/admin_web_app/src/views/walletAccounts/WalletAccounts.tsx similarity index 100% rename from admin_web_app/Source_webapp/src/views/walletAccounts/WalletAccounts.tsx rename to admin_web_app/src/views/walletAccounts/WalletAccounts.tsx diff --git a/admin_web_app/Source_webapp/src/views/walletAccounts/index.ts b/admin_web_app/src/views/walletAccounts/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/views/walletAccounts/index.ts rename to admin_web_app/src/views/walletAccounts/index.ts diff --git a/admin_web_app/Source_webapp/src/vite-env.d.ts b/admin_web_app/src/vite-env.d.ts similarity index 100% rename from admin_web_app/Source_webapp/src/vite-env.d.ts rename to admin_web_app/src/vite-env.d.ts diff --git a/admin_web_app/Source_webapp/tailwind.config.cjs b/admin_web_app/tailwind.config.cjs similarity index 100% rename from admin_web_app/Source_webapp/tailwind.config.cjs rename to admin_web_app/tailwind.config.cjs diff --git a/admin_web_app/Source_webapp/tsconfig.eslint.json b/admin_web_app/tsconfig.eslint.json similarity index 100% rename from admin_web_app/Source_webapp/tsconfig.eslint.json rename to admin_web_app/tsconfig.eslint.json diff --git a/admin_web_app/Source_webapp/tsconfig.json b/admin_web_app/tsconfig.json similarity index 100% rename from admin_web_app/Source_webapp/tsconfig.json rename to admin_web_app/tsconfig.json diff --git a/admin_web_app/Source_webapp/tsconfig.node.json b/admin_web_app/tsconfig.node.json similarity index 100% rename from admin_web_app/Source_webapp/tsconfig.node.json rename to admin_web_app/tsconfig.node.json diff --git a/admin_web_app/Source_webapp/twSafelistGenerator/generator.js b/admin_web_app/twSafelistGenerator/generator.js similarity index 100% rename from admin_web_app/Source_webapp/twSafelistGenerator/generator.js rename to admin_web_app/twSafelistGenerator/generator.js diff --git a/admin_web_app/Source_webapp/twSafelistGenerator/index.js b/admin_web_app/twSafelistGenerator/index.js similarity index 100% rename from admin_web_app/Source_webapp/twSafelistGenerator/index.js rename to admin_web_app/twSafelistGenerator/index.js diff --git a/admin_web_app/Source_webapp/vite.config.ts b/admin_web_app/vite.config.ts similarity index 100% rename from admin_web_app/Source_webapp/vite.config.ts rename to admin_web_app/vite.config.ts diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 00000000..3d7bd1a9 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,33 @@ +FROM node:20-alpine AS builder + +WORKDIR /usr/src/app + +RUN npm config set registry https://registry.npmjs.org/ + +RUN npm install -g npm@latest + +COPY package*.json ./ + +RUN npm install + +COPY . . + +RUN npm run build + +FROM node:20-alpine AS runner + +WORKDIR /usr/src/app + +RUN npm config set registry https://registry.npmjs.org/ + +COPY --from=builder /usr/src/app/dist ./dist +COPY --from=builder /usr/src/app/src/modules/utility/templates ./src/modules/utility/templates + +RUN mkdir -p /usr/src/app/uploads +RUN mkdir -p /usr/src/app/logs + +COPY package*.json ./ + +RUN npm install --omit=dev + +CMD ["node", "dist/main.js"] \ No newline at end of file diff --git a/backend/assets/web-pages/reset-pass-page.html b/backend/assets/web-pages/reset-pass-page.html index 69fa1350..a789af52 100644 --- a/backend/assets/web-pages/reset-pass-page.html +++ b/backend/assets/web-pages/reset-pass-page.html @@ -489,7 +489,6 @@

if (validateMatch() == false) { return window.alert('Passwords do not match'); } else { - //console.log('New password: ', password.value); document.getElementById('submitBtn').disabled = true; loading = true; fetch('{{ url }}', { diff --git a/backend/package.json b/backend/package.json index 948ab377..fcef1935 100644 --- a/backend/package.json +++ b/backend/package.json @@ -13,39 +13,35 @@ "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", - "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", - "test": "jest", - "test:watch": "jest --watch", - "test:cov": "jest --coverage", - "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", - "test:e2e": "jest --config ./test/jest-e2e.json" + "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix" }, "dependencies": { "@aws-sdk/client-s3": "^3.600.0", - "@nestjs/common": "^11.1.6", - "@nestjs/config": "^4.0.2", - "@nestjs/core": "^11.1.6", - "@nestjs/jwt": "^11.0.0", - "@nestjs/mongoose": "^11.0.3", - "@nestjs/passport": "^11.0.5", - "@nestjs/platform-express": "^11.1.6", - "@nestjs/platform-socket.io": "^11.1.6", - "@nestjs/serve-static": "^5.0.3", - "@nestjs/swagger": "^11.2.0", - "@nestjs/websockets": "^11.1.6", + "@nestjs/common": "^10.3.9", + "@nestjs/config": "^3.2.2", + "@nestjs/core": "^10.3.9", + "@nestjs/jwt": "^10.2.0", + "@nestjs/mongoose": "^10.0.6", + "@nestjs/passport": "^10.0.3", + "@nestjs/platform-express": "^10.3.9", + "@nestjs/platform-socket.io": "^10.4.2", + "@nestjs/schedule": "^6.0.1", + "@nestjs/serve-static": "^4.0.2", + "@nestjs/swagger": "^7.3.1", + "@nestjs/websockets": "^10.4.2", "acorn": "^8.13.0", "aedes": "^0.49.0", + "agent": "^0.2.1", "ajv": "^6.12.6", "axios": "^1.4.0", "bcrypt": "^5.0.1", - "blockly": "^10.0.2", "class-validator": "^0.14.1", "crypto": "^1.0.1", + "escape-html": "^1.0.3", "ethers": "^6.13.4", "firebase-admin": "^12.0.0", "handlebars": "^4.7.8", - "mongodb": "^6.20.0", - "mongoose": "^8.18.3", + "mongoose": "^6.5.2", "mongoose-aggregate-paginate-v2": "^1.0.6", "mongoose-paginate-v2": "^1.7.0", "mqtt": "^5.7.0", @@ -67,10 +63,10 @@ "ws": "^8.18.0" }, "devDependencies": { - "@nestjs/cli": "^11.0.10", - "@nestjs/schematics": "^11.0.7", - "@nestjs/testing": "^11.1.6", - "@types/express": "^5.0.3", + "@nestjs/cli": "^10.4.5", + "@nestjs/schematics": "^8.0.0", + "@nestjs/testing": "^10.3.9", + "@types/express": "^4.17.13", "@types/jest": "27.5.0", "@types/multer": "^1.4.7", "@types/node": "^16.0.0", @@ -93,22 +89,5 @@ "tsconfig-paths": "4.0.0", "typescript": "^4.3.5", "webpack": "^5.95.0" - }, - "jest": { - "moduleFileExtensions": [ - "js", - "json", - "ts" - ], - "rootDir": "src", - "testRegex": ".*\\.spec\\.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - }, - "collectCoverageFrom": [ - "**/*.(t|j)s" - ], - "coverageDirectory": "../coverage", - "testEnvironment": "node" } } diff --git a/backend/src/app.controller.spec.ts b/backend/src/app.controller.spec.ts deleted file mode 100644 index d22f3890..00000000 --- a/backend/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); - - describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); - }); - }); -}); diff --git a/backend/src/app.controller.ts b/backend/src/app.controller.ts index d4794a71..6ec99701 100644 --- a/backend/src/app.controller.ts +++ b/backend/src/app.controller.ts @@ -7,7 +7,7 @@ import { UserService } from './modules/user/services/user/user.service'; import { ErrorTypeEnum } from './modules/utility/enums/error-type.enum'; import { GeneralException } from './modules/utility/exceptions/general.exception'; import { JwtAuthGuard } from './modules/authentication/guard/jwt-auth.guard'; - +import { LogService } from './modules/logging/log.service'; @Controller('app') export class AppController { @@ -48,7 +48,7 @@ export class AppController { .catch((error) => { let errorMessage = 'Some errors occurred while inserting default roles!'; - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -84,7 +84,8 @@ export class AppController { description: '', }) async getDevices() { + //test logging + LogService.log('Test log message from AppService'); return this.appService.deviceList; } - } diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index cb7be770..a9e837e5 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -4,16 +4,15 @@ import { APP_INTERCEPTOR } from '@nestjs/core'; import { MongooseModule } from '@nestjs/mongoose'; import { ServeStaticModule } from '@nestjs/serve-static'; import { join } from 'path'; + import { AppController } from './app.controller'; import { AppService } from './app.service'; import { AuthenticationModule } from './modules/authentication/authentication.module'; -import { BlocklyModule } from './modules/blockly/blockly.module'; import { BrokerModule } from './modules/broker/broker.module'; import { DeviceModule } from './modules/device/device.module'; import { ContractModule } from './modules/smartcontract/contract.module'; import { SubscriptionsModule } from './modules/subscriptions/subscriptions.module'; import { NotificationModule } from './modules/notification/notification.module'; -import { PanelModule } from './modules/panel/panel.module'; import { ServiceModule } from './modules/service/service.module'; import { UserModule } from './modules/user/user.module'; import databaseConfig from './modules/utility/configurations/database.configuration'; @@ -23,8 +22,8 @@ import { UtilityModule } from './modules/utility/utility.module'; import { MediaModule } from './modules/media/media.module'; import { AdminModule } from './modules/admin/admin.module'; import { BuildingModule } from './modules/building/building.module'; -import { SyslogModule } from './modules/logging/syslog.module'; -//import { ScheduleModule } from '@nestjs/schedule'; +import { LogModule } from './modules/logging/log.module'; +import { ScheduleModule } from '@nestjs/schedule'; @Module({ imports: [ @@ -40,22 +39,21 @@ import { SyslogModule } from './modules/logging/syslog.module'; ), ServeStaticModule.forRoot({ - rootPath: './uploads', + rootPath: join(__dirname, '..', 'uploads'), serveRoot: '/app/uploads', + serveStaticOptions: { + index: false, + fallthrough: true, + }, }), - ServeStaticModule.forRoot({ - rootPath: './uploads/*', - serveRoot: '/app/uploads/*', - }), + LogModule, + ScheduleModule.forRoot(), AuthenticationModule, - SyslogModule, UserModule, BrokerModule, forwardRef(() => DeviceModule), UtilityModule, - //PanelModule, ServiceModule, - BlocklyModule, NotificationModule, BuildingModule, ContractModule, diff --git a/backend/src/app.service.ts b/backend/src/app.service.ts index 07f6bc1b..e1210fa0 100644 --- a/backend/src/app.service.ts +++ b/backend/src/app.service.ts @@ -52,18 +52,14 @@ export class AppService { try { // Check if the file already exists await fs.promises.access(filePath, fs.constants.F_OK); - //console.log(`File ${filePath} already exists. Skipping creation.`); } catch (error) { if (error.code === 'ENOENT') { // File does not exist, so create it await fs.promises.writeFile(filePath, content); - //console.log(`File ${filePath} created successfully.`); } else { throw error; // Re-throw unexpected errors } } - } else { - //console.log(`Folder ${directoryPath} created successfully.`); } } catch (error) { console.error(`Error processing ${filePath}:`); @@ -75,7 +71,6 @@ export class AppService { getDeviceUrlByType(deviceType: string) { if (!this.deviceList || this.deviceList.length === 0) { - console.log('Device list is empty or not loaded.'); return null; } @@ -84,7 +79,6 @@ export class AppService { if (device) { return `${process.env.HOST_PROTOCOL}${process.env.PANEL_URL}/${process.env.HOST_SUB_DIRECTORY}/uploads/devices/${device.fileName}`; } else { - console.log(`Device type "${deviceType}" not found.`); return null; } } diff --git a/backend/src/main.ts b/backend/src/main.ts index c01a8da8..79b6b7c6 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -4,24 +4,10 @@ import { DocumentBuilder } from '@nestjs/swagger/dist/document-builder'; import { SwaggerModule } from '@nestjs/swagger/dist/swagger-module'; import { AppModule } from './app.module'; import { join } from 'path'; -import { Inject, Logger } from '@nestjs/common'; -import { TestService } from './modules/broker/services/test.service'; -import { MqttLogService } from './modules/broker/services/mqtt-log.service'; -import { readFileSync } from 'fs'; -import { SyslogService } from './modules/logging/syslog.service'; async function bootstrap() { const app = await NestFactory.create(AppModule); - const syslog = app.get(SyslogService); - - console.log = (...args) => { - const msg = args - .map((a) => (typeof a === 'string' ? a : JSON.stringify(a))) - .join(' '); - syslog.log(msg); - }; - const config = new DocumentBuilder() .setTitle('FidesInnova') .setDescription('The FidesInnova API description') @@ -70,15 +56,7 @@ async function bootstrap() { process.env.HOST_PORT, ); - let mqttLogService: MqttLogService = new MqttLogService(); - let testService: TestService = new TestService(mqttLogService); - testService.printMsg(); - testService.callDeviceModule(); - // Run MQTT Server. const mqttServerRunner = require('./modules/broker/server/mqtt-server'); - - // Run Blockly Server. - const blocklyServerRunner = require('./modules/blockly/server/blockly-server'); } bootstrap(); diff --git a/backend/src/modules/authentication/authentication.controller.ts b/backend/src/modules/authentication/authentication.controller.ts index 97da4c43..c370b40c 100644 --- a/backend/src/modules/authentication/authentication.controller.ts +++ b/backend/src/modules/authentication/authentication.controller.ts @@ -29,14 +29,17 @@ export class AuthenticationController { @Body('accessToken') accessToken?: string | null, @Body('admin') admin: boolean = false, ) { - return await this.authenticationService.loginWithGoogle(tokenId, accessToken, admin); + return await this.authenticationService.loginWithGoogle( + tokenId, + accessToken, + admin, + ); } @Get('google/redirect') @UseGuards(AuthGuard('google')) async googleLoginCallback(@Req() req) { // Successful Google login - console.log('req.user:', req.user); return req.user; // Add logic to handle user (e.g., generate a JWT) } } diff --git a/backend/src/modules/authentication/authentication.service.ts b/backend/src/modules/authentication/authentication.service.ts index 8f224e1c..8731072c 100644 --- a/backend/src/modules/authentication/authentication.service.ts +++ b/backend/src/modules/authentication/authentication.service.ts @@ -61,7 +61,11 @@ export class AuthenticationService { return null; } - async loginWithGoogle(tokenId?: string | null, accessToken?: string | null, isAdmin = false) { + async loginWithGoogle( + tokenId?: string | null, + accessToken?: string | null, + isAdmin = false, + ) { let payload; if (tokenId) { /* const ticket = await this.client.verifyIdToken({ @@ -69,7 +73,10 @@ export class AuthenticationService { audience: process.env.GOOGLE_CLIENT_ID, }); payload = ticket.getPayload(); */ - throw new GeneralException(ErrorTypeEnum.INTERNAL_SERVER_ERROR, "Error Code #10294") + throw new GeneralException( + ErrorTypeEnum.INTERNAL_SERVER_ERROR, + 'Error Code #10294', + ); } else { const userInfo = await axios .get('https://www.googleapis.com/oauth2/v3/userinfo', { @@ -149,10 +156,9 @@ export class AuthenticationService { { ignoreExpiration: true }, function (err, decoded) { if (err) { - console.log('access token error message: ', err.message); + console.error('access token error message: ', err.message); } else { decodedAccessToken = decoded; - console.log('decoded access token', decoded); } // next() }, @@ -164,10 +170,9 @@ export class AuthenticationService { { ignoreExpiration: true }, function (err, decoded) { if (err) { - console.log('refresh token error message: ', err.message); + console.error('refresh token error message: ', err.message); } else { decodedRefreshToken = decoded; - console.log('decoded refresh token', decoded); if (Number(decodedRefreshToken.exp) < Math.floor(Date.now() / 1000)) { // Math.floor(Date.now()/1000) Converts Date.now() from miliseconds to seconds. throw new GeneralException( @@ -189,7 +194,6 @@ export class AuthenticationService { email: decodedAccessToken.email, sub: decodedAccessToken.sub, }; - console.log(payload); // const signOptions: SignOptions = { algorithm: 'HS256' }; const accessSignOptions: SignOptions = {}; @@ -235,7 +239,6 @@ export class AuthenticationService { accessSignOptions.algorithm = 'ES512'; break; default: - console.log('No such algirithm exists!'); break; } @@ -288,7 +291,6 @@ export class AuthenticationService { refreshSignOptions.algorithm = 'ES512'; break; default: - console.log('No such algirithm exists!'); break; } @@ -434,7 +436,6 @@ export class AuthenticationService { accessToken: accessToken, refreshToken: refreshToken, }; - console.log(user); const response: any = await this.userService.myProfileResponse(user); return { ...response, tokens }; diff --git a/backend/src/modules/authentication/strategy/jwt.strategy.ts b/backend/src/modules/authentication/strategy/jwt.strategy.ts index 8423b16e..ed608f9e 100644 --- a/backend/src/modules/authentication/strategy/jwt.strategy.ts +++ b/backend/src/modules/authentication/strategy/jwt.strategy.ts @@ -29,17 +29,6 @@ export class JwtStrategy extends PassportStrategy(Strategy) { } async validate(payload: any) { - var util = require('util'); - /* console.log( - 'We are in validate function in authentication module and payload is: ' + - util.inspect(payload, { showHidden: false, depth: null, colors: true }), - ); */ - - /* if(payload.exp < Math.floor(Date.now()/1000)){ // Math.floor(Date.now()/1000) Converts Date.now() from miliseconds to seconds. - console.log("payload is expired!"); - throw new GeneralException(401, 'Entered access token is expired please get new token.'); - } */ - return { userId: payload.sub, email: payload.email }; } } diff --git a/backend/src/modules/authentication/zpk/zkp.controller.ts b/backend/src/modules/authentication/zpk/zkp.controller.ts index cd9ec43a..ba1a72ac 100644 --- a/backend/src/modules/authentication/zpk/zkp.controller.ts +++ b/backend/src/modules/authentication/zpk/zkp.controller.ts @@ -39,8 +39,6 @@ export class zpkController { description: 'This api verifies then user proof code.', }) async verifyProof(@Body() body: verifyProofDto, @Request() request) { - console.log('We are in Verify Proof section', body); - if (body.proof === null || body.proof === undefined || body.proof === '') { let errorMessage = 'proof is not valid!'; throw new GeneralException( diff --git a/backend/src/modules/blockly/blockly.module.ts b/backend/src/modules/blockly/blockly.module.ts deleted file mode 100644 index 3b92aba0..00000000 --- a/backend/src/modules/blockly/blockly.module.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Module } from '@nestjs/common'; -import { BlocklyService } from './services/blockly.service'; - -@Module({ - providers: [BlocklyService], -}) -export class BlocklyModule {} diff --git a/backend/src/modules/blockly/server/blockly-server.ts b/backend/src/modules/blockly/server/blockly-server.ts deleted file mode 100644 index cc86f43d..00000000 --- a/backend/src/modules/blockly/server/blockly-server.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { BlocklyService } from '../services/blockly.service'; - -class BlocklyServer { - constructor(private readonly blocklyService?: BlocklyService) { - this.blocklyService = new BlocklyService(); - } - - async launch() { - this.blocklyService.testBlocklyCode(); - this.blocklyService.testIsolatedVm(); - } -} - -// let blocklyServer = new BlocklyServer(); -// blocklyServer.launch(); diff --git a/backend/src/modules/blockly/services/blockly.service.ts b/backend/src/modules/blockly/services/blockly.service.ts deleted file mode 100644 index 068affef..00000000 --- a/backend/src/modules/blockly/services/blockly.service.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { Injectable } from '@nestjs/common'; -import * as Blockly from 'blockly'; -import { javascriptGenerator } from 'blockly/javascript'; - -/** - * Blockly service. - */ - -@Injectable() -export class BlocklyService { - async testBlocklyCode() { - let code = - "if ((4*3) == 13) {console.log('equations is correct!.')} else {console.log('equations is not correct!.')}"; - - try { - eval(code); - } catch (e) {} - } - - async testFunction1() { - console.log('We are in testFunction1.'); - } - - async createService(counts) { - console.log( - '\x1b[5m', - '\x1b[33m', - '\nCreating Isolated Service... ', - '\x1b[0m', - ); - /* const isolate = new ivm.Isolate({ memoryLimit: 128 }); // The default is 128MB and the minimum is 8MB. - const context = isolate.createContextSync(); - const jail = context.global; - jail.setSync('global', jail.derefInto()); - try { - // await context.evalClosureSync(`global._var1 = 50;`); - await context.evalClosureSync(`global._var1 = ${counts};`); - const result = await context.evalSync('(function() { return _var1 })()'); - console.log('result: ', await result); - } catch (e) {} - - isolate.dispose(); */ - } - - async testIsolatedVm() { - let code1 = `if ((4*3) == 13) {console.log('equations is correct!.');} else {console.log('equations is not correct!.');}`; - let code2 = `(function() { return 'Isolate VM is running!'; })()`; - let code3 = `++count;`; - let code4 = `function() {return "Hello!"}`; - - try { - console.log( - '\x1b[5m', - '\x1b[33m', - '\nTesting Isolated Service... ', - '\x1b[0m', - ); - - //console.log('ivm is: ', ivm); - - console.time('run'); - // let isolate = new ivm.Isolate; - /* const isolate = new ivm.Isolate({ memoryLimit: 128 }); // The default is 128MB and the minimum is 8MB. - const context = isolate.createContextSync(); - const script = isolate.compileScriptSync(code3); */ - - //context.evalSync('let count = 0;'); // For let code3 = `++count;`; - // - //console.log('isolate is: ', isolate); - //console.log('context is: ', context); - //console.log('script is: ', script); - // - //console.log(script.runSync(context)); - //console.log(script.runSync(context)); - //console.timeEnd('run'); - // - //const context2 = isolate.createContextSync(); - //const script2 = isolate.compileScriptSync(code3); - - //context2.evalSync('let count = 5;'); // For let code3 = `++count;`; - // - //console.log('isolate is: ', isolate); - //console.log('context is: ', context2); - //console.log('script is: ', script2); - // - //console.log(script2.runSync(context2)); - //console.log(script2.runSync(context2)); - - /** - * Another example. - */ - /* console.log( - '\x1b[34m Isolate heap statistics: \x1b[0m', - await isolate.getHeapStatistics(), - ); - const context3 = isolate.createContextSync(); */ - // const script3 = isolate.compileScriptSync(code4); - /* const jail3 = context3.global; - jail3.setSync('global', jail3.derefInto()); - jail3.setSync('log', function (...args) { - console.log(...args); - }); */ - - try { - // script3.runSync(context3); - /* await context3.evalClosureSync( - `global._STORE = { theme: { name: 'education' } };`, - ); - await context3.evalClosureSync(`global._var1 = 50;`); - await context3.evalClosureSync(`global._var2 = 'String Test';`); - */ - /* const foo = await context3.evalSync( - "(function() { return '${global._STORE.theme.name}' })()" - ).result; */ - /* const foo1 = await context3.evalSync( - '(function() { return _STORE.theme.name })()', - ); - - const foo2 = await context3.evalSync('(function() { return _var1 })()'); - - const foo3 = await context3.evalSync('(function() { return _var2 })()'); - - const foo4 = await context3.evalSync( - '(function() { if (5 == 4) { return true } else { return false }})()', - ); - - const foo5 = await context3.evalSync( - "(function() { if (5 == 4) { return true } else { log('This is function call.'); return false }})()", - ); - */ - /* console.log('foo1', await foo1); - console.log('foo2', await foo2); - console.log('foo3', await foo3); - console.log('foo4', await foo4); - console.log('foo5', await foo5); */ - } catch (error) { - console.log('Error is: ', error); - } - - console.log('\x1b[32m --------------------------------- \x1b[0m'); - console.log('\x1b[32m Isolated Service Test Successful. \x1b[0m'); - console.log('\x1b[32m --------------------------------- \x1b[0m'); - } catch (e) {} - - for (let i = 0; i < 5; i++) { - await this.createService(i); - } - } -} diff --git a/backend/src/modules/broker/controllers/mqtt-log.controller.ts b/backend/src/modules/broker/controllers/mqtt-log.controller.ts index c40fef3b..7182d09b 100644 --- a/backend/src/modules/broker/controllers/mqtt-log.controller.ts +++ b/backend/src/modules/broker/controllers/mqtt-log.controller.ts @@ -51,7 +51,6 @@ export class MqttLogController { let errorMessage = 'Some errors occurred while inserting device log in mqtt log service!'; throw new GeneralException(ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage) }) - console.log("Device log inserted!") } */ @Post('v1/broker-mqtt-log/log-device-event') diff --git a/backend/src/modules/broker/server/test-server.ts b/backend/src/modules/broker/server/test-server.ts deleted file mode 100644 index 5d464351..00000000 --- a/backend/src/modules/broker/server/test-server.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { TestService } from '../services/test.service'; - -class TestServer { - constructor( - @Inject(TestService) - private readonly testService?: TestService, - ) {} - - async testPrint() { - this.testService.callDeviceModule(); - this.testService.printMsg(); - } -} diff --git a/backend/src/modules/broker/services/mqtt-log.service.ts b/backend/src/modules/broker/services/mqtt-log.service.ts index f39e232a..cd3624d1 100644 --- a/backend/src/modules/broker/services/mqtt-log.service.ts +++ b/backend/src/modules/broker/services/mqtt-log.service.ts @@ -1,5 +1,4 @@ -import { Inject, Injectable } from '@nestjs/common'; -import { log } from 'console'; +import { Injectable } from '@nestjs/common'; import { DeviceLogService } from 'src/modules/device/services/device-log.service'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; @@ -10,10 +9,7 @@ import { GeneralException } from 'src/modules/utility/exceptions/general.excepti @Injectable() export class MqttLogService { - constructor( - // @Inject('DeviceLogService') - private readonly deviceLogService?: DeviceLogService, - ) {} + constructor(private readonly deviceLogService?: DeviceLogService) {} async logDeviceEvent(body) { let insertedDeviceLogEvent: any = null; @@ -32,7 +28,6 @@ export class MqttLogService { errorMessage, ); }); - console.log('Device event log inserted!'); return insertedDeviceLogEvent; } @@ -54,14 +49,6 @@ export class MqttLogService { ); }); - console.log('Device data log inserted!'); return insertedDeviceLogEvent; } - - async testLogService() { - console.log('\x1b[5m', '\x1b[33m', '\nTesting log service...', '\x1b[0m'); - console.log('\x1b[32m --------------------------------- \x1b[0m'); - console.log('\x1b[32m Log service Test Successful. \x1b[0m'); - console.log('\x1b[32m --------------------------------- \x1b[0m'); - } } diff --git a/backend/src/modules/broker/services/mqtt.service.ts b/backend/src/modules/broker/services/mqtt.service.ts index c7203909..74a81785 100644 --- a/backend/src/modules/broker/services/mqtt.service.ts +++ b/backend/src/modules/broker/services/mqtt.service.ts @@ -1,4 +1,4 @@ -import { Inject, Injectable, OnModuleInit } from '@nestjs/common'; +import { Injectable, OnModuleInit } from '@nestjs/common'; const aedes = require('aedes')(); import * as fs from 'fs'; import axios from 'axios'; @@ -6,6 +6,7 @@ import { DeviceEventsEnum } from '../enums/device-events.enum'; import { ContractService } from 'src/modules/smartcontract/services/contract.service'; import { DeviceService } from 'src/modules/device/services/device.service'; import { createServer } from 'tls'; +import { LogService } from 'src/modules/logging/log.service'; const wsStream = require('websocket-stream'); const triggerData = {}; @@ -18,13 +19,12 @@ function shouldTrigger(id: string, hours: number): boolean { const hoursSinceLastTrigger = (now - lastTriggerTime) / (1000 * 60 * 60); if (hoursSinceLastTrigger >= hours) { - triggerData[id] = now; // Update the time + triggerData[id] = now; return true; } else { return false; } } else { - // First time this ID is used triggerData[id] = now; return true; } @@ -40,39 +40,34 @@ export class MqttService implements OnModuleInit { private deviceCache: Map = new Map(); async getDeviceType(device: string) { - // Check if the data is already cached if (this.deviceCache.has(device)) { - console.log('Returning cached data for device:', device); return this.deviceCache.get(device); } - // If not cached, fetch the data const deviceData = await this.deviceService.getDeviceInfoByEncryptedId( String(device), '', true, ); - // Cache the data for future use this.deviceCache.set(device, deviceData); - console.log('Data fetched and cached for device:', device); return deviceData; } async onModuleInit() { - console.log('Initialization of MqttService...'); await this.brokerStart(); } async brokerStart() { const mqttPorts = { - mqtt: 1883, // TCP Port: 1883 - mqtts: 8883, // SSL/TLS Port: 8883 - ws: 8080, // WebSocket unencrypted - wss: 8081, // WebSocket encrypted + mqtt: 1883, + mqtts: process.env.MQTT_BROKER_PORT || 8883, + ws: 8080, + wss: process.env.MQTT_WEBSOCKET_PORT || 8081, }; + // Using proper Let's Encrypt certificates - no need to disable validation const tlsOptions = { key: fs.readFileSync('/etc/nginx/ssl/privkey.pem'), cert: fs.readFileSync('/etc/nginx/ssl/fullchain.pem'), @@ -81,7 +76,7 @@ export class MqttService implements OnModuleInit { const tlsServer = createServer(tlsOptions, aedes.handle); tlsServer.listen(mqttPorts.mqtts, function () { - console.log( + LogService.log( `MQTT over TLS / MQTTS started and listening on port ${mqttPorts.mqtts}`, ); }); @@ -91,165 +86,120 @@ export class MqttService implements OnModuleInit { wsStream.createServer({ server: httpServer }, aedes.handle); httpServer.listen(mqttPorts.wss, function () { - console.log('websocket server listening on port ', mqttPorts.wss); + LogService.log( + `MQTT over WebSocket Secure / WSS started and listening on port ${mqttPorts.wss}`, + ); }); aedes.on('subscribe', async function (subscriptions, client) { - console.log( - 'MQTT client \x1b[32m' + - (client ? client.id : client) + - '\x1b[0m subscribed to topics: ' + - subscriptions.map((s) => s.topic).join('\n'), - 'from broker', - aedes.id, + LogService.log( + `MQTT client ${ + client ? client.id : client + } subscribed to topics: ${subscriptions + .map((s) => s.topic) + .join(', ')}`, ); }); aedes.on('unsubscribe', function (subscriptions, client) { - console.log( - 'MQTT client \x1b[32m' + - (client ? client.id : client) + - '\x1b[0m unsubscribed to topics: ' + - subscriptions.join('\n'), - 'from broker', - aedes.id, + LogService.log( + `MQTT client ${ + client ? client.id : client + } unsubscribed to topics: ${subscriptions.join(', ')}`, ); }); - const host = 'https://' + process.env.PANEL_URL; + const host = 'https://' + process.env.NODE_NAME; - // fired when a client connects + // Axios will use system's trusted CA certificates by default + // If NODE_NAME points to a domain with valid Let's Encrypt cert, this will work aedes.on('client', async function (client) { - console.log( - 'Client Connected: \x1b[33m' + - (client ? client.id : client) + - '\x1b[0m', - 'to broker', - aedes.id, - ); + LogService.log(`New MQTT client connected: ${ + client ? client.id : client + } to broker, + ${aedes.id}`); - process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; - //const httpsAgent = new https.Agent({ rejectUnauthorized: false }); - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-event', { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-event', { deviceEncryptedId: client.id, event: DeviceEventsEnum.CONNECTED, - }) - - .then(function (response) { - // handle success - //console.log(response); - }) - .catch(function (error) { - // handle error - //console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error( + 'Failed to log device connection event: ' + error.message, + ); + } }); - // aedes.on("client", await this.saveDeviceEvent); - - // fired when a client disconnects - aedes.on('clientDisconnect', function (client) { - console.log( - 'Client Disconnected: \x1b[31m' + - (client ? client.id : client) + - '\x1b[0m', - 'to broker', - aedes.id, - ); + aedes.on('clientDisconnect', async function (client) { + LogService.log(`MQTT client disconnected: ${ + client ? client.id : client + } to broker, + ${aedes.id}`); - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-event', { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-event', { deviceEncryptedId: client.id, event: DeviceEventsEnum.DISCONNECTED, - }) - .then(function (response) { - // handle success - // console.log(response); - }) - .catch(function (error) { - // handle error - // console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error( + 'Failed to log device disconnection event:', + error.message, + ); + } }); - aedes.on('clientError', function (client, err) { - console.log('client error', client.id, err.message, err.stack); + aedes.on('clientError', async function (client, err) { + LogService.log( + `MQTT client error: ${client ? client.id : client} - Error: ${ + err.message + }`, + ); - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-event', { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-event', { deviceEncryptedId: client.id, event: DeviceEventsEnum.CLIENTERROR, - }) - .then(function (response) { - // handle success - // console.log(response); - }) - .catch(function (error) { - // handle error - // console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error('Failed to log client error event:', error.message); + } }); - aedes.on('connectionError', function (client, err) { - console.log('connection error', client, err.message, err.stack); + aedes.on('connectionError', async function (client, err) { + LogService.log( + `MQTT connection error: ${client} - Error: ${err.message}`, + ); - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-event', { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-event', { deviceEncryptedId: client.id, event: DeviceEventsEnum.CONNECTIONERROR, - }) - .then(function (response) { - // handle success - // console.log(response); - }) - .catch(function (error) { - // handle error - // console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error('Failed to log connection error event:', error.message); + } }); aedes.on('publish', async (packet, client) => { - console.log('Published packet: ', packet); - - console.log('Published packet payload: ', packet.payload.toString()); - - if (packet && packet.payload) { - console.log('publish packet:', packet.payload.toString()); - } - if (client) { - console.log('message from client', client.id); - let payload = packet.payload.toString(); if (payload.includes('from')) { let parsedPayload; try { parsedPayload = JSON.parse(payload); } catch (e) { - console.error(e); - // Return a default object, or null based on use case. - return {}; + console.error('Failed to parse payload:', e); + return; } if (parsedPayload.data?.proof) { const { proof, ...dataWithoutProof } = parsedPayload.data; - const deviceData = await this.getDeviceType(parsedPayload.from) + const deviceData = await this.getDeviceType(parsedPayload.from); await this.contractService.storeZKP( - String(process.env.PANEL_URL), - String(client.id), + String(process.env.NODE_NAME), + String(parsedPayload.from), JSON.stringify(proof), JSON.stringify(dataWithoutProof), ); @@ -258,55 +208,38 @@ export class MqttService implements OnModuleInit { if (shouldTrigger(String(parsedPayload.from), 6)) { try { const deviceData = - await this.deviceService.getDeviceInfoByEncryptedId( - String(parsedPayload.from), - '', - true, - ); + await this.deviceService.getDeviceInfoByEncryptedId( + String(parsedPayload.from), + '', + true, + ); await this.deviceService.editDevice( - { - deviceId: String(deviceData?._id), - hardwareVersion: Number(String(parsedPayload.data.HV)), - firmwareVersion: Number(String(parsedPayload.data.FV)), - } as any, - 'root', - true, - ); - console.log( - `HV and FV of device with id: ${deviceData._id} updated successfully.`, - ); + { + deviceId: String(deviceData?._id), + hardwareVersion: Number(String(parsedPayload.data.HV)), + firmwareVersion: Number(String(parsedPayload.data.FV)), + } as any, + 'root', + true, + ); } catch (error) { - console.log('Error updating device HV and FV:', error); + console.error('Error updating device HV and FV:', error); } - } - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-data', { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-data', { deviceEncryptedId: parsedPayload.from, event: DeviceEventsEnum.PUBLISHED, data: parsedPayload.data, senderDeviceEncryptedId: client.id, - }) - .then(function (response) { - // handle success - // console.log(response); - }) - .catch(function (error) { - // handle error - // console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error('Failed to log device data:', error.message); + } if (client.id !== parsedPayload.from) { - // last commented code - console.log( - '\x1b[33m \nWe are trying to republish node data... \x1b[0m', - ); - aedes.publish({ topic: parsedPayload.from, payload: payload, @@ -316,31 +249,19 @@ export class MqttService implements OnModuleInit { } }); - aedes.on('subscribe', function (subscriptions, client) { - if (client) { - console.log('subscribe from client', subscriptions, client.id); - } - - axios - .post(host + '/app/v1/broker-mqtt-log/log-device-event', { + aedes.on('subscribe', async function (subscriptions, client) { + try { + await axios.post(host + '/app/v1/broker-mqtt-log/log-device-event', { deviceEncryptedId: client.id, event: DeviceEventsEnum.SUBSCRIBED, - }) - .then(function (response) { - // handle success - // console.log(response); - }) - .catch(function (error) { - // handle error - // console.log(error); - }) - .finally(function () { - // always executed }); + } catch (error) { + console.error('Failed to log subscription event:', error.message); + } }); aedes.on('client', function (client) { - console.log('new client', client.id); + LogService.log(`new client connected: ${client.id}`); }); } } diff --git a/backend/src/modules/broker/services/test.service.ts b/backend/src/modules/broker/services/test.service.ts deleted file mode 100644 index 4971d197..00000000 --- a/backend/src/modules/broker/services/test.service.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Inject, Injectable } from '@nestjs/common'; -import { MqttLogService } from './mqtt-log.service'; - -@Injectable() -export class TestService { - constructor( - @Inject(MqttLogService) - private readonly mqttLogService?: MqttLogService, - ) {} - async printMsg() { - console.log('\nService Call Test Successful!\n'); - } - - async callDeviceModule() { - this.mqttLogService.testLogService(); - } -} diff --git a/backend/src/modules/building/buildings/building.repository.ts b/backend/src/modules/building/buildings/building.repository.ts index 7d4e7572..9d68c42e 100644 --- a/backend/src/modules/building/buildings/building.repository.ts +++ b/backend/src/modules/building/buildings/building.repository.ts @@ -27,7 +27,7 @@ export class BuildingRepository { }) .catch((error) => { const errorMessage = 'Some errors occurred while inserting building!'; - console.log(error.message); + console.error(error.message); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -41,7 +41,7 @@ export class BuildingRepository { try { const result = await this.buildingModel .updateOne( - { _id: buildId }, + { _id: { $eq: buildId } }, { $set: editedFields }, // Use $set to update specific fields ) .exec(); @@ -134,7 +134,6 @@ export class BuildingRepository { details: { $exists: true }, }); if (!buildingsExist) { - console.log(`No buildings found for user: ${userId}`); return; } diff --git a/backend/src/modules/building/buildings/building.service.ts b/backend/src/modules/building/buildings/building.service.ts index bfcc1598..b15b97fa 100644 --- a/backend/src/modules/building/buildings/building.service.ts +++ b/backend/src/modules/building/buildings/building.service.ts @@ -154,7 +154,9 @@ export class BuildingService { } async deleteDeviceIdFromBuildingsByUserId(deviceId: string, userId: string) { - console.log("Gholllllllllllll 111111111111111111111") - return this.buildingRepository.deleteDeviceIdFromBuildingsByUserId(deviceId, userId); + return this.buildingRepository.deleteDeviceIdFromBuildingsByUserId( + deviceId, + userId, + ); } } diff --git a/backend/src/modules/device/controllers/device-log.controller.ts b/backend/src/modules/device/controllers/device-log.controller.ts index 63e5abd7..96541a75 100644 --- a/backend/src/modules/device/controllers/device-log.controller.ts +++ b/backend/src/modules/device/controllers/device-log.controller.ts @@ -54,18 +54,14 @@ export class DeviceLogController { devicesRes.map(async (device: any, index) => { usersRes.map(async (user) => { - console.log( - `User S3 Type: ${typeof user.StorX}, S3 Length: ${ - Object.keys(user.StorX).length - }, userID: ${user._id}, Device Owner: ${device.userId}`, - ); + if ( user._id.toString() === device.userId.toString() && (typeof user.StorX).toString() === 'object' && Number(Object.keys(user.StorX).length) > 0 ) { - console.log('User S3 is: ', user.StorX); + const StorX = user.StorX; storxController.setBucketProps( StorX.endpoint, @@ -87,19 +83,6 @@ export class DeviceLogController { deviceID: device.deviceEncryptedId, }); - console.log('Now bucket is: ', storxController.getStorxBucket()); - - if (uploadRes.success == true) { - console.log( - `${device.deviceName}, ${device.mac} : have ${res.length} log datas that uploaded successfully`, - ); - } else { - console.log( - `${device.deviceName}, ${device.mac} : log datas can't be uploaded, got errors !`, - ); - } - - console.log('------------------------------------------------'); // const writer = []; //const startTime = new Date(); //startTime.setDate(startTime.getDate() - 10); @@ -177,7 +160,7 @@ export class DeviceLogController { this.result = data; }) .catch((error) => { - console.log(error); + console.error(error); let errorMessage = 'Some errors occurred while fetching last device log!'; diff --git a/backend/src/modules/device/controllers/device.controller.ts b/backend/src/modules/device/controllers/device.controller.ts index 3ae668dc..74c2be71 100644 --- a/backend/src/modules/device/controllers/device.controller.ts +++ b/backend/src/modules/device/controllers/device.controller.ts @@ -93,7 +93,7 @@ export class DeviceController { const newBody = { ...body, userId: request.user.userId, - nodeId: process.env.PANEL_URL, + nodeId: process.env.NODE_NAME, }; return await this.deviceService.insertDevice(newBody); } @@ -108,8 +108,6 @@ export class DeviceController { 'Edites device by device ID and other fields. This api requires user device profile. Parameters are array of JSON objects like: [{"a1":"v1"},{"a2":"v2"},...], Locations and Geometries are like: "location": {"type":"Point","coordinates": [50,40]}, "geometry": {"type":"Polygon","coordinates": [[50,40],[20,10],[30,60]]} for default set to "location": {}, "geometry": {}', }) async editDevice(@Body() body: EditDeviceDto, @Request() request) { - console.log('We are in editDevice controller'); - if ( body.deviceId === null || body.deviceId === undefined || @@ -131,7 +129,7 @@ export class DeviceController { this.result = data; }) .catch((error) => { - console.log('Error is:', error); + console.error('Error is:', error); let errorMessage = 'Some errors occurred while editing the device!'; throw new GeneralException( @@ -292,8 +290,6 @@ export class DeviceController { description: 'Renames device by device ID and new name.', }) async renameDevice(@Body() body: renameDeviceDto, @Request() request) { - console.log('We are in renameDevice controller'); - if ( body.deviceId === null || body.deviceId === undefined || @@ -578,8 +574,6 @@ export class DeviceController { description: 'This API will locally share a device with user', }) async localShareDevice(@Body() body: LocalShareDto, @Request() request) { - console.log('We are in localShareDevice controller'); - if ( body.deviceId === null || body.deviceId === undefined || @@ -619,8 +613,6 @@ export class DeviceController { description: 'This API will locally unshare a device with user', }) async localUnshareDevice(@Body() body: LocalShareDto, @Request() request) { - console.log('We are in localUnshareDevice controller'); - if ( body.deviceId === null || body.deviceId === undefined || @@ -664,8 +656,6 @@ export class DeviceController { @Param('deviceId') deviceId: string, @Request() request, ) { - console.log('We are in getUsersDeviceSharingWith controller'); - if ( deviceId === null || deviceId === undefined || @@ -697,8 +687,6 @@ export class DeviceController { 'This API will return all devices that are sharing with a user.', }) async getAllDevicesSharingWithUser(@Request() request) { - console.log('We are in getAllDevicesSharingWithUser controller'); - return await this.deviceService.getSharedDevicesWithUserId( request.user.userId, ); diff --git a/backend/src/modules/device/repositories/device-log.repository.ts b/backend/src/modules/device/repositories/device-log.repository.ts index 29a2c04c..02770363 100644 --- a/backend/src/modules/device/repositories/device-log.repository.ts +++ b/backend/src/modules/device/repositories/device-log.repository.ts @@ -1,9 +1,10 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; +import { Types } from 'mongoose'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { DeviceLogModel } from '../models/device-log.model'; -import { DeleteResult } from 'mongodb'; @Injectable() export class DeviceLogRepository { @@ -33,7 +34,7 @@ export class DeviceLogRepository { // return await this.deviceLogModel.create(data) } - async deleteDeviceLogs(query): Promise { + async deleteDeviceLogs(query) { try { const result = await this.deviceLogModel.deleteMany(query); return result; @@ -47,7 +48,7 @@ export class DeviceLogRepository { async editDeviceLog(id, editedData) { await this.deviceLogModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) diff --git a/backend/src/modules/device/repositories/device-type.repository.ts b/backend/src/modules/device/repositories/device-type.repository.ts index 39b8f1ab..2446745a 100644 --- a/backend/src/modules/device/repositories/device-type.repository.ts +++ b/backend/src/modules/device/repositories/device-type.repository.ts @@ -1,5 +1,7 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; +import { Types } from 'mongoose'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { DeviceTypeModel } from '../models/device-type.model'; @@ -34,7 +36,7 @@ export class DeviceTypeRepository { async editDeviceType(id, editedData) { await this.deviceTypeModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -63,8 +65,6 @@ export class DeviceTypeRepository { } async findAllDeviceTypes(whereCondition, populateCondition, selectCondition) { - console.log('we are in findAllDeviceTypes repository!'); - return await this.deviceTypeModel .find() .where(whereCondition) diff --git a/backend/src/modules/device/repositories/device.repository.ts b/backend/src/modules/device/repositories/device.repository.ts index b7b9e1b9..f2ee3008 100644 --- a/backend/src/modules/device/repositories/device.repository.ts +++ b/backend/src/modules/device/repositories/device.repository.ts @@ -32,7 +32,7 @@ export class DeviceRepository { }) .catch((error) => { let errorMessage = 'Some errors occurred while device insertion!'; - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -47,7 +47,7 @@ export class DeviceRepository { async editDevice(id, editedData) { try { const result = (await this.deviceModel.updateOne( - { _id: id }, + { _id: { $eq: id } }, { $set: editedData }, )) as any; @@ -92,8 +92,6 @@ export class DeviceRepository { } async getDevicesByUserId(userId) { - console.log('we are in getDevicesByUserId repository!'); - return await this.deviceModel .find({ userId: userId }) .where({ isDeleted: false }) @@ -107,8 +105,6 @@ export class DeviceRepository { populateCondition, selectCondition, ) { - console.log('we are in findDeviceByMac repository!'); - return await this.deviceModel .findOne({ mac: deviceMac }) .where(whereCondition) @@ -123,8 +119,6 @@ export class DeviceRepository { populateCondition, selectCondition, ) { - console.log('we are in findDeviceByNodeIdAndNodeDeviceId repository!'); - return await this.deviceModel .findOne({ nodeId: nodeId, _id: nodeDeviceId }) .where(whereCondition) @@ -159,7 +153,7 @@ export class DeviceRepository { async deleteDeviceByDeviceId(deviceId) { await this.deviceModel .deleteOne() - .where({ _id: deviceId }) + .where({ _id: { $eq: deviceId } }) .then((data) => { this.result = data; }) @@ -208,8 +202,6 @@ export class DeviceRepository { } async getDeviceByEncryptedId(encryptId) { - console.log('we are in getAllDevices repository!'); - return await this.deviceModel .findOne({ deviceEncryptedId: encryptId }) .where({ isDeleted: false }) @@ -218,8 +210,6 @@ export class DeviceRepository { } async getAllDevices(whereCondition, populateCondition, selectCondition) { - console.log('we are in getAllDevices repository!'); - return await this.deviceModel .find() .where(whereCondition) @@ -230,7 +220,7 @@ export class DeviceRepository { async localShareDeviceWithId(deviceId: string, userId: string) { return await this.deviceModel .updateOne( - { _id: deviceId }, + { _id: { $eq: deviceId } }, { $addToSet: { sharedWith: userId, @@ -243,7 +233,7 @@ export class DeviceRepository { async localUnshareDeviceWithId(deviceId: string, userId: string) { return await this.deviceModel .updateOne( - { _id: deviceId }, + { _id: { $eq: deviceId } }, { $pull: { sharedWith: userId, diff --git a/backend/src/modules/device/services/device-log.service.ts b/backend/src/modules/device/services/device-log.service.ts index 2a0d99c1..9031a0e4 100644 --- a/backend/src/modules/device/services/device-log.service.ts +++ b/backend/src/modules/device/services/device-log.service.ts @@ -27,7 +27,7 @@ export class DeviceLogService { insertDate: new Date(), } - console.log("deviceLog", deviceLog); + let insertedDeviceLog; @@ -256,8 +256,6 @@ export class DeviceLogService { foundDeviceLogs = await this.deviceLogRepository.getDeviceLogs(query); - //console.log(foundDeviceLogs); - return foundDeviceLogs; } @@ -275,8 +273,6 @@ export class DeviceLogService { isAdmin, ); - console.log('foundDevices:', foundDevices); - if (foundDevices?.success == false) { return foundDevices; } @@ -289,8 +285,6 @@ export class DeviceLogService { const logs = await this.deviceLogRepository.getDeviceLogs(query); - console.log('logs2222:', logs); - const periods = this.generatePeriods(startDate, endDate, type); const groupedLogs = this.groupLogsByPeriod(logs, type); @@ -459,8 +453,6 @@ export class DeviceLogService { foundDeviceLogs = await this.deviceLogRepository.getDeviceLogs(query); - console.log('foundDeviceLogs:', foundDeviceLogs); - return foundDeviceLogs; } diff --git a/backend/src/modules/device/services/device.service.ts b/backend/src/modules/device/services/device.service.ts index 1e31486c..8130e6df 100644 --- a/backend/src/modules/device/services/device.service.ts +++ b/backend/src/modules/device/services/device.service.ts @@ -7,12 +7,12 @@ import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { UserService } from 'src/modules/user/services/user/user.service'; import { DeviceLogService } from './device-log.service'; import { EditDeviceDto } from '../data-transfer-objects/edit-device.dto'; -import { NotificationService } from 'src/modules/notification/notification/notification.service'; import { InstalledServiceService } from 'src/modules/service/services/installed-service.service'; import { ContractService } from 'src/modules/smartcontract/services/contract.service'; import { AppService } from 'src/app.service'; import { BuildingService } from 'src/modules/building/buildings/building.service'; import { GlobalShareDto } from '../data-transfer-objects/global-share-dto'; +import { LogService } from 'src/modules/logging/log.service'; // Nodejs encryption with CTR let crypto = require('crypto'); @@ -42,7 +42,6 @@ export class DeviceService { private readonly userService?: UserService, private readonly deviceLogService?: DeviceLogService, private readonly deviceRepository?: DeviceRepository, - private readonly notificationService?: NotificationService, private readonly buildingService?: BuildingService, @Inject(forwardRef(() => AppService)) private readonly appService?: AppService, @@ -64,9 +63,7 @@ export class DeviceService { } encryptDeviceId(deviceId) { - console.log('deviceId: ', deviceId); let cipher = crypto.createCipher(algorithm, defaultEncryptionPassword); - console.log('cipher: ', cipher); let encrypted = cipher.update(deviceId, 'utf8', 'base64'); encrypted += cipher.final('base64'); encrypted = encrypted.replace(/\//g, '~').replace(/\+/g, '_'); @@ -82,7 +79,6 @@ export class DeviceService { ); let decrypted = decipher.update(encryptedDeviceId, 'base64', 'utf8'); decrypted += decipher.final('utf8'); - // console.log('decryptid', text, dec); return decrypted; } @@ -155,10 +151,12 @@ export class DeviceService { if (exist == null || exist == undefined) { let insertedDevice = await this.deviceRepository.insertDevice(newDevice); - console.log('Device inserted!', exist); + LogService.log( + `Device created: ${newDevice.deviceName}`, + newDevice.insertedBy, + ); return insertedDevice; } else { - console.log('Device exist!', exist); return exist; } } @@ -166,22 +164,16 @@ export class DeviceService { async getDevicesByUserId(userId) { let foundDevices: any = null; - console.log('we are in getDeviceByUserId service!'); - foundDevices = await this.deviceRepository.getDevicesByUserId(userId); decodeDeviceEncryptedIds(foundDevices); - //console.log('Found devices are: ', foundDevices); - const lastLogs = await this.deviceLogService.getLastDevicesLogByUserIdAndFieldName( userId, foundDevices, ); - console.log('lastLogs devices are: ', lastLogs); - const updatedDevices = foundDevices.map((item: any) => { const imageUrl = this.appService.getDeviceUrlByType( item.deviceType.toString(), @@ -212,15 +204,10 @@ export class DeviceService { let foundDevicesWithEncryptedDeviceId = []; let encryptedDeviceId; - console.log('we are in getDeviceByUserId service!'); - foundDevices = await this.deviceRepository.getDevicesByUserId(userId); - //console.log('Found devices are: ', foundDevices); - foundDevices.forEach((element) => { encryptedDeviceId = this.encryptDeviceId(element._id.toString()); - //console.log('encryptedDeviceId is: ', encryptedDeviceId); foundDevicesWithEncryptedDeviceId.push({ _id: element._id, encryptedId: encryptedDeviceId, @@ -233,10 +220,6 @@ export class DeviceService { updateDate: element.updateDate, }); }); - console.log( - 'foundDevicesWithEncryptedDeviceId are: ', - foundDevicesWithEncryptedDeviceId, - ); return foundDevicesWithEncryptedDeviceId; } @@ -305,8 +288,6 @@ export class DeviceService { }, }; - console.log(query); - await this.deviceRepository .getInstalledDevicesByDate(query) .then(async (data) => { @@ -347,7 +328,6 @@ export class DeviceService { throw new GeneralException(ErrorTypeEnum.NOT_FOUND, errorMessage); }); - console.log('formatedFoundDevices are: ', formatedFoundDevices); return formatedFoundDevices; } @@ -356,7 +336,6 @@ export class DeviceService { reportMonth, reportDay, ) { - let startDate = new Date(reportYear, reportMonth - 1, reportDay); let endDate = new Date(reportYear, reportMonth - 1, reportDay); endDate.setDate(endDate.getDate() + 1); endDate.setHours(0); @@ -371,8 +350,6 @@ export class DeviceService { isDeleted: false, }; - console.log(query); - await this.deviceRepository .getAllActiveDevices(query) .then(async (data) => { @@ -414,8 +391,6 @@ export class DeviceService { throw new GeneralException(ErrorTypeEnum.NOT_FOUND, errorMessage); }); - console.log('formatedFoundDevices are: ', formatedFoundDevices); - for (const element of formatedFoundDevices) { let foundDeviceLog; await this.deviceLogService @@ -428,10 +403,7 @@ export class DeviceService { .then((data) => { foundDeviceLog = data; - console.log('foundDeviceLog: ', foundDeviceLog); - element.payloadsSent = foundDeviceLog.length; - console.log('foundDeviceLog.length: ', foundDeviceLog.length); }) .catch((error) => { let errorMessage = @@ -450,8 +422,6 @@ export class DeviceService { 'isDeleted userId deviceName deviceEncryptedId deviceType mac insertedBy insertDate updatedBy updateDate'; let foundDevice = null; - console.log('I am in checkDeviceIsExist!'); - foundDevice = await this.findADeviceByMac( deviceMac, whereCondition, @@ -460,10 +430,8 @@ export class DeviceService { ); if (foundDevice) { - console.log('Device found!'); return true; } else { - console.log('Device not found!'); throw new GeneralException( ErrorTypeEnum.NOT_FOUND, 'Device does not exist.', @@ -476,8 +444,6 @@ export class DeviceService { try { let foundDevice: any = null; - console.log('we are in editDevice service!'); - await this.deviceRepository .getDeviceById(body.deviceId) .then((data) => { @@ -490,13 +456,7 @@ export class DeviceService { }); if (foundDevice && foundDevice !== undefined) { - console.log('Founded Device is:', foundDevice); - - console.log( - `Device Node: ${foundDevice.nodeId} ||| BackEnd Node: ${process.env.PANEL_URL}`, - ); - - if (String(foundDevice.nodeId) !== String(process.env.PANEL_URL)) { + if (String(foundDevice.nodeId) !== String(process.env.NODE_NAME)) { let errorMessage = `You can't edit other nodes devices !`; throw new GeneralException(ErrorTypeEnum.FORBIDDEN, errorMessage); } @@ -515,7 +475,7 @@ export class DeviceService { }; return this.result; } - foundDevice.nodeId = String(process.env.PANEL_URL); + foundDevice.nodeId = String(process.env.NODE_NAME); foundDevice.updatedBy = String(userId) == 'root' ? foundDevice.updatedBy : userId; foundDevice.updateDate = new Date(); @@ -523,9 +483,9 @@ export class DeviceService { const newData = { ...foundDevice._doc, ...body }; - console.log('Updated found device for edit is: ', foundDevice); - await this.deviceRepository.editDevice(foundDevice._id, newData); + + LogService.log(`Device updated: ${body}`, userId); return this.result; } catch (error) { let errorMessage = 'Some errors occurred while editing a device!'; @@ -550,7 +510,7 @@ export class DeviceService { throw new GeneralException(ErrorTypeEnum.FORBIDDEN, errorMessage); } - if (device.nodeId !== String(process.env.PANEL_URL)) { + if (device.nodeId !== String(process.env.NODE_NAME)) { let errorMessage = `You can't edit other nodes devices !`; throw new GeneralException(ErrorTypeEnum.FORBIDDEN, errorMessage); } @@ -583,6 +543,7 @@ export class DeviceService { updateDate: new Date().toDateString(), location: { type: 'Point', coordinates: body.coordinate }, }); + LogService.log(`Device shared: ${device.deviceName}`, userId); } async unshareGlobalDevice( @@ -601,7 +562,7 @@ export class DeviceService { throw new GeneralException(ErrorTypeEnum.FORBIDDEN, errorMessage); } - if (device.nodeId !== String(process.env.PANEL_URL)) { + if (device.nodeId !== String(process.env.NODE_NAME)) { let errorMessage = `You can't edit other nodes devices !`; throw new GeneralException(ErrorTypeEnum.FORBIDDEN, errorMessage); } @@ -620,17 +581,33 @@ export class DeviceService { updatedBy: userId, updateDate: new Date().toDateString(), }); + LogService.log(`Device unshared: ${device.deviceName}`, userId); + } + + /* + if a device is shared but doesnt exist on blockchain, unshare it on db + */ + async unshareBySystem(deviceId: string): Promise { + const device = await this.deviceRepository.getDeviceById(deviceId); + + if (!device) { + throw new GeneralException(ErrorTypeEnum.NOT_FOUND, 'Device not found!'); + } + + await this.deviceRepository.editDevice(device._id, { + isShared: false, + + updateDate: new Date().toDateString(), + }); } async updateAllDevices() { - await this.deviceRepository.updateAllNodeIds(process.env.PANEL_URL); + await this.deviceRepository.updateAllNodeIds(process.env.NODE_NAME); } async renameDevice(body, userId, isAdmin = false): Promise { let foundDevice: any = null; - console.log('we are in renameDevice service!'); - await this.deviceRepository .getDeviceById(body.deviceId) .then((data) => { @@ -664,8 +641,6 @@ export class DeviceService { foundDevice.updateDate = new Date(); } - console.log('Updated found device for rename is: ', foundDevice); - await this.deviceRepository .editDevice(foundDevice._id, foundDevice) .then((data) => { @@ -679,6 +654,8 @@ export class DeviceService { ); }); + LogService.log(`Device renamed: ${foundDevice.deviceName}`, userId); + return this.result; } @@ -690,8 +667,6 @@ export class DeviceService { let foundDevices: any = null; let response = []; - console.log('we are in getAllSharedDevices service!'); - foundDevices = await this.deviceRepository.getAllDevices( whereCondition, populateCondition, @@ -700,31 +675,6 @@ export class DeviceService { decodeDeviceEncryptedIds(foundDevices); - /* const logPromises = foundDevices.map(async (device) => { - try { - console.log('Device encrypt isssss:', device.deviceEncryptedId); - - const res = - await this.deviceLogService.getDeviceLogByEncryptedDeviceIdAndFieldName( - device.deviceEncryptedId, - '', - true, - true, - ); - - device.lastLog = res; - - //console.log('Result is:', res); - } catch (error) { - console.error( - `Error fetching log for device ${device.deviceEncryptedId}:`, - error, - ); - } - }); */ - - //await Promise.all(logPromises); - foundDevices.forEach((element) => { response.push({ _id: element._id, @@ -743,7 +693,6 @@ export class DeviceService { insertDate: element.insertDate, }); }); - //console.log('response are: ', response); return response; } @@ -756,16 +705,12 @@ export class DeviceService { let foundDevices: any = null; let response = []; - console.log('we are in getAllDevices service!'); - foundDevices = await this.deviceRepository.getAllDevices( whereCondition, populateCondition, selectCondition, ); - //console.log('Found devices are: ', foundDevices); - foundDevices.forEach((element) => { response.push({ _id: element._id, @@ -784,7 +729,6 @@ export class DeviceService { geometry: element.geometry, }); }); - //console.log('response are: ', response); return response; } @@ -793,14 +737,10 @@ export class DeviceService { let foundDevices: any = null; let response = {}; - console.log('we are in getDeviceInfoByEncryptedId service!'); - foundDevices = await this.deviceRepository.getDeviceByEncryptedId( encryptId, ); - //console.log('foundeddddddd deviceeeeeeeeee: ', foundDevices); - if ( userId.length > 0 && foundDevices && @@ -817,22 +757,6 @@ export class DeviceService { return this.result; } - /* response = { - _id: foundDevices._id, - deviceName: foundDevices.deviceName, - deviceType: foundDevices.deviceType, - mac: foundDevices.mac, - deviceEncryptedId: foundDevices.deviceEncryptedId, - hardwareVersion: foundDevices.hardwareVersion, - firmwareVersion: foundDevices.firmwareVersion, - parameters: foundDevices.parameters, - isShared: foundDevices.isShared, - location: foundDevices.location, - geometry: foundDevices.geometry, - }; */ - - //console.log('response are: ', response); - return foundDevices; } @@ -907,8 +831,6 @@ export class DeviceService { return this.result; } - console.log('Updated found device for deletion is: ', foundDevice); - this.contractService.removeSharedDevice( process.env.NODE_NAME, String(foundDevice.deviceEncryptedId), @@ -951,6 +873,8 @@ export class DeviceService { ); }); + LogService.log(`Device deleted: ${foundDevice.deviceName}`, userId); + return this.result; } @@ -980,6 +904,7 @@ export class DeviceService { false, `Installed service with name "${insService.installedServiceName}" has been deleted because the device is no longer available`, ); + LogService.log(`Device removed: ${insService.deviceName}`, userId); }), ); } @@ -1173,4 +1098,8 @@ export class DeviceService { ); return checkExist; } + + async getDeviceByEncryptedId(deviceEncryptedId: string) { + return this.deviceRepository.getDeviceByEncryptedId(deviceEncryptedId); + } } diff --git a/backend/src/modules/logging/dto/get-internal-log.dto.ts b/backend/src/modules/logging/dto/get-internal-log.dto.ts new file mode 100644 index 00000000..0dcda732 --- /dev/null +++ b/backend/src/modules/logging/dto/get-internal-log.dto.ts @@ -0,0 +1,9 @@ +import { LogLevelEnum } from '../enums/log-level.dto'; + +export class GetInternalLogDto { + message: string; + userId?: string; + nodeName: string; + timestamp: string; + level: LogLevelEnum; +} diff --git a/backend/src/modules/logging/enums/log-level.dto.ts b/backend/src/modules/logging/enums/log-level.dto.ts new file mode 100644 index 00000000..d58076b7 --- /dev/null +++ b/backend/src/modules/logging/enums/log-level.dto.ts @@ -0,0 +1,10 @@ +export enum LogLevelEnum { + EMERGENCY = 'EMERGENCY', + ALERT = 'ALERT', + CRITICAL = 'CRITICAL', + ERROR = 'ERROR', + WARNING = 'WARNING', + NOTICE = 'NOTICE', + INFO = 'INFO', + DEBUG = 'DEBUG', +} diff --git a/backend/src/modules/logging/log-info.service.ts b/backend/src/modules/logging/log-info.service.ts new file mode 100644 index 00000000..b9f1dc52 --- /dev/null +++ b/backend/src/modules/logging/log-info.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@nestjs/common'; +import { GetInternalLogDto } from './dto/get-internal-log.dto'; + +import * as fs from 'fs'; +import * as path from 'path'; +import { LogLevelEnum } from './enums/log-level.dto'; + +@Injectable() +export class LogInfoService { + constructor() { } + + async getInternalLogs(nodeName: string, userId: string): Promise { + const logFile = path.join(process.cwd(), 'logs', 'internal.log'); + + if (fs.existsSync(logFile)) { + const logs = fs.readFileSync(logFile, 'utf-8'); + const rowLogs = logs + .split('\n') + .filter((line: string) => line.trim() !== ''); + return rowLogs + .filter((line: string) => { + const parts = line.split(','); + const node = parts[3]; + return userId ? parts[4] === userId : nodeName === node; + }) + .map((line: string) => { + const parts = line.split(','); + return { + message: parts[0], + level: parts[1] as LogLevelEnum, + timestamp: parts[2], + nodeName: parts[3], + }; + }); + } else { + return []; + } + } +} diff --git a/backend/src/modules/logging/log.controller.ts b/backend/src/modules/logging/log.controller.ts new file mode 100644 index 00000000..eec62155 --- /dev/null +++ b/backend/src/modules/logging/log.controller.ts @@ -0,0 +1,45 @@ +import { Controller, Get, HttpCode, Inject, Request, UseGuards } from '@nestjs/common'; +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'; + +import { JwtAuthGuard } from '../authentication/guard/jwt-auth.guard'; +import { LogInfoService } from './log-info.service'; +import { UserService } from '../user/services/user/user.service'; + +@ApiTags('Manage Activity Logs') +@Controller('app') +export class LogController { + /** + * + */ + constructor( + @Inject(LogInfoService) + private readonly logService: LogInfoService, + @Inject(UserService) + private readonly userService: UserService, + ) { } + + @Get('v1/logs') + @HttpCode(200) + @UseGuards(JwtAuthGuard) + @ApiBearerAuth() + async getLogs(@Request() request) { + const isAdmin = await this.isAdmin(request.user.userId); + return this.logService.getInternalLogs(process.env.NODE_NAME, isAdmin ? null : request.user.userId); + } + + async isAdmin(userId: string) { + const profile = (await this.userService.getUserProfileByIdFromUser( + userId, + )) as any; + if ( + !profile || + !profile?.roles[0]?.name || + (profile?.roles.some((role) => role.name === 'super_admin') == false && + profile?.roles.some((role) => role.name === 'device_admin') == false) + ) { + return false; + } else { + return true; + } + } +} diff --git a/backend/src/modules/logging/log.module.ts b/backend/src/modules/logging/log.module.ts new file mode 100644 index 00000000..0cf5bf56 --- /dev/null +++ b/backend/src/modules/logging/log.module.ts @@ -0,0 +1,66 @@ +import { Global, Module } from '@nestjs/common'; +import { LogService } from './log.service'; +import { SyslogStrategy } from './strategies/syslog.strategy'; +import { InternalStrategy } from './strategies/internal.strategy'; +import { ConfigModule, ConfigService } from '@nestjs/config'; +import * as Syslog from 'syslog-client'; +import { LogController } from './log.controller'; +import { LogInfoService } from './log-info.service'; +import { UserModule } from '../user/user.module'; + +@Global() +@Module({ + imports: [ConfigModule, UserModule], + controllers: [LogController], + providers: [ + { + provide: SyslogStrategy, + useFactory: (configService: ConfigService) => { + const host = configService.get( + 'SYSLOG_SERVER_HOST', + 'localhost', + ); + const port = configService.get('SYSLOG_SERVER_PORT', 514); + const nodeName = configService.get('NODE_NAME', 'app-node'); + const level = configService.get( + 'SYSLOG_SERVER_LEVEL', + Syslog.Severity.Debug, + ); + + const client = Syslog.createClient(host, { port }); + + return new SyslogStrategy(client, nodeName, level); + }, + inject: [ConfigService], + }, + { + provide: InternalStrategy, + useFactory: (configService: ConfigService) => { + const nodeName = configService.get('NODE_NAME', 'app-node'); + const maxSize = configService.get('LOG_MAX_SIZE_MB', 10); + + return new InternalStrategy(nodeName, maxSize); + }, + inject: [ConfigService], + }, + { + provide: LogService, + useFactory: ( + configService: ConfigService, + syslogStrategy: SyslogStrategy, + internalStrategy: InternalStrategy, + ) => { + LogService.setDependencies( + configService, + syslogStrategy, + internalStrategy, + ); + return LogService; + }, + inject: [ConfigService, SyslogStrategy, InternalStrategy], + }, + LogInfoService, + ], + exports: [LogService], +}) +export class LogModule { } diff --git a/backend/src/modules/logging/log.service.ts b/backend/src/modules/logging/log.service.ts new file mode 100644 index 00000000..88e9102d --- /dev/null +++ b/backend/src/modules/logging/log.service.ts @@ -0,0 +1,35 @@ +import { ConfigService } from '@nestjs/config'; +import { SyslogStrategy } from './strategies/syslog.strategy'; +import { InternalStrategy } from './strategies/internal.strategy'; +import { GetInternalLogDto } from './dto/get-internal-log.dto'; + +export class LogService { + private static configService: ConfigService; + private static syslogStrategy: SyslogStrategy; + private static internalStrategy: InternalStrategy; + + static setDependencies( + config: ConfigService, + syslog: SyslogStrategy, + internal: InternalStrategy, + ): void { + LogService.configService = config; + LogService.syslogStrategy = syslog; + LogService.internalStrategy = internal; + } + + static log(message: string, userId?: string): void { + if ( + LogService.configService.get('SYSLOG_SERVER_ENABLED') === 'True' + ) { + LogService.syslogStrategy.log(message, userId); + } + + if ( + LogService.configService.get('INTERNAL_LOGGING_ENABLED') === + 'True' + ) { + LogService.internalStrategy.log(message, userId); + } + } +} diff --git a/backend/src/modules/logging/strategies/internal.strategy.ts b/backend/src/modules/logging/strategies/internal.strategy.ts new file mode 100644 index 00000000..a35a83c7 --- /dev/null +++ b/backend/src/modules/logging/strategies/internal.strategy.ts @@ -0,0 +1,37 @@ +import { Injectable } from '@nestjs/common'; +import { LoggingStrategyInterface } from './logging-strategy.interface'; +import * as fs from 'fs'; +import * as path from 'path'; + +import { LogLevelEnum } from '../enums/log-level.dto'; + +@Injectable() +export class InternalStrategy implements LoggingStrategyInterface { + constructor( + private readonly nodeName: string, + private readonly maxSize: number, + ) {} + + log(message: string, userId?: string): void { + message += `,${LogLevelEnum.DEBUG},${new Date().toISOString()},${ + this.nodeName + }`; + if (userId) { + message += `,${userId}`; + } + + const logFile = path.join(process.cwd(), 'logs', 'internal.log'); + const dir = path.dirname(logFile); + + if (!fs.existsSync(dir)) { + fs.mkdirSync(dir, { recursive: true }); + } + + const maxSize = this.maxSize * 1024 * 1024; + if (fs.existsSync(logFile) && fs.statSync(logFile).size >= maxSize) { + throw new Error('Log file size exceeded the maximum limit.'); + } + + fs.appendFileSync(logFile, message + '\n'); + } +} diff --git a/backend/src/modules/logging/strategies/logging-strategy.interface.ts b/backend/src/modules/logging/strategies/logging-strategy.interface.ts new file mode 100644 index 00000000..b0a3ac25 --- /dev/null +++ b/backend/src/modules/logging/strategies/logging-strategy.interface.ts @@ -0,0 +1,3 @@ +export interface LoggingStrategyInterface { + log(message: string, userId?: string): void; +} diff --git a/backend/src/modules/logging/strategies/syslog.strategy.ts b/backend/src/modules/logging/strategies/syslog.strategy.ts new file mode 100644 index 00000000..70a9144a --- /dev/null +++ b/backend/src/modules/logging/strategies/syslog.strategy.ts @@ -0,0 +1,33 @@ +import { Injectable } from '@nestjs/common'; +import { LoggingStrategyInterface } from './logging-strategy.interface'; +import * as Syslog from 'syslog-client'; + +@Injectable() +export class SyslogStrategy implements LoggingStrategyInterface { + /** + * + */ + constructor( + private client: Syslog.Client, + private readonly nodeName: string, + private readonly level: number, + ) {} + + log(message: string, userId?: string): void { + if (userId) { + message += `,${userId},${this.nodeName}`; + } else { + message += `,${this.nodeName}`; + } + this.client.log( + message, + { + facility: Syslog.Facility.Local0, + severity: this.level, + }, + (err) => { + if (err) console.error('Syslog send error:', err); + }, + ); + } +} diff --git a/backend/src/modules/logging/syslog.module.ts b/backend/src/modules/logging/syslog.module.ts deleted file mode 100644 index d08879a6..00000000 --- a/backend/src/modules/logging/syslog.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Module } from '@nestjs/common'; -import { SyslogService } from './syslog.service'; - -@Module({ - imports: [], - controllers: [], - providers: [SyslogService], - exports: [SyslogService], -}) -export class SyslogModule {} diff --git a/backend/src/modules/logging/syslog.service.ts b/backend/src/modules/logging/syslog.service.ts deleted file mode 100644 index 8be2923b..00000000 --- a/backend/src/modules/logging/syslog.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Injectable } from '@nestjs/common'; -import * as Syslog from 'syslog-client'; - -@Injectable() -export class SyslogService { - private client: Syslog.Client | null = null; - private enabled = false; - private username: string; - private password: string; - - constructor() { - this.enabled = process.env.Syslog_Server_Enabled === 'True'; - this.username = process.env.Syslog_Server_Username || ''; - this.password = process.env.Syslog_Server_Password || ''; - - if (this.enabled) { - this.client = Syslog.createClient(process.env.Syslog_Server_Host, { - port: Number(process.env.Syslog_Server_Port || 514), - transport: Syslog.Transport.Udp, - // auth: { - // username: this.username, - // password: this.password, - // }, - }); - } - } - - log(message: string) { - if (!this.client || !this.enabled) return; - - const messageWithUser = - this.username && this.password - ? `[${this.username}] ${message}` - : message; - - this.client.log( - messageWithUser, - { - facility: Syslog.Facility.Local0, - severity: Number(process.env.Syslog_Serverl_Level || 3), - }, - (err) => { - if (err) console.error('Syslog send error:', err); - }, - ); - } -} diff --git a/backend/src/modules/media/controller/media.controller.ts b/backend/src/modules/media/controller/media.controller.ts index 28a070d2..c042f866 100644 --- a/backend/src/modules/media/controller/media.controller.ts +++ b/backend/src/modules/media/controller/media.controller.ts @@ -64,7 +64,8 @@ export class MediaController { }, path: { type: 'string', - description: 'Custom path within uploads directory (e.g. NFT/metadata)', + description: + 'Custom path within uploads directory (e.g. NFT/metadata)', }, }, }, @@ -76,8 +77,6 @@ export class MediaController { @Body() body: uploadFileDto, @Request() request, ) { - console.log('We are in upload media upload'); - try { const uploadResult = await this.mediaService.insertMedia( type, diff --git a/backend/src/modules/media/services/media.service.ts b/backend/src/modules/media/services/media.service.ts index 54523c99..639b590c 100644 --- a/backend/src/modules/media/services/media.service.ts +++ b/backend/src/modules/media/services/media.service.ts @@ -4,7 +4,7 @@ import { GeneralException } from 'src/modules/utility/exceptions/general.excepti import { uploadFileDto } from '../dto/media-dto'; import { InjectModel } from '@nestjs/mongoose'; import { MediaRepository } from 'src/modules/utility/repositories/media.repository'; -import { join } from 'path'; +import { join, resolve } from 'path'; import * as fs from 'fs'; @Injectable() @@ -20,18 +20,38 @@ export class MediaService { userId: string, file: Express.Multer.File, ) { - // Handle custom path const basePath = './uploads'; const customPath = body?.path || ''; - const fullPath = join(basePath, customPath); - + + const uploadsRootAbsPath = resolve(basePath); + const fullPath = resolve(uploadsRootAbsPath, customPath); + const newFilePath = resolve(fullPath, file.filename); + + if ( + !fullPath.startsWith(uploadsRootAbsPath + '/') && + fullPath !== uploadsRootAbsPath + ) { + throw new GeneralException( + ErrorTypeEnum.UNPROCESSABLE_ENTITY, + 'Invalid media path: Directory traversal is not allowed.', + ); + } + // Check that newFilePath is inside uploads root (in case filename is malicious) + if ( + !newFilePath.startsWith(uploadsRootAbsPath + '/') && + newFilePath !== uploadsRootAbsPath + ) { + throw new GeneralException( + ErrorTypeEnum.UNPROCESSABLE_ENTITY, + 'Invalid file name: Directory traversal is not allowed.', + ); + } + // Create directory if it doesn't exist if (!fs.existsSync(fullPath)) { fs.mkdirSync(fullPath, { recursive: true }); } - // Move file to custom path - const newFilePath = join(fullPath, file.filename); fs.renameSync(file.path, newFilePath); const newMedium = { @@ -49,8 +69,6 @@ export class MediaService { updateDate: new Date(), }; - console.log('We are in Insert media', newMedium); - try { const uploadedFile = await this.mediaRepository.create(newMedium); @@ -75,7 +93,7 @@ export class MediaService { ); } } catch (error) { - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.INTERNAL_SERVER_ERROR, @@ -98,7 +116,7 @@ export class MediaService { }/${media.path}`, }; } catch (error) { - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.INTERNAL_SERVER_ERROR, 'An error occurred while retrieving the media.', diff --git a/backend/src/modules/notification/notification/notification.repository.ts b/backend/src/modules/notification/notification/notification.repository.ts index 1a0fefff..60eadbed 100644 --- a/backend/src/modules/notification/notification/notification.repository.ts +++ b/backend/src/modules/notification/notification/notification.repository.ts @@ -27,7 +27,7 @@ export class NotificationRepository { .catch((error) => { const errorMessage = 'Some errors occurred while inserting notification!'; - console.log(error.message); + console.error(error.message); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -82,7 +82,7 @@ export class NotificationRepository { try { const result = await this.notificationModel .updateOne( - { _id: notifId }, + { _id: { $eq: notifId } }, { $set: editedFields }, // Use $set to update specific fields ) .exec(); diff --git a/backend/src/modules/notification/notification/notification.service.ts b/backend/src/modules/notification/notification/notification.service.ts index 27bc0c76..51926d9e 100644 --- a/backend/src/modules/notification/notification/notification.service.ts +++ b/backend/src/modules/notification/notification/notification.service.ts @@ -59,7 +59,7 @@ export class NotificationService { }); return 'notification send'; } catch (err) { - console.log(err); + console.error(err); throw new BadRequestException(undefined, err.message); } diff --git a/backend/src/modules/panel/controllers/device.controller.ts b/backend/src/modules/panel/controllers/device.controller.ts index 865863d8..f9da4c10 100644 --- a/backend/src/modules/panel/controllers/device.controller.ts +++ b/backend/src/modules/panel/controllers/device.controller.ts @@ -156,7 +156,6 @@ export class DeviceController { description: 'Renames device by device ID and new name.', }) async renameDevice(@Body() body: renameDeviceDto, @Request() request) { - console.log('We are in renameDevice controller'); if ( body.deviceId === null || diff --git a/backend/src/modules/panel/repositories/customer.repository.ts b/backend/src/modules/panel/repositories/customer.repository.ts index 0310f61f..6172c880 100644 --- a/backend/src/modules/panel/repositories/customer.repository.ts +++ b/backend/src/modules/panel/repositories/customer.repository.ts @@ -9,9 +9,8 @@ import { CustomerModel } from '../models/customer.model'; export class CustomerRepository { private result; - constructor() /* @InjectModel('iacustomer', 'panelDb') // panelDb is defined in app.module.ts - private readonly customerModel?: CustomerModel, */ - {} + constructor /* @InjectModel('iacustomer', 'panelDb') // panelDb is defined in app.module.ts + private readonly customerModel?: CustomerModel, */() {} /* async insertCustomer(data) { await this.customerModel @@ -53,7 +52,7 @@ export class CustomerRepository { populateCondition, selectCondition, ) { - console.log('we are in findCustomerByEmail repository!'); + return await this.customerModel .findOne({ Email: customerEmail }) diff --git a/backend/src/modules/panel/repositories/device-type.repository.ts b/backend/src/modules/panel/repositories/device-type.repository.ts index 9575c5c8..565c1692 100644 --- a/backend/src/modules/panel/repositories/device-type.repository.ts +++ b/backend/src/modules/panel/repositories/device-type.repository.ts @@ -8,9 +8,8 @@ import { DeviceTypeModel } from '../models/device-type.model'; export class DeviceTypeRepository { private result; - constructor() /* @InjectModel('iadevicetype', 'panelDb') // panelDb is defined in app.module.ts - private readonly deviceTypeModel?: DeviceTypeModel, */ - {} + constructor /* @InjectModel('iadevicetype', 'panelDb') // panelDb is defined in app.module.ts + private readonly deviceTypeModel?: DeviceTypeModel, */() {} /* async insertDeviceType(data) { await this.deviceTypeModel @@ -34,7 +33,6 @@ export class DeviceTypeRepository { } async findAllDeviceTypes(whereCondition, populateCondition, selectCondition) { - console.log('we are in findAllDeviceTypes repository!'); return await this.deviceTypeModel .find() diff --git a/backend/src/modules/panel/repositories/device.repository.ts b/backend/src/modules/panel/repositories/device.repository.ts index ad544822..6921dcfc 100644 --- a/backend/src/modules/panel/repositories/device.repository.ts +++ b/backend/src/modules/panel/repositories/device.repository.ts @@ -10,9 +10,8 @@ import { DeviceModel } from '../models/device.model'; export class DeviceRepository { private result; - constructor() /* @InjectModel('iadevice', 'panelDb') // panelDb is defined in app.module.ts - private readonly deviceModel?: DeviceModel, */ - {} + constructor /* @InjectModel('iadevice', 'panelDb') // panelDb is defined in app.module.ts + private readonly deviceModel?: DeviceModel, */() {} /* async insertDevice(data) { await this.deviceModel @@ -41,7 +40,7 @@ export class DeviceRepository { populateCondition, selectCondition, ) { - console.log('we are in findDevicesById repository!'); + return await this.deviceModel .findOne({ _id: deviceId }) @@ -56,7 +55,7 @@ export class DeviceRepository { populateCondition, selectCondition, ) { - console.log('we are in findDeviceByHomeId repository!'); + return await this.deviceModel .find({ HomeId: homeId }) @@ -71,7 +70,7 @@ export class DeviceRepository { populateCondition, selectCondition, ) { - console.log('we are in findDeviceByMac repository!'); + return await this.deviceModel .findOne({ MAC: deviceMac }) diff --git a/backend/src/modules/panel/repositories/home.repository.ts b/backend/src/modules/panel/repositories/home.repository.ts index 0a1a6a39..2fc836cf 100644 --- a/backend/src/modules/panel/repositories/home.repository.ts +++ b/backend/src/modules/panel/repositories/home.repository.ts @@ -9,9 +9,8 @@ import { HomeModel } from '../models/home.model'; export class HomeRepository { private result; - constructor() /* @InjectModel('iahome', 'panelDb') // panelDb is defined in app.module.ts - private readonly homeModel?: HomeModel, */ - {} + constructor /* @InjectModel('iahome', 'panelDb') // panelDb is defined in app.module.ts + private readonly homeModel?: HomeModel, */() {} /* async insertHome(data) { await this.homeModel @@ -40,7 +39,6 @@ export class HomeRepository { populateCondition, selectCondition, ) { - console.log('we are in findCustomerByEmail repository!'); return await this.homeModel .findOne({ CustomerId: customerId }) diff --git a/backend/src/modules/panel/services/activity.service.ts b/backend/src/modules/panel/services/activity.service.ts index 521225cf..f3102754 100644 --- a/backend/src/modules/panel/services/activity.service.ts +++ b/backend/src/modules/panel/services/activity.service.ts @@ -31,14 +31,12 @@ export class ActivityService { }; query[fieldName] = { $exists: true }; - console.log(query); foundActivities = await this.activityRepository.getDeviceActivityByEncryptedDeviceIdAndFieldName( query, ); - console.log(foundActivities); return foundActivities; } @@ -64,14 +62,12 @@ export class ActivityService { }; query[fieldName] = { $exists: true }; - console.log(query); foundActivities = await this.activityRepository.getDeviceActivityByEncryptedDeviceIdAndFieldNameAndDate( query, ); - console.log(foundActivities); return foundActivities; } diff --git a/backend/src/modules/panel/services/customer.service.ts b/backend/src/modules/panel/services/customer.service.ts index 60894480..bba3830e 100644 --- a/backend/src/modules/panel/services/customer.service.ts +++ b/backend/src/modules/panel/services/customer.service.ts @@ -72,7 +72,7 @@ export class CustomerService { 'IsActive Email Username Password FirstName LastName Mobile createdAt updatedAt'; let foundCustomer = null; - console.log('I am in checkCustomerEmailIsExist!'); + foundCustomer = await this.findACustomerByEmail( customerEmail, @@ -82,10 +82,8 @@ export class CustomerService { ); if (foundCustomer) { - console.log('Customer found!'); return true; } else { - console.log('Customer not found!'); throw new GeneralException( ErrorTypeEnum.NOT_FOUND, 'Customer does not exist.', @@ -113,7 +111,6 @@ export class CustomerService { let insertedCustomer = await this.customerRepository.insertCustomer( newCustomer, ); - console.log('Customer inserted!'); return insertedCustomer; } @@ -128,18 +125,6 @@ export class CustomerService { let selectCondition = 'IsActive Email Username Password FirstName LastName Mobile createdAt updatedAt'; - console.log('we are in getCutomerProfileByEmail service!'); - - console.log( - 'Found customer is: ', - await this.customerRepository.findCustomerByEmail( - customerEmail, - whereCondition, - populateCondition, - selectCondition, - ), - ); - return await this.customerRepository.findCustomerByEmail( customerEmail, whereCondition, diff --git a/backend/src/modules/panel/services/device-type.service.ts b/backend/src/modules/panel/services/device-type.service.ts index ddebb193..372fda81 100644 --- a/backend/src/modules/panel/services/device-type.service.ts +++ b/backend/src/modules/panel/services/device-type.service.ts @@ -34,7 +34,6 @@ export class DeviceTypeService { let foundDeviceTypes: any = null; let response = []; - console.log('we are in getDeviceByHomeId service!'); foundDeviceTypes = await this.deviceTypeRepository.findAllDeviceTypes( whereCondition, @@ -42,7 +41,6 @@ export class DeviceTypeService { selectCondition, ); - console.log('Found device types are: ', foundDeviceTypes); foundDeviceTypes.forEach((element) => { response.push({ @@ -59,7 +57,6 @@ export class DeviceTypeService { VersionNo: element.VersionNo, }); }); - console.log('response are: ', response); return response; } */ diff --git a/backend/src/modules/panel/services/device.service.ts b/backend/src/modules/panel/services/device.service.ts index 11f27d35..ff1d0d58 100644 --- a/backend/src/modules/panel/services/device.service.ts +++ b/backend/src/modules/panel/services/device.service.ts @@ -1,5 +1,12 @@ import { Injectable } from '@nestjs/common'; +import { InjectConnection } from '@nestjs/mongoose'; +import { Mongoose, Connection } from 'mongoose'; +import mongoose from 'mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; import { DeviceRepository } from '../repositories/device.repository'; +import * as randompassword from 'secure-random-password'; +import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; +import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; // Nodejs encryption with CTR let crypto = require('crypto'); @@ -33,9 +40,7 @@ export class DeviceService { } encryptDeviceId(deviceId) { - console.log('deviceId: ', deviceId); let cipher = crypto.createCipher(algorithm, defaultEncryptionPassword); - console.log('cipher: ', cipher); let encrypted = cipher.update(deviceId, 'utf8', 'base64'); encrypted += cipher.final('base64'); encrypted = encrypted.replace(/\//g, '~').replace(/\+/g, '_'); @@ -51,7 +56,6 @@ export class DeviceService { ); let decrypted = decipher.update(encryptedDeviceId, 'base64', 'utf8'); decrypted += decipher.final('utf8'); - // console.log('decryptid', text, dec); return decrypted; } @@ -67,7 +71,6 @@ export class DeviceService { }; let insertedDevice = await this.deviceRepository.insertDevice(newDevice); - console.log('Customer device inserted!'); return insertedDevice; } @@ -78,7 +81,6 @@ export class DeviceService { 'Removed HomeId Name GPS Password IsActive DeviceType createdAt updatedAt RemoveTime MAC'; let foundDevices: any = null; - console.log('we are in getDeviceByHomeId service!'); foundDevices = await this.deviceRepository.findDevicesByHomeId( homeId, @@ -87,7 +89,6 @@ export class DeviceService { selectCondition, ); - console.log('Found devices are: ', foundDevices); return foundDevices; } @@ -101,7 +102,6 @@ export class DeviceService { let foundDevicesWithEncryptedDeviceId = []; let encryptedDeviceId; - console.log('we are in getDeviceByHomeId service!'); foundDevices = await this.deviceRepository.findDevicesByHomeId( homeId, @@ -110,11 +110,9 @@ export class DeviceService { selectCondition, ); - console.log('Found devices are: ', foundDevices); foundDevices.forEach((element) => { encryptedDeviceId = this.encryptDeviceId(element._id.toString()); - console.log('encryptedDeviceId is: ', encryptedDeviceId); foundDevicesWithEncryptedDeviceId.push({ _id: element._id, EncryptedId: encryptedDeviceId, @@ -130,10 +128,6 @@ export class DeviceService { UpdateDate: element.updatedAt, }); }); - console.log( - 'foundDevicesWithEncryptedDeviceId are: ', - foundDevicesWithEncryptedDeviceId, - ); return foundDevicesWithEncryptedDeviceId; } @@ -187,7 +181,6 @@ export class DeviceService { 'Removed HomeId Name GPS Password IsActive DeviceType createdAt updatedAt RemoveTime MAC'; let foundDevice = null; - console.log('I am in checkDeviceIsExist!'); foundDevice = await this.findADeviceByMac( deviceMac, @@ -197,10 +190,8 @@ export class DeviceService { ); if (foundDevice) { - console.log('Device found!'); return true; } else { - console.log('Device not found!'); throw new GeneralException( ErrorTypeEnum.NOT_FOUND, 'Device does not exist.', @@ -231,7 +222,6 @@ export class DeviceService { '_id Removed HomeId Name GPS Password IsActive DeviceType createdAt updatedAt RemoveTime MAC'; let foundDevice: any = null; - console.log('we are in renameDevice service!'); await this.deviceRepository .findDeviceById( @@ -255,7 +245,6 @@ export class DeviceService { foundDevice.updatedAt = new Date(); } - console.log('Updated found device for rename is: ', foundDevice); await this.deviceRepository .editDevice(foundDevice._id, foundDevice) @@ -303,7 +292,6 @@ export class DeviceService { foundDevice.updatedAt = new Date(); } - console.log('Updated found device for deletion is: ', foundDevice); await this.deviceRepository .editDevice(foundDevice._id, foundDevice) diff --git a/backend/src/modules/panel/services/home.service.ts b/backend/src/modules/panel/services/home.service.ts index ef65b65b..a99bd2a2 100644 --- a/backend/src/modules/panel/services/home.service.ts +++ b/backend/src/modules/panel/services/home.service.ts @@ -31,7 +31,6 @@ export class HomeService { }; let insertedHome = await this.homeRepository.insertHome(newHome); - console.log('Customer home inserted!'); return insertedHome; } @@ -42,7 +41,6 @@ export class HomeService { 'Address CustomerId Name Type IsActive Guard DeviceType updatedAt updateAt Timezone'; let foundHome: any = null; - console.log('we are in getHomeProfileByCustomerId service!'); foundHome = await this.homeRepository.findHomeByCustomerId( customerId, @@ -51,7 +49,6 @@ export class HomeService { selectCondition, ); - console.log('Found Home is: ', foundHome); return await foundHome; } diff --git a/backend/src/modules/service/controllers/installed-service.controller.ts b/backend/src/modules/service/controllers/installed-service.controller.ts index 176154aa..0b5cc161 100644 --- a/backend/src/modules/service/controllers/installed-service.controller.ts +++ b/backend/src/modules/service/controllers/installed-service.controller.ts @@ -115,8 +115,6 @@ export class InstalledServiceController { @Body() body: editInstalledServiceDto, @Request() request, ) { - console.log('We are in editService controller'); - if ( body.installedServiceId === null || body.installedServiceId === undefined || @@ -305,8 +303,6 @@ export class InstalledServiceController { this.result = data; }) .catch((error) => { - console.log('Errrrrrrorrrrrrrrrrrrrrr Isssssssssssssss:', error); - let errorMessage = 'Some errors occurred while deleting the installed service!'; throw new GeneralException( diff --git a/backend/src/modules/service/controllers/service.controller.ts b/backend/src/modules/service/controllers/service.controller.ts index fffde212..fdc6f1b6 100644 --- a/backend/src/modules/service/controllers/service.controller.ts +++ b/backend/src/modules/service/controllers/service.controller.ts @@ -71,7 +71,7 @@ export class ServiceController { const data = { ...body, userId: request.user.userId, - nodeId: process.env.PANEL_URL + nodeId: process.env.NODE_NAME, }; return await this.serviceService.insertService(data); } @@ -161,8 +161,6 @@ export class ServiceController { description: 'Edites service by service ID and other fields.', }) async editService(@Body() body: editServiceDto, @Request() request) { - console.log('We are in editService controller'); - if ( body.serviceId === null || body.serviceId === undefined || diff --git a/backend/src/modules/service/repositories/installed-service.repository.ts b/backend/src/modules/service/repositories/installed-service.repository.ts index 45349a20..d3da75d7 100644 --- a/backend/src/modules/service/repositories/installed-service.repository.ts +++ b/backend/src/modules/service/repositories/installed-service.repository.ts @@ -1,10 +1,10 @@ import { Injectable } from '@nestjs/common'; +import { InjectModel } from '@nestjs/mongoose'; +import { Types } from 'mongoose'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { InstalledServiceModel } from '../models/installed-service.model'; import { installedServiceSchema } from '../schemas/installed-service.schema'; -import { DeleteResult, Types } from 'mongoose'; -import { InjectModel } from '@nestjs/mongoose'; @Injectable() export class InstalledServiceRepository { @@ -40,14 +40,14 @@ export class InstalledServiceRepository { // return await this.installedServiceModel.create(data) } - async deleteInstalledServiceById(id): Promise { - return await this.installedServiceModel.deleteOne({ _id: id }); + async deleteInstalledServiceById(id) { + return await this.installedServiceModel.deleteOne({ _id: { $eq: id } }); } async deleteInstalledServicesFromUserWithDeviceEncryptedId( userId: string, deviceEncryptedId: string, - ): Promise { + ) { const theUserId = new Types.ObjectId(userId); return await this.installedServiceModel.deleteMany({ userId: theUserId, @@ -57,7 +57,7 @@ export class InstalledServiceRepository { async editInstalledService(id, editedData) { await this.installedServiceModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -92,8 +92,6 @@ export class InstalledServiceRepository { populateCondition, selectCondition, ) { - console.log('we are in getInstalledServicesByUserId repository!'); - return await this.installedServiceModel .find({ userId: userId }) .where(whereCondition) @@ -107,11 +105,6 @@ export class InstalledServiceRepository { populateCondition, selectCondition, ) { - console.log( - 'we are in getInstalledServicesByDeviceEncryptedId repository!', - ); - console.log('deviceEncryptedId is: ', deviceEncryptedId); - return await this.installedServiceModel .find({ deviceMap: { $in: [deviceEncryptedId] } }) .where(whereCondition) @@ -124,16 +117,12 @@ export class InstalledServiceRepository { populateCondition, selectCondition, ) { - console.log('we are in getAllInstalledServices repository!'); - let res = await this.installedServiceModel .find() .where({ isDeleted: false }) .populate([]) .select(this.getInstalledServicesKeys()); - console.log('rese is: ', res); - return res; } diff --git a/backend/src/modules/service/repositories/service.repository.ts b/backend/src/modules/service/repositories/service.repository.ts index 6ae9fedf..689bfaaa 100644 --- a/backend/src/modules/service/repositories/service.repository.ts +++ b/backend/src/modules/service/repositories/service.repository.ts @@ -36,7 +36,7 @@ export class ServiceRepository { async editService(id, editedData) { await this.serviceModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -84,8 +84,6 @@ export class ServiceRepository { populateCondition, selectCondition, ) { - console.log('we are in findServicesByUserId repository!'); - return await this.serviceModel .find({ userId: userId }) .where(whereCondition) @@ -94,8 +92,6 @@ export class ServiceRepository { } async getAllServices(whereCondition, populateCondition, selectCondition) { - console.log('we are in getAllServices repository!'); - return await this.serviceModel .find() .where(whereCondition) diff --git a/backend/src/modules/service/services/installed-service.service.ts b/backend/src/modules/service/services/installed-service.service.ts index 1371b411..8a407f27 100644 --- a/backend/src/modules/service/services/installed-service.service.ts +++ b/backend/src/modules/service/services/installed-service.service.ts @@ -20,8 +20,6 @@ export class InstalledServiceService { ) {} async insertInstalledService(body) { - //console.log('Body: ', body); - let newInstalledService = { userId: body.userId, serviceId: body.serviceId, @@ -40,7 +38,6 @@ export class InstalledServiceService { await this.installedServiceRepository.insertInstalledService( newInstalledService, ); - console.log('User installed service inserted!'); return insertedService; } @@ -51,10 +48,6 @@ export class InstalledServiceService { '_id userId serviceId installedServiceName description deviceMap installedServiceImage activationStatus insertedBy insertDate updatedBy updateDate'; let foundInstalledService: any = null; - console.log('we are in editInstalledService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.installedServiceRepository .getInstalledServiceById( body.installedServiceId, @@ -119,11 +112,6 @@ export class InstalledServiceService { foundInstalledService.updatedAt = new Date(); } - console.log( - 'Updated found installed service for edit is: ', - foundInstalledService, - ); - await this.installedServiceRepository .editInstalledService(foundInstalledService._id, foundInstalledService) .then((data) => { @@ -175,8 +163,6 @@ export class InstalledServiceService { '_id userId serviceId installedServiceName description deviceMap installedServiceImage activationStatus insertedBy insertDate updatedBy updateDate'; let foundServices: any = null; - console.log('we are in getInstalledServicesByUserId service!'); - foundServices = await this.installedServiceRepository.getInstalledServicesByUserId( userId, @@ -185,8 +171,6 @@ export class InstalledServiceService { selectCondition, ); - console.log('Found installed services are: ', foundServices); - return foundServices; } @@ -243,8 +227,6 @@ export class InstalledServiceService { let foundServices: any = null; let response = []; - console.log('we are in getAllInstalledServices service!'); - try { foundServices = await this.installedServiceRepository.getAllInstalledServices( @@ -253,7 +235,7 @@ export class InstalledServiceService { selectCondition, ); } catch (error) { - console.log(error); + console.error(error); } foundServices.forEach((element) => { @@ -275,8 +257,14 @@ export class InstalledServiceService { return response; } - async deleteServicesOfAnUserWithDeviceId(userId: string, deviceEncryptedId: string) { - return await this.installedServiceRepository.deleteInstalledServicesFromUserWithDeviceEncryptedId(userId, deviceEncryptedId) + async deleteServicesOfAnUserWithDeviceId( + userId: string, + deviceEncryptedId: string, + ) { + return await this.installedServiceRepository.deleteInstalledServicesFromUserWithDeviceEncryptedId( + userId, + deviceEncryptedId, + ); } async deleteInstalledServiceByInstalledServiceId( @@ -342,7 +330,7 @@ export class InstalledServiceService { foundInstalledService._id, ); - return true + return true; } async deleteAllUserInstalledServicesPermanently(userId) { diff --git a/backend/src/modules/service/services/service.service.ts b/backend/src/modules/service/services/service.service.ts index 420aeaa0..4da5d904 100644 --- a/backend/src/modules/service/services/service.service.ts +++ b/backend/src/modules/service/services/service.service.ts @@ -18,8 +18,6 @@ export class ServiceService { ) {} async insertService(body) { - //console.log('Body: ', body); - let newService = { nodeId: String(body?.nodeId), nodeServiceId: String(body?.nodeServiceId), @@ -50,10 +48,8 @@ export class ServiceService { let insertedService = await this.serviceRepository.insertService( newService, ); - console.log('service inserted!', exist); return insertedService; } else { - console.log('service exist!', exist); return exist; } } @@ -65,10 +61,6 @@ export class ServiceService { '_id userId deviceName nodeId nodeServiceId published nodeId nodeServiceId publishRequested publishRejected description serviceType status devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyJson code insertedBy insertDate updatedBy updateDate'; let foundService: any = null; - console.log('we are in editService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.serviceRepository .getServiceById( body.serviceId, @@ -142,14 +134,10 @@ export class ServiceService { foundService.updatedAt = new Date(); } - console.log('Updated found service for edit is: ', foundService); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { this.result = data; - console.log('editing service: '); - console.log(data); }) .catch((error) => { let errorMessage = 'Some errors occurred while renaming a service!'; @@ -169,10 +157,6 @@ export class ServiceService { '_id userId serviceName published nodeId nodeServiceId publishRequested publishRejected description serviceType status devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyJson code insertedBy insertDate updatedBy updateDate'; let foundService: any = null; - console.log('we are in publishService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.serviceRepository .getServiceById( body.serviceId, @@ -195,25 +179,18 @@ export class ServiceService { foundService.publishRejected = false; foundService.publishRequested = false; - (foundService.nodeId = String(process.env.PANEL_URL)), + (foundService.nodeId = String(process.env.NODE_NAME)), (foundService.updatedBy = userId); foundService.updatedAt = new Date(); } - console.log('Updated found service for publish is: ', foundService); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { this.result = data; if (nodePublish == false) { - - console.log("foundService.devices:", foundService.devices) - console.log("---------------------------------------------") - console.log("JSONNNNNN(foundService.devices):", JSON.stringify(foundService.devices)) - this.contractService.createService( - String(process.env.PANEL_URL), + String(process.env.NODE_NAME), String(foundService._id), String(foundService.serviceName), String(foundService.description), @@ -246,10 +223,6 @@ export class ServiceService { '_id userId deviceName published nodeId nodeServiceId publishRequested publishRejected description serviceType status devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyJson code insertedBy insertDate updatedBy updateDate'; let foundService: any = null; - console.log('we are in publishService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.serviceRepository .getServiceById( body.serviceId, @@ -276,15 +249,13 @@ export class ServiceService { foundService.updatedAt = new Date(); } - console.log('Updated found service for cancel request is: ', foundService); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { this.result = data; if (nodePublish == false) { this.contractService.removeService( - process.env.PANEL_URL, + process.env.NODE_NAME, String(foundService._id), ); } @@ -308,10 +279,6 @@ export class ServiceService { '_id userId deviceName published nodeId nodeServiceId publishRequested publishRejected description serviceType status devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyJson code insertedBy insertDate updatedBy updateDate'; let foundService: any = null; - console.log('we are in rejectService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.serviceRepository .getServiceById( body.serviceId, @@ -322,7 +289,7 @@ export class ServiceService { .then((data) => { foundService = data; this.contractService.removeService( - process.env.PANEL_URL, + process.env.NODE_NAME, String(foundService._id), ); }) @@ -342,8 +309,6 @@ export class ServiceService { foundService.updatedAt = new Date(); } - console.log('Updated found service for reject is: ', foundService); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { @@ -367,10 +332,6 @@ export class ServiceService { '_id userId deviceName published nodeId nodeServiceId publishRequested publishRejected description serviceType status devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyJson code insertedBy insertDate updatedBy updateDate'; let foundService: any = null; - console.log('we are in requestPublishService service!'); - console.log('body: ', body); - console.log('userId: ', userId); - await this.serviceRepository .getServiceById( body.serviceId, @@ -410,11 +371,6 @@ export class ServiceService { foundService.updatedAt = new Date(); } - console.log( - 'Updated found service for publishing request is: ', - foundService, - ); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { @@ -508,8 +464,6 @@ export class ServiceService { 'serviceName description serviceType nodeId nodeServiceId published publishRequested publishRejected status blocklyJson code devices numberOfInstallations installationPrice runningPrice rate serviceImage blocklyXML code insertedBy insertDate isDeletable isDeleted deletedBy deleteDate deletionReason updatedBy updateDate'; let foundServices: any = null; - console.log('we are in getServicesByUserId service!'); - foundServices = await this.serviceRepository.getServicesByUserId( userId, whereCondition, @@ -517,8 +471,6 @@ export class ServiceService { selectCondition, ); - //console.log('Found services are: ', foundServices); - return foundServices; } @@ -530,16 +482,12 @@ export class ServiceService { let foundServices: any = null; let response = []; - console.log('we are in getAllServices service!'); - foundServices = await this.serviceRepository.getAllServices( whereCondition, populateCondition, selectCondition, ); - //console.log('Found services are: ', foundServices); - foundServices.forEach((element) => { response.push({ _id: element._id, @@ -577,16 +525,12 @@ export class ServiceService { let foundServices: any = null; let response = []; - console.log('we are in getAllServices service!'); - foundServices = await this.serviceRepository.getAllServices( whereCondition, populateCondition, selectCondition, ); - //console.log('Found services are: ', foundServices); - foundServices.forEach((element) => { response.push({ _id: element._id, @@ -624,16 +568,12 @@ export class ServiceService { let foundServices: any = null; let response = []; - console.log('we are in getAllServices service!'); - foundServices = await this.serviceRepository.getAllServices( whereCondition, populateCondition, selectCondition, ); - //console.log('Found services are: ', foundServices); - foundServices.forEach((element) => { response.push({ _id: element._id, @@ -725,8 +665,6 @@ export class ServiceService { foundService.updateDate = new Date(); } - console.log('Updated found service for deletion is: ', foundService); - await this.serviceRepository .editService(foundService._id, foundService) .then((data) => { diff --git a/backend/src/modules/smartcontract/controller/contract.controller.ts b/backend/src/modules/smartcontract/controller/contract.controller.ts index 62cd39d8..37e7745c 100644 --- a/backend/src/modules/smartcontract/controller/contract.controller.ts +++ b/backend/src/modules/smartcontract/controller/contract.controller.ts @@ -50,7 +50,7 @@ export class contractController { this.contractService.syncAllServices(); // this.contractService.syncAllDevices(); } catch (error) { - console.log('contractController constructor error:', error); + console.error('contractController constructor error:', error); } }, 4000); } @@ -64,8 +64,6 @@ export class contractController { description: 'This api verifies then user proof code.', }) async verifyProof(@Body() body: verifyProofDto, @Request() request) { - console.log('We are in Verify Proof section', body); - if (body.proof === null || body.proof === undefined || body.proof === '') { let errorMessage = 'proof is not valid!'; throw new GeneralException( @@ -87,8 +85,6 @@ export class contractController { 'This api will store the user commitment file in smart contract.', }) async storeCommitment(@Body() body: storeCommitmentDto, @Request() request) { - console.log('We are in Store Commitment section', body); - return this.contractService.storeCommitment({ ...body, userId: String(request.user.userId), @@ -108,8 +104,6 @@ export class contractController { @Body() body: removeCommitmentDto, @Request() request, ) { - console.log('We are in Remove Commitment section', body); - return this.contractService.removeCommitment( body.commitmentId, body.dbId, @@ -244,19 +238,17 @@ export class contractController { 'This api will store the user commitment file in smart contract.', }) async zkpPublishProof(@Body() body: publishProofDto, @Request() request) { - console.log('We are in zkpPublishProof section', body); - const objectId = String(new mongoose.Types.ObjectId()); if (body.frontPublish) { return { objectId: objectId, - nodeId: process.env.PANEL_URL, + nodeId: process.env.NODE_NAME, }; } const tx: any = await this.contractService.storeZKP( - process.env.PANEL_URL, + process.env.NODE_NAME, objectId, JSON.stringify(body.proof), JSON.stringify(body.data), diff --git a/backend/src/modules/smartcontract/repository/contract.repository.ts b/backend/src/modules/smartcontract/repository/contract.repository.ts index 3c5b9909..c396bd4b 100644 --- a/backend/src/modules/smartcontract/repository/contract.repository.ts +++ b/backend/src/modules/smartcontract/repository/contract.repository.ts @@ -3,7 +3,6 @@ import { InjectModel } from '@nestjs/mongoose'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { ContractModel } from '../model/contract.model'; -import { DeleteResult } from 'mongoose'; @Injectable() export class ContractRepository { @@ -23,7 +22,7 @@ export class ContractRepository { }) .catch((error) => { let errorMessage = 'Some errors occurred while commitment insertion!'; - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -37,8 +36,6 @@ export class ContractRepository { commitmentId: string, nodeId: string, ) { - console.log('we are in getCommitmentByCommitmentIdAndNodeId repository!'); - return await this.contractModel .findOne({ _id: commitmentId, nodeId: nodeId }) .where({}) @@ -49,19 +46,13 @@ export class ContractRepository { async deleteCommitmentByCommitmentIdAndNodeId( commitmentId: string, nodeId: string, - ): Promise { - console.log( - 'we are in deleteCommitmentByCommitmentIdAndNodeId repository!', - ); - + ) { return await this.contractModel - .deleteOne({ _id: commitmentId, nodeId: nodeId }) + .deleteOne({ _id: { $eq: commitmentId }, nodeId: { $eq: nodeId } }) .where({}); } async getCommitmentsByUserId(userId: string) { - console.log('we are in getCommitmentsByUserId repository!'); - return await this.contractModel .find({ userId: userId }) .where({}) diff --git a/backend/src/modules/smartcontract/services/contract.service.ts b/backend/src/modules/smartcontract/services/contract.service.ts index c558b0c6..0797c0c7 100644 --- a/backend/src/modules/smartcontract/services/contract.service.ts +++ b/backend/src/modules/smartcontract/services/contract.service.ts @@ -1,5 +1,11 @@ import { forwardRef, Inject, Injectable, Logger } from '@nestjs/common'; -import { AbiCoder, ContractTransaction, ethers, id as keccakId } from 'ethers'; +import { + AbiCoder, + ContractTransaction, + ethers, + id as keccakId, + Log, +} from 'ethers'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { DeviceService } from 'src/modules/device/services/device.service'; @@ -7,6 +13,7 @@ import { ServiceService } from 'src/modules/service/services/service.service'; import { StoreCommitmentData } from '../dto/contract-dto'; import { ContractRepository } from '../repository/contract.repository'; import { ContractDataService } from '../contract-data'; +import { Cron, Interval } from '@nestjs/schedule'; // Import JSON files with type assertions const serviceDeviceABI = require('../ABI/ServiceDeviceABI.json') as any[]; @@ -140,17 +147,6 @@ export class ContractService { this.provider, ); - // Add debug logging - console.log( - 'this.contractData.serviceDeviceContractAddress:', - this.contractData.serviceDeviceContractAddress, - ); - console.log( - 'Service Device ABI loaded:', - Array.isArray(serviceDeviceABI), - serviceDeviceABI?.length, - ); - if (this.contractData.serviceDeviceContractAddress) { this.contracts.serviceDevice = new ethers.Contract( this.contractData.serviceDeviceContractAddress, @@ -172,7 +168,6 @@ export class ContractService { ); this.contracts.serviceDevice.on('ServiceCreated', async (id, service) => { - console.log('New Service Created Right Now'); let newService = { nodeId: service[0], nodeServiceId: service[1], @@ -197,25 +192,22 @@ export class ContractService { newService, ); } catch (error) { - console.log('error isssss: ', error); + console.error('error: ', error); } }); this.contracts.serviceDevice.on('ServiceRemoved', async (id, service) => { - console.log(`${service[0]} , ${service[1]}`); - try { await this.serviceService.deleteServiceByNodeServiceIdAndNodeId( service[0], service[1], ); } catch (error) { - console.log(error); + console.error(error); } }); this.contracts.serviceDevice.on('DeviceCreated', (id, device) => { - Logger.log('DeviceCreated', device); try { let newDevice = { nodeId: device[0], @@ -236,7 +228,7 @@ export class ContractService { this.deviceService.insertDevice(newDevice); } catch (error) { - console.log('DeviceCreated', error); + console.error('DeviceCreated', error); } }); @@ -419,7 +411,7 @@ export class ContractService { publishedDate, ); } catch (error) { - console.log('Error While publishing service:', error); + console.error('Error While publishing service:', error); } } @@ -461,7 +453,7 @@ export class ContractService { nodeServices.nodeServiceId, ); } catch (error) { - console.log(error); + console.error(error); } } }); @@ -499,77 +491,64 @@ export class ContractService { try { this.serviceService.insertService(newService); } catch (error) { - console.log(error); + console.error(error); } } }); } - // async syncAllDevices() { - // const allContractDevices = await this.fetchAllDevices(); - // const allNodeDevices = await this.deviceService.getAllSharedDevices(); - - // allNodeDevices.map((nodeDevices: any) => { - // let exist = false; - // allContractDevices.map((contractDevices: any) => { - // Logger.log('contractDevices:', contractDevices); - // Logger.log('nodeDevices:', nodeDevices); - // if ( - // String(nodeDevices.nodeId) == String(contractDevices[0]) && - // (String(nodeDevices.nodeDeviceId) == String(contractDevices[1]) || - // String(nodeDevices._id) == String(contractDevices[1])) - // ) { - // exist = true; - // } - // }); - // if (exist == false) { - // try { - // this.deviceService.deleteOtherNodeDeviceByNodeIdAndDeviceId( - // nodeDevices.nodeId, - // nodeDevices.nodeDeviceId, - // nodeDevices.deviceEncryptedId, - // ); - // } catch (error) { - // console.log(error); - // } - // } - // }); - - // allContractDevices.map((contractDevices: any) => { - // let exist = false; - // allNodeDevices.map((nodeDevices: any) => { - // if ( - // String(nodeDevices.nodeId) == String(contractDevices[0]) && - // (String(nodeDevices.nodeDeviceId) == String(contractDevices[1]) || - // String(nodeDevices._id) == String(contractDevices[1])) - // ) { - // exist = true; - // } - // }); - // if (exist == false) { - // let newDevice = { - // nodeId: contractDevices[0], - // nodeDeviceId: contractDevices[1], - // isShared: true, - // deviceName: contractDevices[2], - // deviceType: contractDevices[2], - // deviceEncryptedId: contractDevices[3], - // mac: Buffer.from(contractDevices[3], 'base64').toString('utf8'), - // hardwareVersion: String(contractDevices[4]).split('/')[0], - // firmwareVersion: String(contractDevices[4]).split('/')[1], - // parameters: contractDevices[6].map((str) => JSON.parse(str)), - // costOfUse: contractDevices[7], - // location: { coordinates: contractDevices[8] }, - // insertDate: new Date(String(contractDevices[10])), - // updateDate: new Date(String(contractDevices[10])), - // }; - - // this.deviceService.insertDevice(newDevice).catch((error) => { - // console.log('syncAllDevices insertDevice error:', error); - // }); - // } - // }); - // } + @Cron('0 2 * * *') + async handleSyncAllDevicesCron() { + await this.syncAllSharedDevices(); + await this.removeUnsharedDevices(); + } + + async syncAllSharedDevices() { + const allContractDevices = await this.fetchAllDevices(); + const allNodeDevices = await this.deviceService.getAllSharedDevices(); + + allNodeDevices.map(async (nodeDevices: any) => { + let isExist = false; + allContractDevices.map((contractDevices: any) => { + if ( + String(nodeDevices.deviceEncryptedId) === String(contractDevices[1]) + ) { + isExist = true; + } + }); + if (!isExist) { + await this.deviceService.unshareBySystem(nodeDevices._id); + } + }); + } + + /** + * when a device doesnt share in db, remove it from blockchain + */ + async removeUnsharedDevices() { + const allContractDevices = await this.fetchAllDevices(); + for (const contract of allContractDevices) { + const device = await this.deviceService.getDeviceByEncryptedId( + contract[3], + ); + + if (!device || !device.isShared) { + await this.removeSharedDevice(contract[0], contract[3]); + } + } + } + + async unshareIncorrectNodeIdDevices() { + const allContractDevices = await this.fetchAllDevices(); + for (const contract of allContractDevices) { + const device = await this.deviceService.getDeviceByEncryptedId( + contract[3], + ); + if (device && device.nodeId !== String(contract[0])) { + await this.deviceService.unshareBySystem(device._id); + } + } + } async storeZKP( nodeId: string, @@ -602,16 +581,13 @@ export class ContractService { transactionId, } = data; - console.log('data:', data); - let txHash = ''; if (!frontPublish) { - console.log('Storing commitment'); try { const tx: any = await this.contracts.commitment.storeCommitment( commitmentID, - process.env.PANEL_URL, + process.env.NODE_NAME, deviceType, deviceIdType, deviceModel, @@ -622,10 +598,8 @@ export class ContractService { ); txHash = tx.hash; - - console.log(`Transaction submitted. Hash: ${tx.hash}`); } catch (error) { - console.log('Storing commitment Error:', error); + console.error('Storing commitment Error:', error); } } @@ -634,7 +608,6 @@ export class ContractService { ...data, transactionId: transactionId ? transactionId : txHash, }); - console.log('Commitment data saved to the database successfully.'); return txHash; } catch (error: any) { @@ -688,7 +661,7 @@ export class ContractService { ); } } catch (error) { - console.log('removeCommitment error:', error); + console.error('removeCommitment error:', error); } } @@ -712,7 +685,7 @@ export class ContractService { return await this.contractRepository.saveCommitment({ transactionId: data.transactionId, commitmentId: data.commitmentID, - nodeId: process.env.PANEL_URL, + nodeId: process.env.NODE_NAME, userId: data.userId, manufacturer: data.manufacturer, deviceType: data.deviceType, diff --git a/backend/src/modules/subscriptions/repository/subscription.repository.ts b/backend/src/modules/subscriptions/repository/subscription.repository.ts index 2fc29c20..0d5d0ade 100644 --- a/backend/src/modules/subscriptions/repository/subscription.repository.ts +++ b/backend/src/modules/subscriptions/repository/subscription.repository.ts @@ -1,10 +1,10 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { Model } from 'mongoose'; // Import Model type from mongoose import { SubscriptionModel } from '../model/subscriptions.model'; // Ensure this is the correct path import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { SaveSubscriptionDTO } from '../dto/subscriptions.dto'; -import { DeleteResult } from 'mongoose'; @Injectable() export class SubscriptionsRepository { @@ -24,7 +24,7 @@ export class SubscriptionsRepository { }) .catch((error) => { let errorMessage = 'Some errors occurred while commitment insertion!'; - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -42,9 +42,9 @@ export class SubscriptionsRepository { .select(this.selectCondition); } - async deleteToken(token: string): Promise { + async deleteToken(token: string) { return await this.subscriptionModel - .deleteOne({ token: token }) + .deleteOne({ token: { $eq: token } }) .where({}) .populate([]); } diff --git a/backend/src/modules/subscriptions/services/subscriptions.service.ts b/backend/src/modules/subscriptions/services/subscriptions.service.ts index cc02f65b..4d1f1e8b 100644 --- a/backend/src/modules/subscriptions/services/subscriptions.service.ts +++ b/backend/src/modules/subscriptions/services/subscriptions.service.ts @@ -72,7 +72,6 @@ export class SubscriptionsService { async checkUserUnsubscribed(userId: string): Promise { const res = await this.userService.getUserProfileByIdFromUser(userId); - console.log('Ghol res:', res); return res.unsubscribed ?? false; } diff --git a/backend/src/modules/user/controllers/user.controller.ts b/backend/src/modules/user/controllers/user.controller.ts index 6f1973aa..f2304db1 100644 --- a/backend/src/modules/user/controllers/user.controller.ts +++ b/backend/src/modules/user/controllers/user.controller.ts @@ -50,6 +50,8 @@ import { requestChangeEmailWithTokenDto, verifyChangeEmailWithTokenDto, } from '../data-transfer-objects/user/verify-change-email.dto'; +import escapeHtml from 'escape-html'; + var fs = require('fs'); @ApiTags('Manage Users') @@ -95,26 +97,6 @@ export class UserController { } } - /* @Post('user/test') - @HttpCode(200) - @ApiOperation({ - summary: 'Send otp code to user.', - description: 'This api requires a user mobile.', - }) - async test() { - // @Param('mobile') mobile: string - console.log('We are in test function!'); - var user = {}; - const token = Math.floor(1000 + Math.random() * 9000).toString(); - user.name = 'Hamid'; - user.email = 'sahebkherad@gmail.com'; - await this.mailService.sendUserConfirmation(user, token); - - console.log('Email sent!'); - - // return await this.userService.sendOTPCode(mobile) - } */ - @Post('v1/user/request-otp-code-for-signup-by-email') @HttpCode(200) @ApiOperation({ @@ -185,9 +167,6 @@ export class UserController { ) { body.email = email; body.otp = otp; - console.log('We are in verifyOTPCodeSentByEmailForSignup function!'); - console.log('Email is: ', email); - console.log('OTP is: ', otp); try { const otpIsVerified = @@ -247,9 +226,6 @@ export class UserController { ) { body.email = email; body.otp = otp; - console.log('We are in verifyOTPCodeSentByEmailForResetPassword function!'); - console.log('Email is: ', email); - console.log('OTP is: ', otp); try { // Read the HTML file @@ -268,7 +244,7 @@ export class UserController { '{{ url }}', `${process.env.HOST_PROTOCOL}${process.env.PANEL_URL}/app/v1/user/reset-password-by-otp-code`, ) - .replace('{{ email }}', email) + .replace('{{ email }}', escapeHtml(email)) .replace('{{ otp }}', otpCode) .replace(/{{NodeImageSrc}}/g, process.env.THEME_LOGO) .replace(/{{NodeName}}/g, process.env.NODE_NAME); @@ -330,9 +306,6 @@ export class UserController { ) { body.email = email; body.otp = otp; - console.log('We are in verifyOTPCodeSentByEmailForVerifyEmail function!'); - console.log('Email is: ', email); - console.log('OTP is: ', otp); try { // Verify the OTP code @@ -377,7 +350,6 @@ export class UserController { @Body() body: verifyOtpCodeSentByEmailDto, @Request() request, ) { - console.log('We are in verifyOtpCodeSentByEmail function!'); return await this.userService.verifyOtpCodeSentByEmailForSignup(body); } @@ -391,7 +363,6 @@ export class UserController { @Body() body: changePasswordByEmailDto, @Request() request, ) { - console.log('We are in changePasswordAndActivateAccount function!'); return await this.userService.changePasswordAndActivateAccount(body); } @@ -414,15 +385,12 @@ export class UserController { async verifyOtpCode(@Body() body: verifyOtpCodeDto, @Request() request) { const res1 = await this.userService.verifyOtpCode(body); if (res1 === true) { - console.log('Password Changed'); - await this.userService.changePasswordAndActivateAccount({ ...body, newPassword: body.password, }); return true; } else { - console.log('Password not Changed'); return false; } } @@ -434,8 +402,6 @@ export class UserController { description: 'This api requires a user mobile.', }) async credential(@Body() body: credentialDto) { - console.log('body:', body); - return await this.userService.credential({ ...body, email: body.email.toString().toLocaleLowerCase(), @@ -452,7 +418,6 @@ export class UserController { const emails = process.env.SUPER_ADMIN_EMAILS; if (emails.includes(body.email)) { - console.log('Included'); const adminRes = await this.userService.makeUserAdmin(body.email, [ 'super', ]); @@ -600,7 +565,10 @@ export class UserController { @Body() body: setUserIdentityWalletDto, @Request() request, ) { - return await this.userService.setUserIdentityWallet(request.user.userId, body.wallet); + return await this.userService.setUserIdentityWallet( + request.user.userId, + body.wallet, + ); } @Post('v1/user/set-my-ownership-wallet') @@ -615,7 +583,10 @@ export class UserController { @Body() body: setUserIdentityWalletDto, @Request() request, ) { - return await this.userService.setUserOwnerShipWallet(request.user.userId, body.wallet); + return await this.userService.setUserOwnerShipWallet( + request.user.userId, + body.wallet, + ); } @Patch('v1/user/edit-user-by-user/:userId') @@ -678,8 +649,6 @@ export class UserController { 'Register a user by user mobile. This api requires a user mobile.', }) async sendOTPForChangePassword(@Request() request) { - console.log('user email: ', request.user.email); - return await this.userService.sendOTPForChangePassword(request.user.email); } diff --git a/backend/src/modules/user/models/user.model.ts b/backend/src/modules/user/models/user.model.ts index 644f1fdb..e97dda87 100644 --- a/backend/src/modules/user/models/user.model.ts +++ b/backend/src/modules/user/models/user.model.ts @@ -1,14 +1,10 @@ import { Model } from 'mongoose'; -import { - UserChangeEmailTokenInterface, - UserInterface, -} from '../interfaces/user.interface'; +import { UserChangeEmailTokenInterface, UserInterface } from '../interfaces/user.interface'; export interface UserModel extends Model { [x: string]: any; } -export interface ChangeEmailTokenModel - extends Model { +export interface ChangeEmailTokenModel extends Model { [x: string]: any; } diff --git a/backend/src/modules/user/repositories/user-info.repository.ts b/backend/src/modules/user/repositories/user-info.repository.ts index f7e5ce71..cfe00e11 100644 --- a/backend/src/modules/user/repositories/user-info.repository.ts +++ b/backend/src/modules/user/repositories/user-info.repository.ts @@ -1,5 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { UserInfoModel } from '../models/user-info.model'; @@ -37,10 +38,12 @@ export class UserInfoRepository { } async editUserInfo(id, editedData) { - return await this.userInfoModel.updateOne({ _id: id }, editedData); + return await this.userInfoModel.updateOne({ _id: { $eq: id } }, editedData); } async findAUserInfoById(_id) { + const userInfoId = new ObjectID(_id); + await this.userInfoModel .findOne({ _id }) .where({ isDeleted: false }) diff --git a/backend/src/modules/user/repositories/user-permission.repository.ts b/backend/src/modules/user/repositories/user-permission.repository.ts index 344a7458..e8b4d28c 100644 --- a/backend/src/modules/user/repositories/user-permission.repository.ts +++ b/backend/src/modules/user/repositories/user-permission.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; - +import { MongoClient, ObjectID } from 'mongodb'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { UserPermissionModel } from '../models/user-permission.model'; @@ -36,7 +36,7 @@ export class UserPermissionRepository { async editPermission(id, editedData) { await this.userPermissionModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -52,6 +52,8 @@ export class UserPermissionRepository { } async findAPermissionById(_id) { + const userInfoId = new ObjectID(_id); + await this.userPermissionModel .findOne({ _id }) .where({ isDeleted: false }) @@ -109,8 +111,6 @@ export class UserPermissionRepository { throw new GeneralException(ErrorTypeEnum.NOT_FOUND, errorMessage); }); - console.log(this.result); - return this.result; } } diff --git a/backend/src/modules/user/repositories/user-role.repository.ts b/backend/src/modules/user/repositories/user-role.repository.ts index 379c4047..e6b03bc6 100644 --- a/backend/src/modules/user/repositories/user-role.repository.ts +++ b/backend/src/modules/user/repositories/user-role.repository.ts @@ -1,5 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { UserRoleModel } from '../models/user-role.model'; @@ -34,7 +35,7 @@ export class UserRoleRepository { async editRole(id, editedData) { await this.userRoleModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -50,6 +51,8 @@ export class UserRoleRepository { } async findARoleById(_id) { + const roleId = new ObjectID(_id); + await this.userRoleModel .findOne({ _id }) .where({ isDeleted: false }) diff --git a/backend/src/modules/user/repositories/user.repository.ts b/backend/src/modules/user/repositories/user.repository.ts index aed69f3d..915a110b 100644 --- a/backend/src/modules/user/repositories/user.repository.ts +++ b/backend/src/modules/user/repositories/user.repository.ts @@ -1,10 +1,13 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; -import { DeleteResult, Types } from 'mongoose'; +import { Types } from 'mongoose'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { ChangeEmailTokenModel, UserModel } from '../models/user.model'; -import { UserInterface } from '../interfaces/user.interface'; +import { + UserChangeEmailTokenInterface, + UserInterface, +} from '../interfaces/user.interface'; import { changeEmailTokenSchema, userSchema } from '../schemas/user.schema'; @Injectable() @@ -13,7 +16,7 @@ export class UserRepository { constructor( @InjectModel('user') - private readonly userModel: UserModel, + private readonly userModel?: UserModel, @InjectModel('email-token') private readonly changeEmailTokenModel?: ChangeEmailTokenModel, ) { @@ -51,9 +54,9 @@ export class UserRepository { .select(this.getChangeEmailKeys()); } - async deleteChangeEmailToken(token: string): Promise { + async deleteChangeEmailToken(token: string) { return await this.changeEmailTokenModel - .deleteOne({ token: token }) + .deleteOne({ token: { $eq: token } }) .where({}) .populate([]); } @@ -79,7 +82,7 @@ export class UserRepository { return true; } catch (error) { const errorMessage = 'Some errors occurred while deleting userName!'; - console.log(error.message); // Log the actual error + console.error(error.message); // Log the actual error throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -95,7 +98,7 @@ export class UserRepository { }) .catch((error) => { const errorMessage = 'Some errors occurred while user insertion!'; - console.log(error.message); + console.error(error.message); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -114,7 +117,7 @@ export class UserRepository { .catch((error) => { const errorMessage = 'Some errors occurred while insert change email token!'; - console.log(error.message); + console.error(error.message); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, errorMessage, @@ -126,7 +129,7 @@ export class UserRepository { async changeUserEmail(userId, newEmail) { await this.userModel - .updateOne({ _id: userId }, { $set: { email: newEmail } }) + .updateOne({ _id: { $eq: userId } }, { $set: { email: newEmail } }) .then((data) => { this.result = data; }) @@ -144,7 +147,7 @@ export class UserRepository { async editUser(id, editedData) { const { email, ...restData } = editedData; await this.userModel - .updateOne({ _id: id }, { $set: restData }) + .updateOne({ _id: { $eq: id } }, { $set: restData }) .then((data) => { this.result = data; }) @@ -160,11 +163,23 @@ export class UserRepository { } async checkIfOwnerShipWalletExist(wallet: string) { - return (await this.userModel.countDocuments()) > 0; + return ( + (await this.userModel + .find({ + ownerShipWallets: wallet, + }) + .count()) > 0 + ); } async checkIfIdentityWalletExist(wallet: string) { - return (await this.userModel.countDocuments()) > 0; + return ( + (await this.userModel + .find({ + identityWallet: { $exists: true, $eq: wallet }, + }) + .count()) > 0 + ); } async findUserById(_id, whereCondition, populateCondition, selectCondition) { @@ -284,8 +299,6 @@ export class UserRepository { } async getAllUsers(whereCondition, populateCondition, selectCondition) { - console.log('we are in getAllUsers repository!'); - return await this.userModel .find() .where(whereCondition) diff --git a/backend/src/modules/user/services/user-info/user-info.service.ts b/backend/src/modules/user/services/user-info/user-info.service.ts index 760e9424..bd6dd76d 100644 --- a/backend/src/modules/user/services/user-info/user-info.service.ts +++ b/backend/src/modules/user/services/user-info/user-info.service.ts @@ -71,8 +71,6 @@ export class UserInfoService { }); if (user) { - console.log('user found'); - userInfo = await this.userInfoRepository .findAUserInfoByUserId(userId) .catch((error) => { @@ -85,7 +83,6 @@ export class UserInfoService { } if (userInfo) { - console.log('user info exists!'); let errorMessage = 'Some errors occurred while inserting a user info, User info already exists!'; throw new GeneralException( @@ -164,8 +161,6 @@ export class UserInfoService { }); if (user) { - console.log('user found'); - userInfo = await this.userInfoRepository .findAUserInfoByUserId(data.userId) .catch((error) => { @@ -178,7 +173,6 @@ export class UserInfoService { } if (userInfo) { - console.log('user info exists!'); let errorMessage = 'Some errors occurred while inserting a user info, User info already exists!'; throw new GeneralException( @@ -276,8 +270,6 @@ export class UserInfoService { } async editUserByPanel(data, userId): Promise { - console.log('In editUserByUser Service'); - let foundUserInfo = null; await this.userInfoRepository .findAUserInfoByUserId(data.userId) diff --git a/backend/src/modules/user/services/user-role/user-role.service.ts b/backend/src/modules/user/services/user-role/user-role.service.ts index f2020bcc..eadc15a2 100644 --- a/backend/src/modules/user/services/user-role/user-role.service.ts +++ b/backend/src/modules/user/services/user-role/user-role.service.ts @@ -113,7 +113,7 @@ export class UserRoleService { ); }); - permissions.push(String(fullControllPermission._id)); + permissions.push(fullControllPermission._id); let newRole = { name: role.roleName, diff --git a/backend/src/modules/user/services/user/user.service.ts b/backend/src/modules/user/services/user/user.service.ts index 8e231b88..17cef3e2 100644 --- a/backend/src/modules/user/services/user/user.service.ts +++ b/backend/src/modules/user/services/user/user.service.ts @@ -49,13 +49,17 @@ function generatePassword(length: number): string { throw new Error('Length must be greater than 0'); } - const buffer = randomBytes(length); const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let password = ''; - for (let i = 0; i < length; i++) { - password += characters.charAt(buffer[i] % characters.length); + while (password.length < length) { + const maxValidByte = + Math.floor(256 / characters.length) * characters.length; + const randomByte = randomBytes(1)[0]; + if (randomByte < maxValidByte) { + password += characters.charAt(randomByte % characters.length); + } } return password; @@ -103,8 +107,10 @@ export class UserService { } validateEmail(email: string) { - const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; - return email.trim() && emailRegex.test(email.trim()); + if (typeof email !== 'string' || email.length > 320) return false; + // RFC 5322 Official Standard (simplified, safe for most uses) + const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailRegex.test(email.trim()); } generateEmailToken(): string { @@ -116,8 +122,6 @@ export class UserService { } async generateAndSaveChangeEmailToken(data) { - console.log('data.newEmail:', String(data.newEmail)); - await this.findAUserByEmail(data.nowEmail); if (this.user.google == true) { @@ -192,7 +196,6 @@ export class UserService { async verifyChangeEmailWithToken(token: string) { try { this.result = await this.userRepository.getChangeEmailWithToken(token); - console.log(this.result); } catch (error) { throw new GeneralException( ErrorTypeEnum.CONFLICT, @@ -242,8 +245,6 @@ export class UserService { } async sendOTPCodeForSignupByEmail(body) { - console.log('We are in sendOTPCodeForSignupByEmail service'); - try { const user = await this.checkUserEmailIsExist(body.email); @@ -271,7 +272,7 @@ export class UserService { const newUser = await this.insertAUserByEmail({ ...body, StorX: {} }); const payload = { mobile: newUser.mobile, sub: newUser._id }; - this.buildingService.createDefaultBuilding(String(newUser._id)); + this.buildingService.createDefaultBuilding(newUser._id); const accessSignOptions: any = {}; accessSignOptions.expiresIn = process.env.ACCESS_TOKEN_EXPIRATION_TIME; @@ -308,8 +309,6 @@ export class UserService { } async sendOTPCodeForVrifyEmail(userEmail: string) { - console.log('We are in sendOTPCodeForVrifyEmail service '); - await this.findAUserByEmail(userEmail); if (!this.user) { @@ -343,8 +342,6 @@ export class UserService { } async sendOTPCodeForResetPasswordByEmail(body) { - console.log('We are in sendOTPCodeForResetPasswordByEmail service '); - this.otp = await this.otpService.findOTPByEmail( body.email, OTPTypeEnum.CHANGE_PASSWORD, @@ -366,8 +363,6 @@ export class UserService { } async verifyOtpCodeSentByEmailForSignup(body) { - console.log('I am in verifyOtpCodeSentByEmailForSignup service!'); - this.otp = await this.otpService.findOTPByEmail( body.email, OTPTypeEnum.REGISTRATION, @@ -387,8 +382,6 @@ export class UserService { await this.findAUserByEmail(body.email); - console.log('this.user: ', this.user); - if (this.user) { // User already exists. @@ -450,27 +443,19 @@ export class UserService { foundedNewUser._id, ); - // return await response return true; } - - // return console.log('Correct code'); } else { - // return console.log('expired code'); return false; } } async verifyOtpCodeSentByEmailForVerify(body) { - console.log('I am in verifyOtpCodeSentByEmailForVerify service!'); - this.otp = await this.otpService.findOTPByEmail( body.email, OTPTypeEnum.Verify, ); - console.log('after findOTPByEmail', this.otp); - const verifyOTP = await this.otpService.verifyOTP( this.otp[this.otp.length - 1], body.otp, @@ -489,8 +474,6 @@ export class UserService { await this.findAUserByEmail(body.email); - //console.log('this.user: ', this.user); - if (this.user) { // User already exists. @@ -515,12 +498,7 @@ export class UserService { return true; } - - // return console.log('Correct code'); } else { - // return console.log('expired code'); - console.log('Returning False'); - return false; } } @@ -555,9 +533,6 @@ export class UserService { if (this.user) { // User found. - //console.log('User found for password change.'); - //console.log('New Password: ', data.newPassword); - const salt = bcrypt.genSaltSync(saltRounds); const hashedNewPassword = bcrypt.hashSync(String(data.newPassword), salt); @@ -571,8 +546,6 @@ export class UserService { } else { // User found. - console.log('User not found for password change.'); - throw new GeneralException(ErrorTypeEnum.NOT_FOUND, 'User not found.'); } } @@ -637,15 +610,11 @@ export class UserService { } async checkUserEmailIsExist(userEmail): Promise { - console.log('I am in checkUserEmailIsExist!'); - await this.findAUserByEmail(userEmail); if (this.user) { - console.log('User found!'); return true; } else { - console.log('User not found!'); throw new GeneralException( ErrorTypeEnum.NOT_FOUND, 'User does not exist.', @@ -676,8 +645,6 @@ export class UserService { await this.userRepository.editUser(this.user._id, this.user); return await this.findAUserById(this.user._id); - } else { - return console.log('expired code'); } } @@ -854,7 +821,6 @@ export class UserService { data.updatedBy = userId; data.updateDate = new Date(); - console.log('Edited Data:', data); await this.userRepository.editUser(userId, data); return await this.findAUserById(userId); @@ -910,7 +876,6 @@ export class UserService { data.updatedBy = userId; data.updateDate = new Date(); - console.log('Edited Data:', data); await this.userRepository.editUser(userId, data); return await this.findAUserById(userId); @@ -934,7 +899,6 @@ export class UserService { if (this.user) { data.updatedBy = userId; data.updateDate = new Date(); - console.log('Edited Data:', data); await this.userRepository.editUser(userId, data); return await this.findAUserById(userId); @@ -1151,8 +1115,6 @@ export class UserService { const populateCondition = []; const selectCondition = this.getUserKeys(); - console.log('we are in getUserByEmail service!'); - await this.userRepository .findUserByEmail( userEmail, @@ -1162,7 +1124,6 @@ export class UserService { ) .then((data) => { this.result = data; - //console.log('Found user is: ', this.result); }) .catch((error) => { const errorMessage = @@ -1445,8 +1406,6 @@ export class UserService { } async credential(data, createIfNotExist = false) { - console.log('We are in credential'); - this.user = null; const whereCondition = { isDeleted: false }; @@ -1469,7 +1428,6 @@ export class UserService { ); if (createIfNotExist == true && !this.user) { - console.log('Creating User'); this.user = await this.insertAUserByEmail({ ...data, google: true, @@ -1511,8 +1469,6 @@ export class UserService { ); } - console.log('Is Valid Password:', isValidPassword.toString()); - if (isValidPassword) { const payload = { email: this.user.email, sub: this.user._id }; @@ -1556,8 +1512,6 @@ export class UserService { } async adminCredential(data, isGoogle = false) { - console.log('We are in adminCredential'); - const whereCondition = { isDeleted: false }; const populateCondition = [ { @@ -1681,21 +1635,16 @@ export class UserService { let verifiedRefreshToken = null; let verifiedOldAccessToken = null; - console.log('Date.now(): ' + Math.floor(Date.now() / 1000)); - await verify( data.refreshToken, process.env.REFRESH_TOKEN_SECRET_KEY, (error, decodedToken) => { var util = require('util'); - console.log( - 'decoded refresh Token: ' + - util.inspect(decodedToken, { - showHidden: false, - depth: null, - colors: true, - }), - ); + util.inspect(decodedToken, { + showHidden: false, + depth: null, + colors: true, + }); if (error) { throw new GeneralException( @@ -1721,14 +1670,12 @@ export class UserService { process.env.ACCESS_TOKEN_SECRET_KEY, (error, decodedToken) => { var util = require('util'); - console.log( - 'decoded access Token: ' + - util.inspect(decodedToken, { - showHidden: false, - depth: null, - colors: true, - }), - ); + + util.inspect(decodedToken, { + showHidden: false, + depth: null, + colors: true, + }); if (error) { throw new GeneralException( @@ -1936,8 +1883,6 @@ export class UserService { activationReason, activationStatusChangedBy, ) { - console.log('We are in setActivationStatus', activationStatusChangedBy); - return await this.userRepository.editUser(userId, { activationStatus: activationStatus, activationStatusChangeReason: activationReason, @@ -1952,8 +1897,6 @@ export class UserService { verificationReason, verificationStatusChangedBy, ) { - console.log('We are in setVerificationStatus', verificationStatusChangedBy); - return await this.userRepository.editUser(userId, { verificationStatus: verificationStatus, verificationStatusChangeReason: verificationReason, @@ -1990,20 +1933,14 @@ export class UserService { updateDate: new Date(), }; - console.log('newUser:', newUser); - const insertedUser = await this.userRepository.insertUser(newUser); - console.log('User inserted!'); + return insertedUser; } async insertUserByEmail(body) { - console.log('I am in insertUserByEmail service!'); - await this.findAUserByEmail(body.email); - console.log('this.user: ', this.user); - if (this.user) { // User already exists. @@ -2071,20 +2008,15 @@ export class UserService { let foundUsers: any = null; const response = []; - console.log('we are in getAllUsers service!'); - foundUsers = await this.userRepository.getAllUsers( whereCondition, populateCondition, selectCondition, ); - //console.log('Found users are: ', foundUsers); - foundUsers.forEach((element) => { response.push({ ...element._doc }); }); - //console.log('response are: ', response); return response; } diff --git a/backend/src/modules/utility/controllers/category.controller.ts b/backend/src/modules/utility/controllers/category.controller.ts index 37b6655f..feeb17d6 100644 --- a/backend/src/modules/utility/controllers/category.controller.ts +++ b/backend/src/modules/utility/controllers/category.controller.ts @@ -210,7 +210,6 @@ export class CategoryController { @UseGuards(JwtAuthGuard) @ApiBearerAuth() async getAnContentById(@Param('id') id: string, @Request() request) { - console.log('We are here1!'); if ( id === null || id === undefined || @@ -347,8 +346,6 @@ export class CategoryController { @Query('isDeleted') isDeleted: boolean, @Request() request, ) { - console.log('We are here2!'); - pageNumber = pageNumber ? pageNumber : 1; limit = limit ? limit : 20; sortMode = sortMode ? sortMode : 'DESC'; // ASC/DESC OR 1/-1 diff --git a/backend/src/modules/utility/guards/permissions.guard.ts b/backend/src/modules/utility/guards/permissions.guard.ts index 9d79ab40..99448d18 100644 --- a/backend/src/modules/utility/guards/permissions.guard.ts +++ b/backend/src/modules/utility/guards/permissions.guard.ts @@ -24,24 +24,16 @@ export class PermissionsGuard implements CanActivate { context.getHandler(), ); - console.log('routePermissions: ', routePermissions); - let userRoles: any = null; let rolePermissions: any = null; let userPermissions: string[] = []; let hasPermission: boolean; - console.log('hasPermission', hasPermission); - let userId: any = null; let user: any = []; if (context.getArgs()[0].user !== undefined) { - console.log( - 'context.getArgs()[0].user.userId', - context.getArgs()[0].user.userId, - ); userId = context.getArgs()[0].user.userId; await this.userService @@ -58,17 +50,12 @@ export class PermissionsGuard implements CanActivate { }); }); - console.log('userPermissions: ---> ', userPermissions); - const checkPermission = () => routePermissions.every((routePermission) => userPermissions.includes(routePermission), ); hasPermission = checkPermission(); - console.log('hasPermission1: ', hasPermission); - - console.log('checkPermission(): ', checkPermission()); }) .catch((error) => { let errorMessage = 'Some errors occurred while finding a user!'; @@ -76,8 +63,6 @@ export class PermissionsGuard implements CanActivate { }); } - console.log('hasPermission2: ', hasPermission); - return hasPermission; } } diff --git a/backend/src/modules/utility/repositories/category.repository.ts b/backend/src/modules/utility/repositories/category.repository.ts index 1ca2c03d..fa8d7bd0 100644 --- a/backend/src/modules/utility/repositories/category.repository.ts +++ b/backend/src/modules/utility/repositories/category.repository.ts @@ -1,5 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { CategoryModel } from '../models/category.model'; @@ -42,7 +43,7 @@ export class CategoryRepository { async editCategory(id, editedData) { await this.categoryModel - .updateOne({ _id: id }, editedData) + .updateOne({ _id: { $eq: id } }, editedData) .then((data) => { this.result = data; }) @@ -58,6 +59,8 @@ export class CategoryRepository { } async findCategoryById(_id) { + const articaleCategoryId = new ObjectID(_id); + await this.categoryModel .findOne({ _id }) .where({ isDeleted: false }) diff --git a/backend/src/modules/utility/repositories/media.repository.ts b/backend/src/modules/utility/repositories/media.repository.ts index 642529a7..fbb2b62e 100644 --- a/backend/src/modules/utility/repositories/media.repository.ts +++ b/backend/src/modules/utility/repositories/media.repository.ts @@ -1,5 +1,8 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; +import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; +import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { MediaModel } from '../models/media.model'; @Injectable() diff --git a/backend/src/modules/utility/repositories/otp.repository.ts b/backend/src/modules/utility/repositories/otp.repository.ts index 381bf748..4baaac44 100644 --- a/backend/src/modules/utility/repositories/otp.repository.ts +++ b/backend/src/modules/utility/repositories/otp.repository.ts @@ -3,7 +3,6 @@ import { InjectModel } from '@nestjs/mongoose'; import { ErrorTypeEnum } from '../enums/error-type.enum'; import { OTPException } from '../exceptions/otp.exception'; import { OTPModel } from '../models/otp.model'; -import { DeleteResult } from 'mongoose'; @Injectable() export class OTPRepository { @@ -19,11 +18,11 @@ export class OTPRepository { } async editOTP(id, editedData) { - return await this.otpModel.updateOne({ _id: id }, editedData); + return await this.otpModel.updateOne({ _id: { $eq: id } }, editedData); } - async deleteOTP(id): Promise { - return await this.otpModel.deleteOne({ _id: id }); + async deleteOTP(id) { + return await this.otpModel.deleteOne({ _id: { $eq: id } }); } async findOTPByEmail(userEmail, otpType) { diff --git a/backend/src/modules/utility/repositories/tag.repository.ts b/backend/src/modules/utility/repositories/tag.repository.ts index b949374e..8ac9ed0e 100644 --- a/backend/src/modules/utility/repositories/tag.repository.ts +++ b/backend/src/modules/utility/repositories/tag.repository.ts @@ -1,5 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; +import { MongoClient, ObjectID } from 'mongodb'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; import { TagModel } from '../models/tag.model'; @@ -33,10 +34,12 @@ export class TagRepository { } async edit(id, editedData) { - return await this.tagModel.updateOne({ _id: id }, editedData); + return await this.tagModel.updateOne({ _id: { $eq: id } }, editedData); } async findTagByUserId(userId) { + const user_Id = new ObjectID(userId); + await this.tagModel .findOne({ user: userId }) .where({ isDeleted: false }) diff --git a/backend/src/modules/utility/services/category.service.ts b/backend/src/modules/utility/services/category.service.ts index 37a70e18..653906ae 100644 --- a/backend/src/modules/utility/services/category.service.ts +++ b/backend/src/modules/utility/services/category.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@nestjs/common'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; -import { ObjectId } from 'mongodb'; +import { MongoClient, ObjectID } from 'mongodb'; import { Types } from 'mongoose'; import { CategoryRepository } from '../repositories/category.repository'; import { MediaService } from 'src/modules/utility/services/media.service'; @@ -275,7 +275,7 @@ export class CategoryService { } async findCategoryById(categoryId) { - if (ObjectId.isValid(categoryId)) { + if (ObjectID.isValid(categoryId)) { await this.categoryRepository .findCategoryById(categoryId) .then((data) => { @@ -429,8 +429,6 @@ export class CategoryService { this.result = data; }) .catch((error) => { - console.log(error); - let errorMessage = 'Some errors occurred while search in categories!'; throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, diff --git a/backend/src/modules/utility/services/custom-validator.service.ts b/backend/src/modules/utility/services/custom-validator.service.ts index 12d79881..8ccae1c7 100644 --- a/backend/src/modules/utility/services/custom-validator.service.ts +++ b/backend/src/modules/utility/services/custom-validator.service.ts @@ -120,7 +120,7 @@ export class CustomValidatorService { isWebSite(Data) { const pattern = new RegExp( '^(https?:\\/\\/)?' + // protocol - '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name + '((([a-z\\d](?:[a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name '((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path '(\\?[;&a-z\\d%_.~+=-]*)?' + // query string diff --git a/backend/src/modules/utility/services/mail.service.ts b/backend/src/modules/utility/services/mail.service.ts index 8293446b..85c7aae4 100644 --- a/backend/src/modules/utility/services/mail.service.ts +++ b/backend/src/modules/utility/services/mail.service.ts @@ -92,7 +92,7 @@ export class MailService { }; const result = await this.transporter.sendMail(mailOptions); - console.log('Email sent:', result.messageId); + return result; } catch (error) { console.error('Email sending error:', error); @@ -103,9 +103,9 @@ export class MailService { } } - async getUserIdByEmail(email: string): Promise { + async getUserIdByEmail(email: string) { const res = await this.userService.getUserByEmail(email); - return String(res._id); + return res._id; } async generateUserUnsubscribeToken(userId: string) { @@ -202,13 +202,6 @@ export class MailService { } async sendRegistrationOTP(email: string, otp: string, otpType: string) { - console.log( - 'We are in sendRegistrationOTP email is: ', - email, - ' and OTP is: ', - otp, - ); - const url = process.env.HOST_PROTOCOL + process.env.PANEL_URL + @@ -219,8 +212,6 @@ export class MailService { '&otp=' + otp; - console.log('email url: ', url); - await this.sendMail({ to: email, subject: `Verify Your Email for ${process.env.NODE_NAME} - ${process.env.NODE_NAME}`, @@ -242,13 +233,6 @@ export class MailService { } async sendChangePasswordOTP(email: string, otp: string, otpType: string) { - console.log( - 'We are in sendChangePasswordOTP email is: ', - email, - ', and OTP is: ', - otp, - ); - const url = process.env.HOST_PROTOCOL + process.env.PANEL_URL + @@ -259,10 +243,7 @@ export class MailService { '&otp=' + otp; - console.log('url 22: ', url); - try { - console.log('Sending email'); const userToken = await this.getTokenWithUserEmail(email); await this.sendMail({ @@ -284,9 +265,8 @@ export class MailService { }, ], }); - console.log('email sent'); } catch (error) { - console.log(error); + console.error(error); throw new GeneralException( ErrorTypeEnum.UNPROCESSABLE_ENTITY, 'Some errors occurred while sending email', @@ -295,13 +275,6 @@ export class MailService { } async sendVerifyEmailOTP(email: string, otp: string, otpType: string) { - console.log( - 'We are in sendVerifyEmailOTP email is: ', - email, - ' and OTP is: ', - otp, - ); - const url = process.env.HOST_PROTOCOL + process.env.PANEL_URL + @@ -312,8 +285,6 @@ export class MailService { '&otp=' + otp; - console.log('url: ', url); - const userToken = await this.getTokenWithUserEmail(email); await this.sendMail({ @@ -353,13 +324,6 @@ export class MailService { notificationMessage: string, subject: string, ) { - console.log( - 'We are in sendEmailFromService email is: ', - email, - ' and notification message is: ', - notificationMessage, - ); - if (process.env.NOTIFICATION_BY_MAIL == 'enabled') { const userToken = await this.getTokenWithUserEmail(email); const currentTime = await this.getCurrentTimeFormatted(); @@ -385,8 +349,6 @@ export class MailService { }, ], }); - } else if (process.env.NOTIFICATION_BY_MAIL == 'disabled') { - console.log(`\x1b[33m \nSending email is disabled.\x1b[0m`); } } @@ -395,23 +357,12 @@ export class MailService { notificationTitle: string, notificationMessage: string, ) { - console.log( - 'We are in sendNotificationFromService userId is: ', - userId, - ' and notification title is: ', - notificationTitle, - ' and notification message is: ', - notificationMessage, - ); - if (process.env.NOTIFICATION_BY_NOTIFICATION == 'enabled') { this.notificationService.sendNotification({ message: notificationMessage, title: notificationTitle, user: userId, }); - } else if (process.env.NOTIFICATION_BY_NOTIFICATION == 'disabled') { - console.log(`\x1b[33m \nSending notifications is disabled.\x1b[0m`); } } } diff --git a/backend/src/modules/utility/services/media.service.ts b/backend/src/modules/utility/services/media.service.ts index 3336771c..dde52f94 100644 --- a/backend/src/modules/utility/services/media.service.ts +++ b/backend/src/modules/utility/services/media.service.ts @@ -26,8 +26,6 @@ export class MediaService { userId: string, file: Express.Multer.File, ) { - console.log('We are in Insert media'); - const newMedium = { user: userId, type: type, diff --git a/backend/src/modules/utility/services/otp.service.ts b/backend/src/modules/utility/services/otp.service.ts index 64c5699b..f9d4541b 100644 --- a/backend/src/modules/utility/services/otp.service.ts +++ b/backend/src/modules/utility/services/otp.service.ts @@ -73,8 +73,6 @@ export class OTPService { this.otp = await this.repository.insertOTP(newOTP); - console.log('Type Issss:', type); - if (this.otp) { if (type === OTPTypeEnum.REGISTRATION) { return await this.mailService.sendRegistrationOTP( @@ -177,30 +175,27 @@ export class OTPService { try { return await bcrypt - .compare(String(userOTP), findOTP.sentCode) - .then(async function (result) { - if (result) { - try { - await newThis.repository.deleteOTP(findOTP._id); - } catch (error) { - console.log('Error Catched:', error); - } - return true; - /* if (newThis.validateOTPExpiryDate(findOTP.expiryDate)) { + .compare(String(userOTP), findOTP.sentCode) + .then(async function (result) { + if (result) { + try { + await newThis.repository.deleteOTP(findOTP._id); + } catch (error) { + console.error('Error Catched:', error); + } + return true; + /* if (newThis.validateOTPExpiryDate(findOTP.expiryDate)) { return true } else { return false; } */ - } else { - console.log('inValid code'); - return false; - } - }); + } else { + return false; + } + }); } catch (error) { - return false + return false; } - - } async setVerificationStatus(otpId, verificationStatus, verificationReason) { diff --git a/backend/src/modules/utility/services/tag.service.ts b/backend/src/modules/utility/services/tag.service.ts index dde21e8f..f8968aae 100644 --- a/backend/src/modules/utility/services/tag.service.ts +++ b/backend/src/modules/utility/services/tag.service.ts @@ -1,7 +1,8 @@ import { Injectable } from '@nestjs/common'; import { ErrorTypeEnum } from 'src/modules/utility/enums/error-type.enum'; import { GeneralException } from 'src/modules/utility/exceptions/general.exception'; -import { ObjectId } from 'mongodb'; +import { ObjectID } from 'mongodb'; +// import { Types } from 'mongoose'; import { TagRepository } from '../repositories/tag.repository'; import { ActivationStatusEnum } from './../enums/activation-status.enum'; import { VerificationStatusEnum } from '../enums/verification-status.enum'; @@ -310,7 +311,7 @@ export class TagService { let populateCondition = []; let selectCondition = ''; - if (ObjectId.isValid(TagId)) { + if (ObjectID.isValid(TagId)) { await this.tagRepository .findById(TagId, whereCondition, populateCondition, selectCondition) .then((data) => { @@ -441,7 +442,7 @@ export class TagService { this.result = data; }) .catch((error) => { - console.log(error); + console.error(error); let errorMessage = 'Some errors occurred while search in tags!'; throw new GeneralException( diff --git a/backend/src/modules/virtual-machine/services/service-handler.service.ts b/backend/src/modules/virtual-machine/services/service-handler.service.ts index 29610bd5..8ddba3ee 100644 --- a/backend/src/modules/virtual-machine/services/service-handler.service.ts +++ b/backend/src/modules/virtual-machine/services/service-handler.service.ts @@ -1,12 +1,9 @@ import { Script, createContext } from 'vm'; -import mqtt from 'mqtt'; import { forwardRef, Inject, Injectable } from '@nestjs/common'; import { MailService } from 'src/modules/utility/services/mail.service'; import { UserService } from 'src/modules/user/services/user/user.service'; import { DeviceService } from 'src/modules/device/services/device.service'; import { InstalledServiceService } from 'src/modules/service/services/installed-service.service'; -import { insertInstalledServiceDto } from 'src/modules/service/data-transfer-objects/insert-installed-service.dto'; -import { Device } from 'src/modules/device/interfaces/device.interface'; @Injectable() export class VirtualMachineHandlerService { @@ -42,37 +39,80 @@ export class VirtualMachineHandlerService { async createVirtualMachine(body, installedServiceId) { const isExist = await this.isVmExist(installedServiceId); - if (isExist == true) { - console.log('Vm with this installedServiceId is created before !'); + if (isExist === true) { return false; } const localDeviceMap = body.deviceMap; - + const userId = body.userId; let userCode = body.code.toString(); - // replacing custom functions with blockly functions - userCode = userCode.replaceAll(`customizedMessage.sendMail`, `sendMail`); + userCode = this.sanitizeUserCode(userCode); + + const { letLinesCode, restOfCode } = this.parseUserCode(userCode); + + const mainThreadCode = this.generateMainThreadCode(); + + const script = new Script(mainThreadCode); + + const context = createContext({ + console: console, + require: require, + mqtt: require('mqtt'), + localDeviceMap: localDeviceMap, + userService: this.userService, + mailService: this.mailService, + deviceService: this.deviceService, + userId: userId, // βœ… Passed as variable + userCode: { + letLines: letLinesCode, + restOfCode: restOfCode, + }, + installedServiceId: installedServiceId, + JSON: { + parse: JSON.parse, + stringify: JSON.stringify, + }, + TextEncoder: require('util').TextEncoder, + TextDecoder: require('util').TextDecoder, + setTimeout: setTimeout, + setInterval: setInterval, + }); + + // Run the script in the context + script.runInContext(context); + + // Store context + this.vmContexts[installedServiceId.toString()] = context; + + return true; + } + // ============================================ + // SANITIZE USER CODE FROM BLOCKLY + // ============================================ + sanitizeUserCode(userCode: string): string { + // Replace custom functions with safe equivalents + userCode = userCode.replaceAll('customizedMessage.sendMail', 'sendMail'); userCode = userCode.replaceAll( - `customizedMessage.sendNotification`, - `sendNotification`, + 'customizedMessage.sendNotification', + 'sendNotification', ); - // adding getNewData function into first line of all while and for loops ( for data refreshing every where ) + // Add getNewData function into loops for data refreshing userCode = userCode.replace( /(for\s*\(.*?\)\s*\{)|(while\s*\(.*?\)\s*\{)/g, (match) => `${match}\n getNewData();var waitTill = new Date(new Date().getTime() + 200);while (waitTill > new Date()) {};`, ); - // replacing waitForDevicePayload with acctual backend codes + // Replace waitForDevicePayload with actual backend code userCode = userCode.replace( /await waitForDevicePayload\(([\w\d_]+)\);/g, - 'while (getNewData("$1") == false) {parentPort.postMessage("Looping"); var waitTill = new Date(new Date().getTime() + 500);while (waitTill > new Date()) {}}; parentPort.postMessage("Device sended data and exited loop");', + 'while (getNewData("$1") == false) {parentPort.postMessage("Looping"); var waitTill = new Date(new Date().getTime() + 500);while (waitTill > new Date()) {}}; parentPort.postMessage("Device sent data and exited loop");', ); - // replacing blockly wait function with while loops + // Replace blockly wait function with while loops let waitCounter = 0; userCode = userCode.replace( /await waitTill\((\w+)\);( ?\/\/.*)?/g, @@ -82,489 +122,501 @@ export class VirtualMachineHandlerService { }, ); + return userCode; + } + + // ============================================ + // PARSE USER CODE INTO SECTIONS + // ============================================ + parseUserCode(userCode: string): { + letLinesCode: string; + restOfCode: string; + } { const lines = userCode.split('\n'); const letLinesCode = lines - .filter((line) => line.startsWith('let ')) + .filter((line) => line.trim().startsWith('let ')) .join('\n'); const restOfCode = lines - .filter((line) => !line.startsWith('let ')) + .filter((line) => !line.trim().startsWith('let ')) .join('\n'); - let userId = body.userId; - - console.log( - '---------------------------------------------------------------------------', - ); - - console.log('1 code:', userCode); - - console.log( - '---------------------------------------------------------------------------', - ); - - console.log('2 code:', letLinesCode); - - console.log( - '---------------------------------------------------------------------------', - ); - - console.log('3 code:', restOfCode); - - console.log( - '---------------------------------------------------------------------------', - ); - - const code = ` - const { - Worker, - isMainThread, - parentPort, - workerData, -} = require('worker_threads'); + return { letLinesCode, restOfCode }; + } + // ============================================ + // GENERATE MAIN THREAD CODE (NO INJECTION) + // ============================================ + generateMainThreadCode(): string { + // All dynamic values are accessed from context variables + return ` +const { Worker } = require('worker_threads'); const { TextEncoder, TextDecoder } = require('util'); +// ============================================ +// UTILITY FUNCTIONS +// ============================================ function uppercaseKeys(obj) { - return Object.keys(obj).reduce((result, key) => { - result[key.toUpperCase()] = obj[key]; - return result; - }, {}); + return Object.keys(obj).reduce((result, key) => { + result[key.toUpperCase()] = obj[key]; + return result; + }, {}); } function lowercaseStrings(obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - for (const key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - const value = obj[key]; - if (typeof value === 'string') { - obj[key] = value.toLowerCase(); - lowercaseStrings(value); - } - } - } - return obj; + if (typeof obj !== 'object' || obj === null) { + return obj; + } + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + const value = obj[key]; + if (typeof value === 'string') { + obj[key] = value.toLowerCase(); + lowercaseStrings(value); + } + } + } + return obj; } +// ============================================ +// DEVICE MANAGEMENT +// ============================================ let devicesInfo = {}; async function getServiceDevicesData() { - devicesInfo = {}; - - for (const [deviceName, deviceEncryptedId] of Object.entries( - localDeviceMap - )) { - devicesInfo[deviceName] = - await deviceService.getDeviceInfoByEncryptedId( - String(deviceEncryptedId) - ); - } - - Object.keys(devicesInfo).forEach((key) => { - const deviceData = devicesInfo[key]; - - let nodeMqttAddress = ''; - - if (String(deviceData.nodeId) == 'developer.fidesinnova.io') { - nodeMqttAddress = \`\${deviceData.nodeId}\`; - } else { - nodeMqttAddress = \`panel.\${deviceData.nodeId}\`; - } - devicesInfo[key].nodeMqttAddress = nodeMqttAddress; - }); - - console.log('All Device Data Refreshed From DB'); + devicesInfo = {}; + + for (const [deviceName, deviceEncryptedId] of Object.entries(localDeviceMap)) { + devicesInfo[deviceName] = await deviceService.getDeviceInfoByEncryptedId( + String(deviceEncryptedId) + ); + } + + Object.keys(devicesInfo).forEach((key) => { + const deviceData = devicesInfo[key]; + let nodeMqttAddress = ''; + + if (String(deviceData.nodeId) === 'developer.fidesinnova.io') { + nodeMqttAddress = deviceData.nodeId; + } else { + nodeMqttAddress = 'panel.' + deviceData.nodeId; + } + devicesInfo[key].nodeMqttAddress = nodeMqttAddress; + }); + } function getDeviceVariableWithEncryptedId(deviceEncryptedId) { - let findName = ''; - for (const [deviceName, encryptedId] of Object.entries(localDeviceMap)) { - if (String(deviceEncryptedId) == String(encryptedId)) { - findName = deviceName; - } - } - return findName; + let findName = ''; + for (const [deviceName, encryptedId] of Object.entries(localDeviceMap)) { + if (String(deviceEncryptedId) === String(encryptedId)) { + findName = deviceName; + } + } + return findName; } function getDeviceDataByEncryptedId(deviceEncryptedId) { - const deviceData = Object.keys(devicesInfo).find((key) => { - const deviceData = devicesInfo[key]; - return ( - String(deviceData.deviceEncryptedId) === String(deviceEncryptedId) - ); - }); - - return devicesInfo[deviceData] || {}; + const deviceData = Object.keys(devicesInfo).find((key) => { + const deviceData = devicesInfo[key]; + return String(deviceData.deviceEncryptedId) === String(deviceEncryptedId); + }); + return devicesInfo[deviceData] || {}; } +// ============================================ +// SHARED BUFFER COMMUNICATION +// ============================================ const sharedBuffer = new SharedArrayBuffer(2048); const view = new DataView(sharedBuffer); - let clients = []; +// ============================================ +// MQTT DEVICE LISTENERS +// ============================================ function listenToAllDevices() { - Object.keys(devicesInfo).forEach((key) => { - const deviceData = devicesInfo[key]; - const connectUrl = \`mqtts://\${deviceData.nodeMqttAddress}:8883\`; - let topic = \`\${deviceData.deviceEncryptedId}\`; - + Object.keys(devicesInfo).forEach((key) => { + const deviceData = devicesInfo[key]; + const connectUrl = 'mqtts://' + deviceData.nodeMqttAddress + ':8883'; + let topic = deviceData.deviceEncryptedId; + const client = mqtt.connect(connectUrl, { - clean: true, - connectTimeout: 4000, - reconnectPeriod: 1000, - protocolId: 'MQIsdp', - protocolVersion: 3, - }); + clean: true, + connectTimeout: 4000, + reconnectPeriod: 1000, + protocolId: 'MQIsdp', + protocolVersion: 3, + }); clients.push(client); + client.on('connect', () => { + client.subscribe(topic, (err) => { + if (err) { + console.error('Error While Connecting To:', topic); + } + }); + }); - client.on('connect', () => { - client.subscribe(topic, (err) => { - if (!err) { - console.log('Connected To :', topic); - } else { - console.log('Error While Connecting To :', topic); - } - }); - }); - client.on('message', async (topic, message) => { - let data = JSON.parse(message); - - try { - const deviceInfos = getDeviceDataByEncryptedId(data.from); - - console.log("Device Name:", deviceInfos.deviceName, ", Device Enc:", data.from) - - if (deviceInfos) { - - data.variable = getDeviceVariableWithEncryptedId(data.from); - - data.data = { - ...data.data, - mac: deviceInfos.mac, - type: deviceInfos.deviceType, - }; - - if (data.data.proof) { - delete data.data.proof; - console.log('Proof Deleted'); - } - - data.data = lowercaseStrings(data.data); - - data.data.name = deviceInfos.deviceName // Because of the device name to don't be lowercase* - - data.data = uppercaseKeys(data.data); // uppercasing all the keys, also NAME* - - //console.log('The data is:', data); - - } else { - console.error('Device info not found for topic:', topic); - } - } catch (error) { - console.error('Error fetching device info:', error); - } - - // Clear the sharedBuffer before setting new data - for (let i = 0; i < sharedBuffer.byteLength; i++) { - view.setUint8(i, 0); - } - - // Encode the message and store it in sharedBuffer - const encoder = new TextEncoder(); - const encodedMessage = encoder.encode(JSON.stringify(data)); - for (let i = 0; i < encodedMessage.length; i++) { - view.setUint8(i + 2, encodedMessage[i]); // Store starting from index 1 - } - - console.log("Flag setted true") - // Set the flag to true (1) - view.setUint8(0, 1); - }); - }); -} - -function terminateVm() { - view.setUint8(1, 1); - - clients.forEach((client) => { - client.end(false, () => { - console.log('Disconnected from MQTT broker'); - }); - }); - - return true; -} - -(async () => { - await getServiceDevicesData(); - await listenToAllDevices(); -})(); + client.on('message', async (topic, message) => { + let data = JSON.parse(message); -setTimeout(() => { - getServiceDevicesData(); -}, 10 * 60 * 1000); + try { + const deviceInfos = getDeviceDataByEncryptedId(data.from); -// Expose the function to the context -globalThis.terminateVm = terminateVm; -const sendMail = async (email) => { - let user = await userService.getUserProfileByIdFromUser('${userId}'); - let userEmail = user.email; - return await mailService.sendEmailFromService( - userEmail, - email.body, - email.subject - ); -}; + if (deviceInfos) { + data.variable = getDeviceVariableWithEncryptedId(data.from); + data.data = { + ...data.data, + mac: deviceInfos.mac, + type: deviceInfos.deviceType, + }; -const sendNotification = async (notification) => { - return await mailService.sendNotificationFromService( - '${userId}', - notification.title, - notification.message - ); -}; + if (data.data.proof) { + delete data.data.proof; + } -console.log('Main thread: Starting workers...'); + data.data = lowercaseStrings(data.data); + data.data.name = deviceInfos.deviceName; + data.data = uppercaseKeys(data.data); + } else { + console.error('Device info not found for topic:', topic); + } + } catch (error) { + console.error('Error fetching device info:', error); + } + // Clear the sharedBuffer before setting new data + for (let i = 0; i < sharedBuffer.byteLength; i++) { + view.setUint8(i, 0); + } - const workerCode = \` - const { - Worker, - isMainThread, - parentPort, - workerData, -} = require('worker_threads'); + // Encode the message and store it in sharedBuffer + const encoder = new TextEncoder(); + const encodedMessage = encoder.encode(JSON.stringify(data)); + for (let i = 0; i < encodedMessage.length; i++) { + view.setUint8(i + 2, encodedMessage[i]); + } -const { TextEncoder, TextDecoder } = require('util'); -let lastData = {}; -let functions = {}; + view.setUint8(0, 1); + }); + }); +} +// ============================================ +// VM TERMINATION +// ============================================ +function terminateVm() { + view.setUint8(1, 1); + clients.forEach((client) => { + client.end(false, () => { + console.log('Disconnected from MQTT broker'); + }); + }); -function getNewData(variable = "") { - const sharedBuffer = workerData; - const view = new DataView(sharedBuffer); - const decoder = new TextDecoder(); - const flag = view.getUint8(0); - const terminate = view.getUint8(1); - if (terminate === 1) { - process.exit(0); - } + return true; +} - if (flag === 1) { +globalThis.terminateVm = terminateVm; - parentPort.postMessage("Data received from custom function") +// ============================================ +// SECURE MESSAGING FUNCTIONS +// ============================================ +// βœ… SECURE: userId is accessed from context variable, not template string +const sendMail = async (email) => { + try { + let user = await userService.getUserProfileByIdFromUser(userId); + let userEmail = user.email; + return await mailService.sendEmailFromService( + userEmail, + email.body, + email.subject + ); + } catch (error) { + console.error('Error sending mail:', error); + throw error; + } +}; - view.setUint8(0, 0); +const sendNotification = async (notification) => { + try { + return await mailService.sendNotificationFromService( + userId, + notification.title, + notification.message + ); + } catch (error) { + console.error('Error sending notification:', error); + throw error; + } +}; - const bytes = new Uint8Array(sharedBuffer, 2, 2046); - let message = decoder.decode(bytes).trim(); +// βœ… SECURE: Worker code without template injection +const workerCode = \` +const { parentPort, workerData } = require('worker_threads'); +const { TextDecoder } = require('util'); - const cleanMessage = message.replace(/[^\\x20-\\x7E]/g, ''); +const sharedBuffer = workerData.sharedBuffer; +const userCode = workerData.userCode; - let data; +let lastData = {}; +let functions = {}; - try { +// Safe context for user code +const safeContext = { + lastData: lastData, + functions: functions, + console: { + log: (...args) => parentPort.postMessage({ type: 'log', data: args }), + error: (...args) => parentPort.postMessage({ type: 'error', data: args }), + }, + sendMail: (obj) => { + if (obj && typeof obj === 'object' && obj.subject && obj.body) { + parentPort.postMessage({ ...obj }); + } + }, + sendNotification: (obj) => { + if (obj && typeof obj === 'object' && obj.title && obj.message) { + parentPort.postMessage({ ...obj }); + } + }, + parentPort: { + postMessage: (msg) => parentPort.postMessage(msg) + }, + Date: Date, + Math: Math, + String: String, + Number: Number, + Boolean: Boolean, + Array: Array, + Object: Object, +}; - data = JSON.parse(cleanMessage); +function getNewData(variable = "") { + const view = new DataView(sharedBuffer); + const decoder = new TextDecoder(); + const flag = view.getUint8(0); + const terminate = view.getUint8(1); + + if (terminate === 1) { + process.exit(0); + } - lastData[String(data.variable)] = data.data + if (flag === 1) { + parentPort.postMessage("Data received from custom function"); + view.setUint8(0, 0); - parentPort.postMessage('Log lastData:'); - parentPort.postMessage(lastData); + const bytes = new Uint8Array(sharedBuffer, 2, 2046); + let message = decoder.decode(bytes).trim(); + const cleanMessage = message.replace(/[^\\\\x20-\\\\x7E]/g, ''); - const deviceName = String(data.variable); - const capitalizedDeviceName = deviceName.charAt(0).toUpperCase() + deviceName.slice(1); - - const functionName = "runFunctionWithPayload" + capitalizedDeviceName; + let data; + try { + data = JSON.parse(cleanMessage); + lastData[String(data.variable)] = data.data; + safeContext.lastData = lastData; - if (typeof functions[functionName] === "function") { - functions[functionName](); - } else { - console.error("Function not found"); - } + parentPort.postMessage('Log lastData:'); + parentPort.postMessage(lastData); - } catch (e) { - parentPort.postMessage('Failed to parse JSON'); - } + const deviceName = String(data.variable); + const capitalizedDeviceName = deviceName.charAt(0).toUpperCase() + deviceName.slice(1); + const functionName = "runFunctionWithPayload" + capitalizedDeviceName; - const deviceVar = String(variable) + if (typeof functions[functionName] === "function") { + functions[functionName](); + } + } catch (e) { + parentPort.postMessage('Failed to parse JSON'); + } - parentPort.postMessage("The variable is:") + const deviceVar = String(variable); + if (deviceVar.length > 0 && deviceVar !== String(data?.variable)) { + return false; + } + return true; + } else { + return false; + } +} - parentPort.postMessage(deviceVar) +safeContext.getNewData = getNewData; + +function executeUserCode(letLines, restOfCode, data) { + try { + const userFunction = new Function( + ...Object.keys(safeContext), + 'data', + \\\` + 'use strict'; + \\\${letLines} + \\\${restOfCode} + \\\` + ); + userFunction(...Object.values(safeContext), data); + } catch (error) { + parentPort.postMessage('Error in user code:'); + parentPort.postMessage({ + message: error.message, + stack: error.stack + }); + } +} - if ( deviceVar.length > 0 && deviceVar != String(data?.variable) ) { - parentPort.postMessage("getNewData returned falseeeeeeeeeeeeee") - return false - } - parentPort.postMessage("getNewData returned truuuuuuuuuuuuuuuuuuuuue") - return true - } else { - return false - } +function initializeUserCode() { + try { + if (userCode.letLines) { + const initFunction = new Function( + ...Object.keys(safeContext), + \\\` + 'use strict'; + \\\${userCode.letLines} + \\\` + ); + initFunction(...Object.values(safeContext)); + } + parentPort.postMessage('User code initialized successfully'); + } catch (error) { + parentPort.postMessage('Error initializing user code:'); + parentPort.postMessage({ + message: error.message, + stack: error.stack + }); + } } function mainFunction() { - const sharedBuffer = workerData; - const view = new DataView(sharedBuffer); - const decoder = new TextDecoder(); - parentPort.postMessage('Loop Runed'); - - while (true) { - const flag = view.getUint8(0); - const terminate = view.getUint8(1); - if (terminate === 1) { - process.exit(0); - } - - if (flag === 1) { - view.setUint8(0, 0); - - const bytes = new Uint8Array(sharedBuffer, 2, 2046); - - let message = decoder.decode(bytes).trim(); - - const cleanMessage = message.replace(/[^\\x20-\\x7E]/g, ''); - - const sendMail = (obj) => { - parentPort.postMessage(obj); - }; - - const sendNotification = (obj) => { - parentPort.postMessage(obj); - }; - - try { - - let data = JSON.parse(cleanMessage); - - lastData[String(data.variable)] = data.data - - ${letLinesCode} - - parentPort.postMessage('Log lastData:'); - parentPort.postMessage(lastData); - - ${restOfCode} - - const deviceName = String(data.variable); - const capitalizedDeviceName = deviceName.charAt(0).toUpperCase() + deviceName.slice(1); - - const functionName = "runFunctionWithPayload" + capitalizedDeviceName; + const view = new DataView(sharedBuffer); + const decoder = new TextDecoder(); + + parentPort.postMessage('Loop Started'); + + while (true) { + const flag = view.getUint8(0); + const terminate = view.getUint8(1); + + if (terminate === 1) { + process.exit(0); + } - if (typeof functions[functionName] === "function") { - functions[functionName](); - } else { - console.error("Function not found"); - } - - } catch (e) { - parentPort.postMessage('Error in user code: '); - parentPort.postMessage(e); - } - } + if (flag === 1) { + view.setUint8(0, 0); + + const bytes = new Uint8Array(sharedBuffer, 2, 2046); + let message = decoder.decode(bytes).trim(); + const cleanMessage = message.replace(/[^\\\\x20-\\\\x7E]/g, ''); + + try { + let data = JSON.parse(cleanMessage); + lastData[String(data.variable)] = data.data; + safeContext.lastData = lastData; + + parentPort.postMessage('Log lastData:'); + parentPort.postMessage(lastData); + + if (userCode.restOfCode) { + executeUserCode(userCode.letLines, userCode.restOfCode, data); + } + + const deviceName = String(data.variable); + const capitalizedDeviceName = deviceName.charAt(0).toUpperCase() + deviceName.slice(1); + const functionName = "runFunctionWithPayload" + capitalizedDeviceName; + + if (typeof functions[functionName] === "function") { + functions[functionName](); + } + } catch (e) { + parentPort.postMessage('Error processing device data:'); + parentPort.postMessage({ + message: e.message, + stack: e.stack + }); + } + } - // Simulate a short delay - var waitTill = new Date(new Date().getTime() + 100);while (waitTill > new Date()) {}; - } + const waitTill = new Date(new Date().getTime() + 100); + while (waitTill > new Date()) {} + } +} - +try { + initializeUserCode(); + mainFunction(); +} catch (error) { + parentPort.postMessage('Fatal worker error:'); + parentPort.postMessage({ + message: error.message, + stack: error.stack + }); + process.exit(1); } +\`; + +// βœ… SECURE: Create worker with code string, pass user code as data +const vmWorker = new Worker(workerCode, { + eval: true, + workerData: { + sharedBuffer: sharedBuffer, + userCode: userCode, // βœ… From context variable, not template interpolation + } +}); + +vmWorker.on('message', (msg) => { + if (typeof msg === 'object' && msg !== null) { + if (msg.subject) { + sendMail(msg).catch(err => console.error('Mail error:', err)); + } else if (msg.title) { + sendNotification(msg).catch(err => console.error('Notification error:', err)); + } + } - mainFunction(); +}); - \` +vmWorker.on('error', (err) => { + console.error('Worker encountered an error:', err); +}); - const vmWorker = new Worker(workerCode, { eval: true, workerData: sharedBuffer}); - - vmWorker.on('message', (msg) => { - if ( (typeof msg).toString() === "object" ) { - if ( msg.subject ) { - sendMail(msg) - } else if ( msg.title ) { - sendNotification(msg) - } - } - console.log('Main thread: Received from worker: ', msg); - }); - - vmWorker.on('error', (err) => { - console.error('Worker encountered an error:', err); - }); - - vmWorker.on('exit', (code) => { - if (code !== 0) { - console.error('Worker stopped with exit code', code); - } else { - console.log('Worker exited successfully.'); - } - }); - - console.log('vmWorker started successfully.'); - - `; - - // Create a script - const script = new Script(code); - - // Create a context for the script to run in - const context = createContext({ - console: console, - require: require, - mqtt: mqtt, - localDeviceMap: localDeviceMap, - userService: this.userService, - mailService: this.mailService, - deviceService: this.deviceService, - JSON: { - parse: JSON.parse, - stringify: JSON.stringify, - }, - TextEncoder: require('util').TextEncoder, - TextDecoder: require('util').TextDecoder, - setTimeout: setTimeout, - setInterval: setInterval, - }); - - // Run the script in the context - script.runInContext(context); - - this.vmContexts[installedServiceId.toString()] = context; +vmWorker.on('exit', (code) => { + if (code !== 0) { + console.error('Worker stopped with exit code', code); + } +}); - console.log( - `Virtual Machine With ID ${installedServiceId} Created Successfully`, - ); +(async () => { + await getServiceDevicesData(); + await listenToAllDevices(); +})(); - return true; +setTimeout(() => { + getServiceDevicesData(); +}, 10 * 60 * 1000); +`; } + // ============================================ + // DELETE VIRTUAL MACHINE + // ============================================ async deleteVirtualMachinByServiceId(installedServiceId) { - console.log('Deletingggggggggg'); - try { if (this.vmContexts[installedServiceId.toString()]) { this.vmContexts[installedServiceId.toString()].terminateVm(); delete this.vmContexts[installedServiceId.toString()]; - console.log( - `${installedServiceId} Virtual Machine Deleted Succesfully !`, - ); } return true; } catch (e) { - console.log('Errrrorrrrr:', e); - + console.error('Error deleting VM:', e); return false; } } + // ============================================ + // DELETE ALL USER VMS + // ============================================ async deleteAllUserVirtualMachines(userId: string) { await this.installedServiceService .getInstalledServicesByUserId(userId) @@ -576,12 +628,16 @@ function mainFunction() { .catch((error) => { let errorMessage = 'Some errors occurred while fetching installed services!'; + console.error(errorMessage, error); return errorMessage; }); return true; } + // ============================================ + // CREATE ALL VMS ON STARTUP + // ============================================ async createAllVirtualMachines() { let count = 0; await this.installedServiceService @@ -597,9 +653,9 @@ function mainFunction() { .catch((error) => { let errorMessage = 'Some errors occurred while fetching installed services!'; + console.error(errorMessage, error); return errorMessage; }); - console.log(`All virtual machines created successfully (Count: ${count})`); return this.allResults; } diff --git a/backend/test/app.e2e-spec.ts b/backend/test/app.e2e-spec.ts deleted file mode 100644 index 0012dcd2..00000000 --- a/backend/test/app.e2e-spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { INestApplication } from '@nestjs/common'; -import * as request from 'supertest'; -import { AppModule } from '../src/app.module'; - -describe('AppController (e2e)', () => { - let app: INestApplication; - - beforeEach(async () => { - const moduleFixture: TestingModule = await Test.createTestingModule({ - imports: [AppModule], - }).compile(); - - app = moduleFixture.createNestApplication(); - await app.init(); - }); - - it('/ (GET)', () => { - return request(app.getHttpServer()) - .get('/') - .expect(200) - .expect('Hello World!'); - }); -}); diff --git a/backend/test/jest-e2e.json b/backend/test/jest-e2e.json deleted file mode 100644 index e9d912f3..00000000 --- a/backend/test/jest-e2e.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - } -} diff --git a/backend/uploads/avatars/1.png b/backend/uploads/avatars/1.png deleted file mode 100644 index 29c39718..00000000 Binary files a/backend/uploads/avatars/1.png and /dev/null differ diff --git a/backend/uploads/avatars/10.png b/backend/uploads/avatars/10.png deleted file mode 100644 index fb366a25..00000000 Binary files a/backend/uploads/avatars/10.png and /dev/null differ diff --git a/backend/uploads/avatars/11.png b/backend/uploads/avatars/11.png deleted file mode 100644 index 8fe70e83..00000000 Binary files a/backend/uploads/avatars/11.png and /dev/null differ diff --git a/backend/uploads/avatars/12.png b/backend/uploads/avatars/12.png deleted file mode 100644 index 4fe50d9f..00000000 Binary files a/backend/uploads/avatars/12.png and /dev/null differ diff --git a/backend/uploads/avatars/13.png b/backend/uploads/avatars/13.png deleted file mode 100644 index b2328422..00000000 Binary files a/backend/uploads/avatars/13.png and /dev/null differ diff --git a/backend/uploads/avatars/14.png b/backend/uploads/avatars/14.png deleted file mode 100644 index f71115e8..00000000 Binary files a/backend/uploads/avatars/14.png and /dev/null differ diff --git a/backend/uploads/avatars/15.png b/backend/uploads/avatars/15.png deleted file mode 100644 index 28f2f6e3..00000000 Binary files a/backend/uploads/avatars/15.png and /dev/null differ diff --git a/backend/uploads/avatars/16.png b/backend/uploads/avatars/16.png deleted file mode 100644 index e24c46c5..00000000 Binary files a/backend/uploads/avatars/16.png and /dev/null differ diff --git a/backend/uploads/avatars/17.png b/backend/uploads/avatars/17.png deleted file mode 100644 index 78403fae..00000000 Binary files a/backend/uploads/avatars/17.png and /dev/null differ diff --git a/backend/uploads/avatars/18.png b/backend/uploads/avatars/18.png deleted file mode 100644 index d1a7e4cc..00000000 Binary files a/backend/uploads/avatars/18.png and /dev/null differ diff --git a/backend/uploads/avatars/19.png b/backend/uploads/avatars/19.png deleted file mode 100644 index f1a66ed8..00000000 Binary files a/backend/uploads/avatars/19.png and /dev/null differ diff --git a/backend/uploads/avatars/2.png b/backend/uploads/avatars/2.png deleted file mode 100644 index 0759ccd5..00000000 Binary files a/backend/uploads/avatars/2.png and /dev/null differ diff --git a/backend/uploads/avatars/20.png b/backend/uploads/avatars/20.png deleted file mode 100644 index 5fd68693..00000000 Binary files a/backend/uploads/avatars/20.png and /dev/null differ diff --git a/backend/uploads/avatars/3.png b/backend/uploads/avatars/3.png deleted file mode 100644 index cc49afc3..00000000 Binary files a/backend/uploads/avatars/3.png and /dev/null differ diff --git a/backend/uploads/avatars/4.png b/backend/uploads/avatars/4.png deleted file mode 100644 index 1efd0c7a..00000000 Binary files a/backend/uploads/avatars/4.png and /dev/null differ diff --git a/backend/uploads/avatars/5.png b/backend/uploads/avatars/5.png deleted file mode 100644 index c457b5e6..00000000 Binary files a/backend/uploads/avatars/5.png and /dev/null differ diff --git a/backend/uploads/avatars/6.png b/backend/uploads/avatars/6.png deleted file mode 100644 index 74a14c80..00000000 Binary files a/backend/uploads/avatars/6.png and /dev/null differ diff --git a/backend/uploads/avatars/7.png b/backend/uploads/avatars/7.png deleted file mode 100644 index b3ad3704..00000000 Binary files a/backend/uploads/avatars/7.png and /dev/null differ diff --git a/backend/uploads/avatars/8.png b/backend/uploads/avatars/8.png deleted file mode 100644 index 1015654e..00000000 Binary files a/backend/uploads/avatars/8.png and /dev/null differ diff --git a/backend/uploads/avatars/9.png b/backend/uploads/avatars/9.png deleted file mode 100644 index 319c2488..00000000 Binary files a/backend/uploads/avatars/9.png and /dev/null differ diff --git a/backend/uploads/devices/iot2050.png b/backend/uploads/devices/iot2050.png deleted file mode 100644 index 34003c47..00000000 Binary files a/backend/uploads/devices/iot2050.png and /dev/null differ diff --git a/backend/uploads/devices/zksensor-ecard.png b/backend/uploads/devices/zksensor-ecard.png deleted file mode 100644 index 12906a74..00000000 Binary files a/backend/uploads/devices/zksensor-ecard.png and /dev/null differ diff --git a/backend/uploads/devices/zksensor-minisensor.png b/backend/uploads/devices/zksensor-minisensor.png deleted file mode 100644 index 4c56808f..00000000 Binary files a/backend/uploads/devices/zksensor-minisensor.png and /dev/null differ diff --git a/backend/uploads/devices/zksensor-zk-multisensor.png b/backend/uploads/devices/zksensor-zk-multisensor.png deleted file mode 100644 index 41a90ebb..00000000 Binary files a/backend/uploads/devices/zksensor-zk-multisensor.png and /dev/null differ diff --git a/backend/uploads/fides_logo.png b/backend/uploads/fides_logo.png deleted file mode 100644 index b64db75c..00000000 Binary files a/backend/uploads/fides_logo.png and /dev/null differ diff --git a/backend/uploads/sprites.png b/backend/uploads/sprites.png deleted file mode 100644 index 20aadb6c..00000000 Binary files a/backend/uploads/sprites.png and /dev/null differ diff --git a/backup.sh b/backup.sh deleted file mode 100755 index 697bc24c..00000000 --- a/backup.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# Get script directory -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -sed -i 's/\r$//' backend/.env -set -o allexport -# Filter valid lines before sourcing -grep -E '^[A-Za-z_]+=[^ ]+' "$SCRIPT_DIR/backend/.env" > /tmp/env_cleaned -source /tmp/env_cleaned -set +o allexport - - -# Debugging: Show MongoDB variables -#echo "Using MongoDB Host: $MONGO_HOST" -#echo "Using MongoDB Database: $MONGO_DATABASE_NAME" -#echo "Port: '$MONGO_PORT'" - - -# Define backup directory inside the script's folder -BACKUP_DIR="$SCRIPT_DIR/backups" -TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S") -BACKUP_FILE="iot_server_backup_$TIMESTAMP.tar.gz" -MONGO_BACKUP_DIR="$BACKUP_DIR/mongo_backup" - -# Create backup directory if it doesn't exist -mkdir -p "$BACKUP_DIR" -mkdir -p "$MONGO_BACKUP_DIR" - -# Backup MongoDB with authentication -mongodump --host "$MONGO_HOST" --port "$MONGO_PORT" \ - --username "$MONGO_USER" --password "$MONGO_PASSWORD" --authenticationDatabase "$MONGO_DATABASE_NAME" \ - --db "$MONGO_DATABASE_NAME" --out "$MONGO_BACKUP_DIR" - -# Ensure MongoDB backup exists -if [ "$(ls -A $MONGO_BACKUP_DIR 2>/dev/null)" ]; then - echo "MongoDB backup successful!" -else - echo "⚠️ MongoDB backup failed!" - exit 1 -fi - -# List of files and directories to backup -FILES_TO_BACKUP="" -[ -d "$SCRIPT_DIR/backend/uploads" ] && FILES_TO_BACKUP+=" $SCRIPT_DIR/backend/uploads" -[ -d "$SCRIPT_DIR/backend/src/data" ] && FILES_TO_BACKUP+=" $SCRIPT_DIR/backend/src/data" -[ -f "$SCRIPT_DIR/web_app/Source_webapp/.env" ] && FILES_TO_BACKUP+=" $SCRIPT_DIR/web_app/Source_webapp/.env" -[ -f "$SCRIPT_DIR/admin_web_app/Source_webapp/.env" ] && FILES_TO_BACKUP+=" $SCRIPT_DIR/admin_web_app/Source_webapp/.env" -[ -f "$SCRIPT_DIR/backend/.env" ] && FILES_TO_BACKUP+=" $SCRIPT_DIR/backend/.env " -[ -d "$MONGO_BACKUP_DIR" ] && FILES_TO_BACKUP+=" $MONGO_BACKUP_DIR " - -# Archive the files -tar -czvf "$BACKUP_DIR/$BACKUP_FILE" $FILES_TO_BACKUP - -# Cleanup temporary MongoDB backup folder -rm -rf "$MONGO_BACKUP_DIR" - -# Notify user -echo "βœ… Backup completed: $BACKUP_DIR/$BACKUP_FILE" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..cf039644 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,60 @@ +services: + backend: + build: + context: ./backend + dockerfile: Dockerfile + ports: + - "${BACK_PORT}:${BACK_PORT}" + env_file: + - ./backend/.env + restart: always + depends_on: + - mongo + volumes: + - ./nginx/ssl:/etc/nginx/ssl:ro + - ./backend/src/data:/usr/src/app/src/data:ro + - ./backend/uploads:/usr/src/app/uploads + - ./backend/logs:/usr/src/app/logs + + webapp: + build: + context: ./web_app + dockerfile: Dockerfile + ports: + - ${WEBAPP_PORT}:80 + restart: always + depends_on: + - backend + env_file: + - "./web_app/.env" + + admin_webapp: + build: + context: ./admin_web_app + dockerfile: Dockerfile + ports: + - ${ADMIN_WEBAPP_PORT}:80 + restart: always + depends_on: + - backend + env_file: + - "./admin_web_app/.env" + + mongo: + image: mongo:7.0 + restart: always + ports: + - "${MONGO_DATABASE_PORT}:27017" + environment: + MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME} + MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD} + MONGO_INITDB_DATABASE: ${MONGO_DATABASE_NAME} + FIDESINNOVA_DB_USERNAME: ${MONGO_USER} + FIDESINNOVA_DB_PASSWORD: ${MONGO_PASSWORD} + MONGO_DATABASE_PORT: ${MONGO_DATABASE_PORT} + volumes: + - mongo_data:/data/db + - ./mongo-init-scripts:/docker-entrypoint-initdb.d + +volumes: + mongo_data: diff --git a/initial_setup.sh b/initial_setup.sh deleted file mode 100755 index 153a8ee2..00000000 --- a/initial_setup.sh +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/bash - -# Navigate to the backend directory -cd backend || { echo "Error: Failed to navigate to backend directory."; exit 1; } - -echo "Installing new packages for backend via npm..." -if npm install; then - echo "Packages for backend installed successfully." -else - echo "Error: Failed to install backend packages." - exit 1 -fi - -echo "Building backend..." -if npm run build; then - echo "Backend build completed successfully." -else - echo "Error: Backend build failed." - exit 1 -fi - -# Go back to the base directory -cd ../ || { echo "Error: Failed to return to base directory."; exit 1; } - -# Build and move for web_app -echo "Navigating to web_app..." -cd web_app/Source_webapp || { echo "Error: Failed to navigate to web_app directory."; exit 1; } - -echo "Installing new packages for web_app via npm..." -if npm install; then - echo "Packages for web_app installed successfully." -else - echo "Error: Failed to install web_app packages." - exit 1 -fi - -echo "Building web_app..." -if npm run build; then - echo "web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move web_app files."; exit 1; } - echo "web_app files moved successfully." -else - echo "Error: web_app build failed." - exit 1 -fi - - -echo "Installing new packages for web_app/Runner_webapp..." -cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } -if npm install; then - echo "Packages of Runner_webapp for web_app installed successfully." -else - echo "Error: Runner_webapp package installation failed." - exit 1 -fi - -# Go back to the base directory -cd ../../ || { echo "Error: Failed to return to base directory."; exit 1; } - -# Build and move for admin_web_app -echo "Navigating to admin_web_app..." -cd admin_web_app/Source_webapp || { echo "Error: Failed to navigate to admin_web_app directory."; exit 1; } - -echo "Installing new packages for admin_web_app via npm..." -if npm install; then - echo "Packages for admin_web_app installed successfully." -else - echo "Error: Failed to install admin_web_app packages." - exit 1 -fi - -echo "Building admin_web_app..." -if npm run build; then - echo "admin_web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving admin_web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move admin_web_app files."; exit 1; } - echo "admin_web_app files moved successfully." -else - echo "Error: admin_web_app build failed." - exit 1 -fi - - -echo "Installing new packages for admin_web_app/Runner_webapp..." -cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } -if npm install; then - echo "Packages of Runner_webapp for admin_web_app installed successfully." -else - echo "Error: Runner_webapp package installation failed." - exit 1 -fi - -# Go back to the base directory -cd ../../ || { echo "Error: Failed to return to base directory."; exit 1; } - - -# Create systemd service files and enable/start them -create_service() { - local name=$1 - local description=$2 - local exec_start=$3 - local working_dir=$4 - local env_file=$5 - - local service_file="/etc/systemd/system/${name}.service" - - echo "Creating systemd service: $name" - - sudo bash -c "cat > $service_file" < /tmp/env_cleaned -source /tmp/env_cleaned -set +o allexport - - -# Restore MongoDB -MONGO_BACKUP_DIR="$RESTORE_DIR/mongo_backup" -if [ -d "$MONGO_BACKUP_DIR" ]; then - mongorestore --host "$MONGO_HOST" --port "$MONGO_PORT" \ - --username "$MONGO_USER" --password "$MONGO_PASSWORD" --authenticationDatabase "$MONGO_DATABASE_NAME" \ - --db "$MONGO_DATABASE_NAME" "$MONGO_BACKUP_DIR/fidesinnova" - - echo "βœ… MongoDB restore completed!" -else - echo "⚠️ No MongoDB backup found in the archive." -fi - -# Cleanup extracted MongoDB backup folder -rm -rf "$MONGO_BACKUP_DIR" - -echo "βœ… Restore process completed!" diff --git a/update.sh b/update.sh deleted file mode 100755 index 54a0b4e8..00000000 --- a/update.sh +++ /dev/null @@ -1,238 +0,0 @@ -#!/bin/bash - -echo "What do you want to update?" -echo "1) All" -echo "2) Admin Web App" -echo "3) Panel Web App" -echo "4) Backend" -read -p "Enter your choice (1/2/3/4): " choice - -case $choice in - 1) - echo "Updating all..." - # Navigate to the backend directory - cd backend || { echo "Error: Failed to navigate to backend directory."; exit 1; } - - echo "Installing new packages for backend via npm..." - if npm install; then - echo "Packages for backend installed successfully." - else - echo "Error: Failed to install backend packages." - exit 1 - fi - - echo "Building backend..." - if npm run build; then - echo "Backend build completed successfully." - else - echo "Error: Backend build failed." - exit 1 - fi - - # Go back to the base directory - cd ../ || { echo "Error: Failed to return to base directory."; exit 1; } - - # Build and move for web_app - echo "Navigating to web_app..." - cd web_app/Source_webapp || { echo "Error: Failed to navigate to web_app directory."; exit 1; } - - echo "Installing new packages for web_app via npm..." - if npm install; then - echo "Packages for web_app installed successfully." - else - echo "Error: Failed to install web_app packages." - exit 1 - fi - - echo "Building web_app..." - if npm run build; then - echo "web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move web_app files."; exit 1; } - echo "web_app files moved successfully." - else - echo "Error: web_app build failed." - exit 1 - fi - - - echo "Installing new packages for web_app/Runner_webapp..." - cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } - if npm install; then - echo "Packages of Runner_webapp for web_app installed successfully." - else - echo "Error: Runner_webapp package installation failed." - exit 1 - fi - - # Go back to the base directory - cd ../../ || { echo "Error: Failed to return to base directory."; exit 1; } - - # Build and move for admin_web_app - echo "Navigating to admin_web_app..." - cd admin_web_app/Source_webapp || { echo "Error: Failed to navigate to admin_web_app directory."; exit 1; } - - echo "Installing new packages for admin_web_app via npm..." - if npm install; then - echo "Packages for admin_web_app installed successfully." - else - echo "Error: Failed to install admin_web_app packages." - exit 1 - fi - - echo "Building admin_web_app..." - if npm run build; then - echo "admin_web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving admin_web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move admin_web_app files."; exit 1; } - echo "admin_web_app files moved successfully." - else - echo "Error: admin_web_app build failed." - exit 1 - fi - - - echo "Installing new packages for admin_web_app/Runner_webapp..." - cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } - if npm install; then - echo "Packages of Runner_webapp for admin_web_app installed successfully." - else - echo "Error: Runner_webapp package installation failed." - exit 1 - fi - - ;; - 2) - echo "Updating Admin Web App..." - # Navigate to admin_web_app/Source_webapp - cd admin_web_app/Source_webapp || { echo "Error: Failed to navigate to admin_web_app directory."; exit 1; } - echo "Removing node_modules for admin_web_app..." - rm -rf node_modules - echo "Installing new packages for admin_web_app via npm..." - if npm install; then - echo "Packages for admin_web_app installed successfully." - else - echo "Error: Failed to install admin_web_app packages." - exit 1 - fi - echo "Building admin_web_app..." - if npm run build; then - echo "admin_web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving admin_web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move admin_web_app files."; exit 1; } - echo "admin_web_app files moved successfully." - else - echo "Error: admin_web_app build failed." - exit 1 - fi - echo "Installing new packages for admin_web_app/Runner_webapp..." - cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } - if npm install; then - echo "Packages of Runner_webapp for admin_web_app installed successfully." - else - echo "Error: Runner_webapp package installation failed." - exit 1 - fi - ;; - 3) - echo "Updating Web App..." - # Navigate to web_app/Source_webapp - cd web_app/Source_webapp || { echo "Error: Failed to navigate to web_app directory."; exit 1; } - echo "Removing node_modules for web_app..." - rm -rf node_modules - echo "Installing new packages for web_app via npm..." - if npm install; then - echo "Packages for web_app installed successfully." - else - echo "Error: Failed to install web_app packages." - exit 1 - fi - echo "Building web_app..." - if npm run build; then - echo "web_app build completed successfully." - echo "Cleaning up Runner_webapp frontend folder..." - if [ ! -d "../Runner_webapp/frontend" ]; then - echo "Frontend folder does not exist. Creating it..." - mkdir "../Runner_webapp/frontend" - else - echo "Frontend folder exists. Cleaning it up..." - rm -rf "../Runner_webapp/frontend" - mkdir "../Runner_webapp/frontend" - fi - echo "Moving web_app files to Runner_webapp/frontend..." - mv build/* ../Runner_webapp/frontend/ || { echo "Error: Failed to move web_app files."; exit 1; } - echo "web_app files moved successfully." - else - echo "Error: web_app build failed." - exit 1 - fi - echo "Installing new packages for web_app/Runner_webapp..." - cd ../Runner_webapp || { echo "Error: Failed to navigate to Runner_webapp directory."; exit 1; } - if npm install; then - echo "Packages of Runner_webapp for web_app installed successfully." - else - echo "Error: Runner_webapp package installation failed." - exit 1 - fi - ;; - 4) - echo "Updating Backend..." - # Navigate to the backend directory - cd backend || { echo "Error: Failed to navigate to backend directory."; exit 1; } - echo "Removing node_modules for backend..." - rm -rf node_modules - echo "Installing new packages for backend via npm..." - if npm install; then - echo "Packages for backend installed successfully." - else - echo "Error: Failed to install backend packages." - exit 1 - fi - echo "Building backend..." - if npm run build; then - echo "Backend build completed successfully." - else - echo "Error: Backend build failed." - exit 1 - fi - ;; - *) - echo "Invalid choice. Exiting." - exit 1 - ;; -esac - - -# sudo systemctl restart fides.backend.service; -sudo pm2 restart all; -sudo systemctl restart fides.userwebapp.service; -sudo systemctl restart fides.adminwebapp.service; - -echo "Services restarted and Node updated successfully." diff --git a/web_app/Source_webapp/.eslintignore b/web_app/.eslintignore similarity index 100% rename from web_app/Source_webapp/.eslintignore rename to web_app/.eslintignore diff --git a/web_app/Source_webapp/.eslintrc.cjs b/web_app/.eslintrc.cjs similarity index 100% rename from web_app/Source_webapp/.eslintrc.cjs rename to web_app/.eslintrc.cjs diff --git a/web_app/Source_webapp/.gitignore b/web_app/.gitignore similarity index 100% rename from web_app/Source_webapp/.gitignore rename to web_app/.gitignore diff --git a/web_app/Source_webapp/.prettierignore b/web_app/.prettierignore similarity index 100% rename from web_app/Source_webapp/.prettierignore rename to web_app/.prettierignore diff --git a/web_app/Source_webapp/.prettierrc b/web_app/.prettierrc similarity index 100% rename from web_app/Source_webapp/.prettierrc rename to web_app/.prettierrc diff --git a/web_app/Dockerfile b/web_app/Dockerfile new file mode 100644 index 00000000..d2730aa1 --- /dev/null +++ b/web_app/Dockerfile @@ -0,0 +1,21 @@ + +FROM node:20-alpine AS builder +WORKDIR /usr/src/app + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN npm run build + + +FROM nginx:alpine AS runner + + +COPY --from=builder /usr/src/app/build /usr/share/nginx/html + + +COPY nginx.conf /etc/nginx/conf.d/default.conf + +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/web_app/Runner_webapp/.env b/web_app/Runner_webapp/.env deleted file mode 100644 index 5fed5898..00000000 --- a/web_app/Runner_webapp/.env +++ /dev/null @@ -1 +0,0 @@ -PORT=4000 diff --git a/web_app/Runner_webapp/main.js b/web_app/Runner_webapp/main.js deleted file mode 100644 index 5679074a..00000000 --- a/web_app/Runner_webapp/main.js +++ /dev/null @@ -1,30 +0,0 @@ -const express = require("express"); -require("dotenv").config(); - -const https = require("https"); -const fs = require("fs"); - -var key = fs.readFileSync("/etc/nginx/ssl/privkey.pem"); -var cert = fs.readFileSync("/etc/nginx/ssl/fullchain.pem"); -var options = { - key: key, - cert: cert, -}; - -const port = process.env.PORT; - -const app = express(); - -app.use(express.static(__dirname + "/frontend")); -app.use("/*", (req, res) => { - res.sendFile(__dirname + "/frontend/index.html"); -}); - -const httpsServer = https.createServer(options, app); - - -httpsServer.listen(port, () => { - console.log(`⚑️[server]: Server is running at http://localhost:${port}`); -}); - - diff --git a/web_app/Runner_webapp/package.json b/web_app/Runner_webapp/package.json deleted file mode 100644 index 9fe1bd4e..00000000 --- a/web_app/Runner_webapp/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "blocklychain_web_app", - "version": "1.0.0", - "description": "Blocklychain Web Application", - "main": "main.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "@types/express": "^4.17.17", - "@types/node": "^20.2.5", - "dotenv": "^16.1.4", - "express": "^4.18.2", - "i": "^0.3.7" - }, - "devDependencies": { - "eslint": "^8.42.0" - } -} diff --git a/web_app/Runner_webapp/tsconfig.json b/web_app/Runner_webapp/tsconfig.json deleted file mode 100644 index 9e7faec6..00000000 --- a/web_app/Runner_webapp/tsconfig.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - - /* Language and Environment */ - "target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - - /* Modules */ - "module": "commonjs" /* Specify what module code is generated. */, - // "rootDir": "./", /* Specify the root folder within your source files. */ - // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - // "types": [], /* Specify type package names to be included without being referenced in a source file. */ - // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ - // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ - // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ - // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ - // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ - // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ - // "resolveJsonModule": true, /* Enable importing .json files. */ - // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ - // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ - - /* JavaScript Support */ - // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ - // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ - // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - - /* Emit */ - // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ - // "declarationMap": true, /* Create sourcemaps for d.ts files. */ - // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ - // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ - // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ - "outDir": "./dist" /* Specify an output folder for all emitted files. */, - // "removeComments": true, /* Disable emitting comments. */ - // "noEmit": true, /* Disable emitting files from a compilation. */ - // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ - // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ - // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ - // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ - // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ - // "newLine": "crlf", /* Set the newline character for emitting files. */ - // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ - // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ - // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ - // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ - // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ - // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - - /* Interop Constraints */ - // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ - // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ - // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, - // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, - - /* Type Checking */ - "strict": true /* Enable all strict type-checking options. */, - // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ - // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ - // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ - // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ - // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ - // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ - // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ - // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ - // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ - // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ - // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ - // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ - // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ - // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ - // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ - // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ - // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ - - /* Completeness */ - // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ - } -} diff --git a/web_app/Source_webapp/src/mock/data/authData.ts b/web_app/Source_webapp/src/mock/data/authData.ts deleted file mode 100644 index 4b85a953..00000000 --- a/web_app/Source_webapp/src/mock/data/authData.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const signInUserData = [ - { - id: '21', - avatar: '/img/avatars/thumb-1.jpg', - email: 'FidesInnova@gmail.com', - authority: ['admin', 'user'], - password: '123Qwe', - accountUserName: 'admin', - }, -] diff --git a/web_app/Source_webapp/src/mock/fakeApi/index.ts b/web_app/Source_webapp/src/mock/fakeApi/index.ts deleted file mode 100644 index 98cc7cf0..00000000 --- a/web_app/Source_webapp/src/mock/fakeApi/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default as authFakeApi } from './authFakeApi' \ No newline at end of file diff --git a/web_app/Source_webapp/src/mock/index.ts b/web_app/Source_webapp/src/mock/index.ts deleted file mode 100644 index c4ebffcc..00000000 --- a/web_app/Source_webapp/src/mock/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { mockServer as default } from './mock' diff --git a/web_app/Source_webapp/src/mock/mock.ts b/web_app/Source_webapp/src/mock/mock.ts deleted file mode 100644 index c0d4234b..00000000 --- a/web_app/Source_webapp/src/mock/mock.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { createServer } from 'miragejs' -import appConfig from '@/configs/app.config' - -import { signInUserData } from './data/authData' - -import { authFakeApi } from './fakeApi' - -const { apiPrefix } = appConfig - -export function mockServer({ environment = 'test' }) { - return createServer({ - environment, - seeds(server) { - server.db.loadData({ - signInUserData, - }) - }, - routes() { - this.urlPrefix = '' - this.namespace = '' - this.passthrough((request) => { - const isExternal = request.url.startsWith('http') - return isExternal - }) - this.passthrough() - - authFakeApi(this, apiPrefix) - }, - }) -} diff --git a/web_app/Source_webapp/index.html b/web_app/index.html similarity index 100% rename from web_app/Source_webapp/index.html rename to web_app/index.html diff --git a/web_app/nginx.conf b/web_app/nginx.conf new file mode 100644 index 00000000..e48fc65c --- /dev/null +++ b/web_app/nginx.conf @@ -0,0 +1,36 @@ +server { + listen 80; + listen [::]:80; + + root /usr/share/nginx/html; + index index.html; + + # Gzip compression + gzip on; + gzip_vary on; + gzip_min_length 1024; + gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/javascript application/json; + + # SPA routing - serve index.html for all routes + location / { + try_files $uri $uri/ /index.html; + } + + # Proxy API requests to backend + location /app { + proxy_pass http://backend:6000; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Authorization $http_authorization; + proxy_pass_header Authorization; + } + + # Cache static assets + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +} \ No newline at end of file diff --git a/web_app/Source_webapp/package.json b/web_app/package.json similarity index 100% rename from web_app/Source_webapp/package.json rename to web_app/package.json diff --git a/web_app/Source_webapp/postcss.config.cjs b/web_app/postcss.config.cjs similarity index 100% rename from web_app/Source_webapp/postcss.config.cjs rename to web_app/postcss.config.cjs diff --git a/web_app/Source_webapp/public/New folder/logo192.png b/web_app/public/New folder/logo192.png similarity index 100% rename from web_app/Source_webapp/public/New folder/logo192.png rename to web_app/public/New folder/logo192.png diff --git a/web_app/Source_webapp/public/New folder/logo512.png b/web_app/public/New folder/logo512.png similarity index 100% rename from web_app/Source_webapp/public/New folder/logo512.png rename to web_app/public/New folder/logo512.png diff --git a/web_app/Source_webapp/public/data/features.json b/web_app/public/data/features.json similarity index 100% rename from web_app/Source_webapp/public/data/features.json rename to web_app/public/data/features.json diff --git a/web_app/Source_webapp/public/data/order-list.csv b/web_app/public/data/order-list.csv similarity index 100% rename from web_app/Source_webapp/public/data/order-list.csv rename to web_app/public/data/order-list.csv diff --git a/web_app/Source_webapp/public/data/product-list.csv b/web_app/public/data/product-list.csv similarity index 100% rename from web_app/Source_webapp/public/data/product-list.csv rename to web_app/public/data/product-list.csv diff --git a/web_app/Source_webapp/public/data/unemployment-by-county-2017.csv b/web_app/public/data/unemployment-by-county-2017.csv similarity index 100% rename from web_app/Source_webapp/public/data/unemployment-by-county-2017.csv rename to web_app/public/data/unemployment-by-county-2017.csv diff --git a/web_app/Source_webapp/public/favicon.ico b/web_app/public/favicon.ico similarity index 100% rename from web_app/Source_webapp/public/favicon.ico rename to web_app/public/favicon.ico diff --git a/web_app/Source_webapp/public/img/avatars/thumb-1.jpg b/web_app/public/img/avatars/thumb-1.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-1.jpg rename to web_app/public/img/avatars/thumb-1.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-10.jpg b/web_app/public/img/avatars/thumb-10.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-10.jpg rename to web_app/public/img/avatars/thumb-10.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-11.jpg b/web_app/public/img/avatars/thumb-11.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-11.jpg rename to web_app/public/img/avatars/thumb-11.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-12.jpg b/web_app/public/img/avatars/thumb-12.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-12.jpg rename to web_app/public/img/avatars/thumb-12.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-13.jpg b/web_app/public/img/avatars/thumb-13.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-13.jpg rename to web_app/public/img/avatars/thumb-13.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-14.jpg b/web_app/public/img/avatars/thumb-14.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-14.jpg rename to web_app/public/img/avatars/thumb-14.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-15.jpg b/web_app/public/img/avatars/thumb-15.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-15.jpg rename to web_app/public/img/avatars/thumb-15.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-16.jpg b/web_app/public/img/avatars/thumb-16.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-16.jpg rename to web_app/public/img/avatars/thumb-16.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-2.jpg b/web_app/public/img/avatars/thumb-2.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-2.jpg rename to web_app/public/img/avatars/thumb-2.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-3.jpg b/web_app/public/img/avatars/thumb-3.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-3.jpg rename to web_app/public/img/avatars/thumb-3.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-4.jpg b/web_app/public/img/avatars/thumb-4.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-4.jpg rename to web_app/public/img/avatars/thumb-4.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-5.jpg b/web_app/public/img/avatars/thumb-5.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-5.jpg rename to web_app/public/img/avatars/thumb-5.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-6.jpg b/web_app/public/img/avatars/thumb-6.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-6.jpg rename to web_app/public/img/avatars/thumb-6.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-7.jpg b/web_app/public/img/avatars/thumb-7.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-7.jpg rename to web_app/public/img/avatars/thumb-7.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-8.jpg b/web_app/public/img/avatars/thumb-8.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-8.jpg rename to web_app/public/img/avatars/thumb-8.jpg diff --git a/web_app/Source_webapp/public/img/avatars/thumb-9.jpg b/web_app/public/img/avatars/thumb-9.jpg similarity index 100% rename from web_app/Source_webapp/public/img/avatars/thumb-9.jpg rename to web_app/public/img/avatars/thumb-9.jpg diff --git a/web_app/Source_webapp/public/img/blockly/devices.jpg b/web_app/public/img/blockly/devices.jpg similarity index 100% rename from web_app/Source_webapp/public/img/blockly/devices.jpg rename to web_app/public/img/blockly/devices.jpg diff --git a/web_app/Source_webapp/public/img/blockly/email.jpg b/web_app/public/img/blockly/email.jpg similarity index 100% rename from web_app/Source_webapp/public/img/blockly/email.jpg rename to web_app/public/img/blockly/email.jpg diff --git a/web_app/Source_webapp/public/img/blockly/notif.jpg b/web_app/public/img/blockly/notif.jpg similarity index 100% rename from web_app/Source_webapp/public/img/blockly/notif.jpg rename to web_app/public/img/blockly/notif.jpg diff --git a/web_app/Source_webapp/public/img/building/floor-background.png b/web_app/public/img/building/floor-background.png similarity index 100% rename from web_app/Source_webapp/public/img/building/floor-background.png rename to web_app/public/img/building/floor-background.png diff --git a/web_app/Source_webapp/public/img/building/floor-door-low-opacity.png b/web_app/public/img/building/floor-door-low-opacity.png similarity index 100% rename from web_app/Source_webapp/public/img/building/floor-door-low-opacity.png rename to web_app/public/img/building/floor-door-low-opacity.png diff --git a/web_app/Source_webapp/public/img/building/floor-door-opacity.png b/web_app/public/img/building/floor-door-opacity.png similarity index 100% rename from web_app/Source_webapp/public/img/building/floor-door-opacity.png rename to web_app/public/img/building/floor-door-opacity.png diff --git a/web_app/Source_webapp/public/img/building/floor-plus-icon.png b/web_app/public/img/building/floor-plus-icon.png similarity index 100% rename from web_app/Source_webapp/public/img/building/floor-plus-icon.png rename to web_app/public/img/building/floor-plus-icon.png diff --git a/web_app/Source_webapp/public/img/building/middle1.png b/web_app/public/img/building/middle1.png similarity index 100% rename from web_app/Source_webapp/public/img/building/middle1.png rename to web_app/public/img/building/middle1.png diff --git a/web_app/Source_webapp/public/img/building/middle2.png b/web_app/public/img/building/middle2.png similarity index 100% rename from web_app/Source_webapp/public/img/building/middle2.png rename to web_app/public/img/building/middle2.png diff --git a/web_app/Source_webapp/public/img/building/pilot.png b/web_app/public/img/building/pilot.png similarity index 100% rename from web_app/Source_webapp/public/img/building/pilot.png rename to web_app/public/img/building/pilot.png diff --git a/web_app/Source_webapp/public/img/building/roof.png b/web_app/public/img/building/roof.png similarity index 100% rename from web_app/Source_webapp/public/img/building/roof.png rename to web_app/public/img/building/roof.png diff --git a/web_app/Source_webapp/public/img/building/trash.png b/web_app/public/img/building/trash.png similarity index 100% rename from web_app/Source_webapp/public/img/building/trash.png rename to web_app/public/img/building/trash.png diff --git a/web_app/Source_webapp/public/img/countries/ar.png b/web_app/public/img/countries/ar.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/ar.png rename to web_app/public/img/countries/ar.png diff --git a/web_app/Source_webapp/public/img/countries/cn.png b/web_app/public/img/countries/cn.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/cn.png rename to web_app/public/img/countries/cn.png diff --git a/web_app/Source_webapp/public/img/countries/fr.png b/web_app/public/img/countries/fr.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/fr.png rename to web_app/public/img/countries/fr.png diff --git a/web_app/Source_webapp/public/img/countries/ir.png b/web_app/public/img/countries/ir.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/ir.png rename to web_app/public/img/countries/ir.png diff --git a/web_app/Source_webapp/public/img/countries/jp.png b/web_app/public/img/countries/jp.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/jp.png rename to web_app/public/img/countries/jp.png diff --git a/web_app/Source_webapp/public/img/countries/sp.png b/web_app/public/img/countries/sp.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/sp.png rename to web_app/public/img/countries/sp.png diff --git a/web_app/Source_webapp/public/img/countries/us.png b/web_app/public/img/countries/us.png similarity index 100% rename from web_app/Source_webapp/public/img/countries/us.png rename to web_app/public/img/countries/us.png diff --git a/web_app/Source_webapp/public/img/logo/logo-captcha.png b/web_app/public/img/logo/logo-captcha.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/logo-captcha.png rename to web_app/public/img/logo/logo-captcha.png diff --git a/web_app/Source_webapp/public/img/logo/logo-dark-full.png b/web_app/public/img/logo/logo-dark-full.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/logo-dark-full.png rename to web_app/public/img/logo/logo-dark-full.png diff --git a/web_app/Source_webapp/public/img/logo/logo-dark-streamline.png b/web_app/public/img/logo/logo-dark-streamline.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/logo-dark-streamline.png rename to web_app/public/img/logo/logo-dark-streamline.png diff --git a/web_app/Source_webapp/public/img/logo/logo-light-full.png b/web_app/public/img/logo/logo-light-full.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/logo-light-full.png rename to web_app/public/img/logo/logo-light-full.png diff --git a/web_app/Source_webapp/public/img/logo/logo-light-streamline.png b/web_app/public/img/logo/logo-light-streamline.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/logo-light-streamline.png rename to web_app/public/img/logo/logo-light-streamline.png diff --git a/web_app/Source_webapp/public/img/logo/old-logo-dark-full.png b/web_app/public/img/logo/old-logo-dark-full.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/old-logo-dark-full.png rename to web_app/public/img/logo/old-logo-dark-full.png diff --git a/web_app/Source_webapp/public/img/logo/old-logo-dark-streamline.png b/web_app/public/img/logo/old-logo-dark-streamline.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/old-logo-dark-streamline.png rename to web_app/public/img/logo/old-logo-dark-streamline.png diff --git a/web_app/Source_webapp/public/img/logo/old-logo-light-full.png b/web_app/public/img/logo/old-logo-light-full.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/old-logo-light-full.png rename to web_app/public/img/logo/old-logo-light-full.png diff --git a/web_app/Source_webapp/public/img/logo/old-logo-light-streamline.png b/web_app/public/img/logo/old-logo-light-streamline.png similarity index 100% rename from web_app/Source_webapp/public/img/logo/old-logo-light-streamline.png rename to web_app/public/img/logo/old-logo-light-streamline.png diff --git a/web_app/Source_webapp/public/img/others/auth-cover-bg.jpg b/web_app/public/img/others/auth-cover-bg.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/auth-cover-bg.jpg rename to web_app/public/img/others/auth-cover-bg.jpg diff --git a/web_app/Source_webapp/public/img/others/auth-side-bg.jpg b/web_app/public/img/others/auth-side-bg.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/auth-side-bg.jpg rename to web_app/public/img/others/auth-side-bg.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/blank-dark.jpg b/web_app/public/img/others/docs/blank-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/blank-dark.jpg rename to web_app/public/img/others/docs/blank-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/blank.jpg b/web_app/public/img/others/docs/blank.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/blank.jpg rename to web_app/public/img/others/docs/blank.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/classic-dark.jpg b/web_app/public/img/others/docs/classic-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/classic-dark.jpg rename to web_app/public/img/others/docs/classic-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/classic.jpg b/web_app/public/img/others/docs/classic.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/classic.jpg rename to web_app/public/img/others/docs/classic.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/decked-dark.jpg b/web_app/public/img/others/docs/decked-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/decked-dark.jpg rename to web_app/public/img/others/docs/decked-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/decked.jpg b/web_app/public/img/others/docs/decked.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/decked.jpg rename to web_app/public/img/others/docs/decked.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/modern-dark.jpg b/web_app/public/img/others/docs/modern-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/modern-dark.jpg rename to web_app/public/img/others/docs/modern-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/modern.jpg b/web_app/public/img/others/docs/modern.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/modern.jpg rename to web_app/public/img/others/docs/modern.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/simple-dark.jpg b/web_app/public/img/others/docs/simple-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/simple-dark.jpg rename to web_app/public/img/others/docs/simple-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/simple.jpg b/web_app/public/img/others/docs/simple.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/simple.jpg rename to web_app/public/img/others/docs/simple.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/stackedSide-dark.jpg b/web_app/public/img/others/docs/stackedSide-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/stackedSide-dark.jpg rename to web_app/public/img/others/docs/stackedSide-dark.jpg diff --git a/web_app/Source_webapp/public/img/others/docs/stackedSide.jpg b/web_app/public/img/others/docs/stackedSide.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/docs/stackedSide.jpg rename to web_app/public/img/others/docs/stackedSide.jpg diff --git a/web_app/Source_webapp/public/img/others/img-1.jpg b/web_app/public/img/others/img-1.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-1.jpg rename to web_app/public/img/others/img-1.jpg diff --git a/web_app/Source_webapp/public/img/others/img-10.png b/web_app/public/img/others/img-10.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-10.png rename to web_app/public/img/others/img-10.png diff --git a/web_app/Source_webapp/public/img/others/img-11.jpg b/web_app/public/img/others/img-11.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-11.jpg rename to web_app/public/img/others/img-11.jpg diff --git a/web_app/Source_webapp/public/img/others/img-13.jpg b/web_app/public/img/others/img-13.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-13.jpg rename to web_app/public/img/others/img-13.jpg diff --git a/web_app/Source_webapp/public/img/others/img-14.jpg b/web_app/public/img/others/img-14.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-14.jpg rename to web_app/public/img/others/img-14.jpg diff --git a/web_app/Source_webapp/public/img/others/img-15.jpg b/web_app/public/img/others/img-15.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-15.jpg rename to web_app/public/img/others/img-15.jpg diff --git a/web_app/Source_webapp/public/img/others/img-16.jpg b/web_app/public/img/others/img-16.jpg similarity index 100% rename from web_app/Source_webapp/public/img/others/img-16.jpg rename to web_app/public/img/others/img-16.jpg diff --git a/web_app/Source_webapp/public/img/others/img-17.png b/web_app/public/img/others/img-17.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-17.png rename to web_app/public/img/others/img-17.png diff --git a/web_app/Source_webapp/public/img/others/img-2-dark.png b/web_app/public/img/others/img-2-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-2-dark.png rename to web_app/public/img/others/img-2-dark.png diff --git a/web_app/Source_webapp/public/img/others/img-2.png b/web_app/public/img/others/img-2.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-2.png rename to web_app/public/img/others/img-2.png diff --git a/web_app/Source_webapp/public/img/others/img-8.png b/web_app/public/img/others/img-8.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-8.png rename to web_app/public/img/others/img-8.png diff --git a/web_app/Source_webapp/public/img/others/img-9.png b/web_app/public/img/others/img-9.png similarity index 100% rename from web_app/Source_webapp/public/img/others/img-9.png rename to web_app/public/img/others/img-9.png diff --git a/web_app/Source_webapp/public/img/others/medal.png b/web_app/public/img/others/medal.png similarity index 100% rename from web_app/Source_webapp/public/img/others/medal.png rename to web_app/public/img/others/medal.png diff --git a/web_app/Source_webapp/public/img/others/medal/bronze.png b/web_app/public/img/others/medal/bronze.png similarity index 100% rename from web_app/Source_webapp/public/img/others/medal/bronze.png rename to web_app/public/img/others/medal/bronze.png diff --git a/web_app/Source_webapp/public/img/others/medal/gold.png b/web_app/public/img/others/medal/gold.png similarity index 100% rename from web_app/Source_webapp/public/img/others/medal/gold.png rename to web_app/public/img/others/medal/gold.png diff --git a/web_app/Source_webapp/public/img/others/medal/silver.png b/web_app/public/img/others/medal/silver.png similarity index 100% rename from web_app/Source_webapp/public/img/others/medal/silver.png rename to web_app/public/img/others/medal/silver.png diff --git a/web_app/Source_webapp/public/img/others/no-mail-selected-dark.png b/web_app/public/img/others/no-mail-selected-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/others/no-mail-selected-dark.png rename to web_app/public/img/others/no-mail-selected-dark.png diff --git a/web_app/Source_webapp/public/img/others/no-mail-selected.png b/web_app/public/img/others/no-mail-selected.png similarity index 100% rename from web_app/Source_webapp/public/img/others/no-mail-selected.png rename to web_app/public/img/others/no-mail-selected.png diff --git a/web_app/Source_webapp/public/img/others/no-notification.png b/web_app/public/img/others/no-notification.png similarity index 100% rename from web_app/Source_webapp/public/img/others/no-notification.png rename to web_app/public/img/others/no-notification.png diff --git a/web_app/Source_webapp/public/img/others/pending-approval-dark.png b/web_app/public/img/others/pending-approval-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/others/pending-approval-dark.png rename to web_app/public/img/others/pending-approval-dark.png diff --git a/web_app/Source_webapp/public/img/others/pending-approval.png b/web_app/public/img/others/pending-approval.png similarity index 100% rename from web_app/Source_webapp/public/img/others/pending-approval.png rename to web_app/public/img/others/pending-approval.png diff --git a/web_app/Source_webapp/public/img/others/success.png b/web_app/public/img/others/success.png similarity index 100% rename from web_app/Source_webapp/public/img/others/success.png rename to web_app/public/img/others/success.png diff --git a/web_app/Source_webapp/public/img/others/upload-dark.png b/web_app/public/img/others/upload-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/others/upload-dark.png rename to web_app/public/img/others/upload-dark.png diff --git a/web_app/Source_webapp/public/img/others/upload.png b/web_app/public/img/others/upload.png similarity index 100% rename from web_app/Source_webapp/public/img/others/upload.png rename to web_app/public/img/others/upload.png diff --git a/web_app/Source_webapp/public/img/others/welcome-dark.png b/web_app/public/img/others/welcome-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/others/welcome-dark.png rename to web_app/public/img/others/welcome-dark.png diff --git a/web_app/Source_webapp/public/img/others/welcome.png b/web_app/public/img/others/welcome.png similarity index 100% rename from web_app/Source_webapp/public/img/others/welcome.png rename to web_app/public/img/others/welcome.png diff --git a/web_app/Source_webapp/public/img/products/product-1-2.jpg b/web_app/public/img/products/product-1-2.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-1-2.jpg rename to web_app/public/img/products/product-1-2.jpg diff --git a/web_app/Source_webapp/public/img/products/product-1-3.jpg b/web_app/public/img/products/product-1-3.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-1-3.jpg rename to web_app/public/img/products/product-1-3.jpg diff --git a/web_app/Source_webapp/public/img/products/product-1-4.jpg b/web_app/public/img/products/product-1-4.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-1-4.jpg rename to web_app/public/img/products/product-1-4.jpg diff --git a/web_app/Source_webapp/public/img/products/product-1.jpg b/web_app/public/img/products/product-1.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-1.jpg rename to web_app/public/img/products/product-1.jpg diff --git a/web_app/Source_webapp/public/img/products/product-10.jpg b/web_app/public/img/products/product-10.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-10.jpg rename to web_app/public/img/products/product-10.jpg diff --git a/web_app/Source_webapp/public/img/products/product-11.jpg b/web_app/public/img/products/product-11.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-11.jpg rename to web_app/public/img/products/product-11.jpg diff --git a/web_app/Source_webapp/public/img/products/product-12.jpg b/web_app/public/img/products/product-12.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-12.jpg rename to web_app/public/img/products/product-12.jpg diff --git a/web_app/Source_webapp/public/img/products/product-2-2.jpg b/web_app/public/img/products/product-2-2.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-2-2.jpg rename to web_app/public/img/products/product-2-2.jpg diff --git a/web_app/Source_webapp/public/img/products/product-2.jpg b/web_app/public/img/products/product-2.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-2.jpg rename to web_app/public/img/products/product-2.jpg diff --git a/web_app/Source_webapp/public/img/products/product-3.jpg b/web_app/public/img/products/product-3.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-3.jpg rename to web_app/public/img/products/product-3.jpg diff --git a/web_app/Source_webapp/public/img/products/product-4.jpg b/web_app/public/img/products/product-4.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-4.jpg rename to web_app/public/img/products/product-4.jpg diff --git a/web_app/Source_webapp/public/img/products/product-5.jpg b/web_app/public/img/products/product-5.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-5.jpg rename to web_app/public/img/products/product-5.jpg diff --git a/web_app/Source_webapp/public/img/products/product-6.jpg b/web_app/public/img/products/product-6.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-6.jpg rename to web_app/public/img/products/product-6.jpg diff --git a/web_app/Source_webapp/public/img/products/product-7.jpg b/web_app/public/img/products/product-7.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-7.jpg rename to web_app/public/img/products/product-7.jpg diff --git a/web_app/Source_webapp/public/img/products/product-8.jpg b/web_app/public/img/products/product-8.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-8.jpg rename to web_app/public/img/products/product-8.jpg diff --git a/web_app/Source_webapp/public/img/products/product-9.jpg b/web_app/public/img/products/product-9.jpg similarity index 100% rename from web_app/Source_webapp/public/img/products/product-9.jpg rename to web_app/public/img/products/product-9.jpg diff --git a/web_app/Source_webapp/public/img/stores/appstore-button.png b/web_app/public/img/stores/appstore-button.png similarity index 100% rename from web_app/Source_webapp/public/img/stores/appstore-button.png rename to web_app/public/img/stores/appstore-button.png diff --git a/web_app/Source_webapp/public/img/stores/gplay-button.png b/web_app/public/img/stores/gplay-button.png similarity index 100% rename from web_app/Source_webapp/public/img/stores/gplay-button.png rename to web_app/public/img/stores/gplay-button.png diff --git a/web_app/Source_webapp/public/img/thumbs/adobe-xd.png b/web_app/public/img/thumbs/adobe-xd.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/adobe-xd.png rename to web_app/public/img/thumbs/adobe-xd.png diff --git a/web_app/Source_webapp/public/img/thumbs/avalanche.png b/web_app/public/img/thumbs/avalanche.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/avalanche.png rename to web_app/public/img/thumbs/avalanche.png diff --git a/web_app/Source_webapp/public/img/thumbs/bitcoin-cash.png b/web_app/public/img/thumbs/bitcoin-cash.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/bitcoin-cash.png rename to web_app/public/img/thumbs/bitcoin-cash.png diff --git a/web_app/Source_webapp/public/img/thumbs/bitcoin-sv.png b/web_app/public/img/thumbs/bitcoin-sv.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/bitcoin-sv.png rename to web_app/public/img/thumbs/bitcoin-sv.png diff --git a/web_app/Source_webapp/public/img/thumbs/bitcoin.png b/web_app/public/img/thumbs/bitcoin.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/bitcoin.png rename to web_app/public/img/thumbs/bitcoin.png diff --git a/web_app/Source_webapp/public/img/thumbs/cardano.png b/web_app/public/img/thumbs/cardano.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/cardano.png rename to web_app/public/img/thumbs/cardano.png diff --git a/web_app/Source_webapp/public/img/thumbs/chainlink.png b/web_app/public/img/thumbs/chainlink.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/chainlink.png rename to web_app/public/img/thumbs/chainlink.png diff --git a/web_app/Source_webapp/public/img/thumbs/doge.png b/web_app/public/img/thumbs/doge.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/doge.png rename to web_app/public/img/thumbs/doge.png diff --git a/web_app/Source_webapp/public/img/thumbs/drivers-license-back-dark.png b/web_app/public/img/thumbs/drivers-license-back-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/drivers-license-back-dark.png rename to web_app/public/img/thumbs/drivers-license-back-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/drivers-license-back.png b/web_app/public/img/thumbs/drivers-license-back.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/drivers-license-back.png rename to web_app/public/img/thumbs/drivers-license-back.png diff --git a/web_app/Source_webapp/public/img/thumbs/drivers-license-front-dark.png b/web_app/public/img/thumbs/drivers-license-front-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/drivers-license-front-dark.png rename to web_app/public/img/thumbs/drivers-license-front-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/drivers-license-front.png b/web_app/public/img/thumbs/drivers-license-front.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/drivers-license-front.png rename to web_app/public/img/thumbs/drivers-license-front.png diff --git a/web_app/Source_webapp/public/img/thumbs/dropbox.png b/web_app/public/img/thumbs/dropbox.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/dropbox.png rename to web_app/public/img/thumbs/dropbox.png diff --git a/web_app/Source_webapp/public/img/thumbs/eos.png b/web_app/public/img/thumbs/eos.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/eos.png rename to web_app/public/img/thumbs/eos.png diff --git a/web_app/Source_webapp/public/img/thumbs/ethereum.png b/web_app/public/img/thumbs/ethereum.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/ethereum.png rename to web_app/public/img/thumbs/ethereum.png diff --git a/web_app/Source_webapp/public/img/thumbs/figma.png b/web_app/public/img/thumbs/figma.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/figma.png rename to web_app/public/img/thumbs/figma.png diff --git a/web_app/Source_webapp/public/img/thumbs/github.png b/web_app/public/img/thumbs/github.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/github.png rename to web_app/public/img/thumbs/github.png diff --git a/web_app/Source_webapp/public/img/thumbs/gitlab.png b/web_app/public/img/thumbs/gitlab.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/gitlab.png rename to web_app/public/img/thumbs/gitlab.png diff --git a/web_app/Source_webapp/public/img/thumbs/google-drive.png b/web_app/public/img/thumbs/google-drive.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/google-drive.png rename to web_app/public/img/thumbs/google-drive.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-0-dark.png b/web_app/public/img/thumbs/help-center-category-0-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-0-dark.png rename to web_app/public/img/thumbs/help-center-category-0-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-0.png b/web_app/public/img/thumbs/help-center-category-0.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-0.png rename to web_app/public/img/thumbs/help-center-category-0.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-1-dark.png b/web_app/public/img/thumbs/help-center-category-1-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-1-dark.png rename to web_app/public/img/thumbs/help-center-category-1-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-1.png b/web_app/public/img/thumbs/help-center-category-1.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-1.png rename to web_app/public/img/thumbs/help-center-category-1.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-2-dark.png b/web_app/public/img/thumbs/help-center-category-2-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-2-dark.png rename to web_app/public/img/thumbs/help-center-category-2-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-2.png b/web_app/public/img/thumbs/help-center-category-2.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-2.png rename to web_app/public/img/thumbs/help-center-category-2.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-3-dark.png b/web_app/public/img/thumbs/help-center-category-3-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-3-dark.png rename to web_app/public/img/thumbs/help-center-category-3-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-3.png b/web_app/public/img/thumbs/help-center-category-3.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-3.png rename to web_app/public/img/thumbs/help-center-category-3.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-4-dark.png b/web_app/public/img/thumbs/help-center-category-4-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-4-dark.png rename to web_app/public/img/thumbs/help-center-category-4-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-4.png b/web_app/public/img/thumbs/help-center-category-4.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-4.png rename to web_app/public/img/thumbs/help-center-category-4.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-5-dark.png b/web_app/public/img/thumbs/help-center-category-5-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-5-dark.png rename to web_app/public/img/thumbs/help-center-category-5-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-5.png b/web_app/public/img/thumbs/help-center-category-5.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-5.png rename to web_app/public/img/thumbs/help-center-category-5.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-6-dark.png b/web_app/public/img/thumbs/help-center-category-6-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-6-dark.png rename to web_app/public/img/thumbs/help-center-category-6-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-6.png b/web_app/public/img/thumbs/help-center-category-6.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-6.png rename to web_app/public/img/thumbs/help-center-category-6.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-7-dark.png b/web_app/public/img/thumbs/help-center-category-7-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-7-dark.png rename to web_app/public/img/thumbs/help-center-category-7-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/help-center-category-7.png b/web_app/public/img/thumbs/help-center-category-7.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/help-center-category-7.png rename to web_app/public/img/thumbs/help-center-category-7.png diff --git a/web_app/Source_webapp/public/img/thumbs/hubspot.png b/web_app/public/img/thumbs/hubspot.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/hubspot.png rename to web_app/public/img/thumbs/hubspot.png diff --git a/web_app/Source_webapp/public/img/thumbs/id-card-back-dark.png b/web_app/public/img/thumbs/id-card-back-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/id-card-back-dark.png rename to web_app/public/img/thumbs/id-card-back-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/id-card-back.png b/web_app/public/img/thumbs/id-card-back.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/id-card-back.png rename to web_app/public/img/thumbs/id-card-back.png diff --git a/web_app/Source_webapp/public/img/thumbs/id-card-front-dark.png b/web_app/public/img/thumbs/id-card-front-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/id-card-front-dark.png rename to web_app/public/img/thumbs/id-card-front-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/id-card-front.png b/web_app/public/img/thumbs/id-card-front.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/id-card-front.png rename to web_app/public/img/thumbs/id-card-front.png diff --git a/web_app/Source_webapp/public/img/thumbs/jira.png b/web_app/public/img/thumbs/jira.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/jira.png rename to web_app/public/img/thumbs/jira.png diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/blank-dark.jpg b/web_app/public/img/thumbs/layouts/blank-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/blank-dark.jpg rename to web_app/public/img/thumbs/layouts/blank-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/blank.jpg b/web_app/public/img/thumbs/layouts/blank.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/blank.jpg rename to web_app/public/img/thumbs/layouts/blank.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/classic-dark.jpg b/web_app/public/img/thumbs/layouts/classic-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/classic-dark.jpg rename to web_app/public/img/thumbs/layouts/classic-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/classic.jpg b/web_app/public/img/thumbs/layouts/classic.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/classic.jpg rename to web_app/public/img/thumbs/layouts/classic.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/decked-dark.jpg b/web_app/public/img/thumbs/layouts/decked-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/decked-dark.jpg rename to web_app/public/img/thumbs/layouts/decked-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/decked.jpg b/web_app/public/img/thumbs/layouts/decked.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/decked.jpg rename to web_app/public/img/thumbs/layouts/decked.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/modern-dark.jpg b/web_app/public/img/thumbs/layouts/modern-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/modern-dark.jpg rename to web_app/public/img/thumbs/layouts/modern-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/modern.jpg b/web_app/public/img/thumbs/layouts/modern.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/modern.jpg rename to web_app/public/img/thumbs/layouts/modern.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/simple-dark.jpg b/web_app/public/img/thumbs/layouts/simple-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/simple-dark.jpg rename to web_app/public/img/thumbs/layouts/simple-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/simple.jpg b/web_app/public/img/thumbs/layouts/simple.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/simple.jpg rename to web_app/public/img/thumbs/layouts/simple.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/stackedSide-dark.jpg b/web_app/public/img/thumbs/layouts/stackedSide-dark.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/stackedSide-dark.jpg rename to web_app/public/img/thumbs/layouts/stackedSide-dark.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/layouts/stackedSide.jpg b/web_app/public/img/thumbs/layouts/stackedSide.jpg similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/layouts/stackedSide.jpg rename to web_app/public/img/thumbs/layouts/stackedSide.jpg diff --git a/web_app/Source_webapp/public/img/thumbs/litecoin.png b/web_app/public/img/thumbs/litecoin.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/litecoin.png rename to web_app/public/img/thumbs/litecoin.png diff --git a/web_app/Source_webapp/public/img/thumbs/miota.png b/web_app/public/img/thumbs/miota.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/miota.png rename to web_app/public/img/thumbs/miota.png diff --git a/web_app/Source_webapp/public/img/thumbs/monero.png b/web_app/public/img/thumbs/monero.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/monero.png rename to web_app/public/img/thumbs/monero.png diff --git a/web_app/Source_webapp/public/img/thumbs/notion.png b/web_app/public/img/thumbs/notion.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/notion.png rename to web_app/public/img/thumbs/notion.png diff --git a/web_app/Source_webapp/public/img/thumbs/passport-dark.png b/web_app/public/img/thumbs/passport-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/passport-dark.png rename to web_app/public/img/thumbs/passport-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/passport-data-dark.png b/web_app/public/img/thumbs/passport-data-dark.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/passport-data-dark.png rename to web_app/public/img/thumbs/passport-data-dark.png diff --git a/web_app/Source_webapp/public/img/thumbs/passport-data.png b/web_app/public/img/thumbs/passport-data.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/passport-data.png rename to web_app/public/img/thumbs/passport-data.png diff --git a/web_app/Source_webapp/public/img/thumbs/passport.png b/web_app/public/img/thumbs/passport.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/passport.png rename to web_app/public/img/thumbs/passport.png diff --git a/web_app/Source_webapp/public/img/thumbs/polkadot.png b/web_app/public/img/thumbs/polkadot.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/polkadot.png rename to web_app/public/img/thumbs/polkadot.png diff --git a/web_app/Source_webapp/public/img/thumbs/polygon.png b/web_app/public/img/thumbs/polygon.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/polygon.png rename to web_app/public/img/thumbs/polygon.png diff --git a/web_app/Source_webapp/public/img/thumbs/ripple.png b/web_app/public/img/thumbs/ripple.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/ripple.png rename to web_app/public/img/thumbs/ripple.png diff --git a/web_app/Source_webapp/public/img/thumbs/saleforce-crm.png b/web_app/public/img/thumbs/saleforce-crm.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/saleforce-crm.png rename to web_app/public/img/thumbs/saleforce-crm.png diff --git a/web_app/Source_webapp/public/img/thumbs/shiba-inu.png b/web_app/public/img/thumbs/shiba-inu.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/shiba-inu.png rename to web_app/public/img/thumbs/shiba-inu.png diff --git a/web_app/Source_webapp/public/img/thumbs/sketch.png b/web_app/public/img/thumbs/sketch.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/sketch.png rename to web_app/public/img/thumbs/sketch.png diff --git a/web_app/Source_webapp/public/img/thumbs/slack.png b/web_app/public/img/thumbs/slack.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/slack.png rename to web_app/public/img/thumbs/slack.png diff --git a/web_app/Source_webapp/public/img/thumbs/solana.png b/web_app/public/img/thumbs/solana.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/solana.png rename to web_app/public/img/thumbs/solana.png diff --git a/web_app/Source_webapp/public/img/thumbs/stellar-lumens.png b/web_app/public/img/thumbs/stellar-lumens.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/stellar-lumens.png rename to web_app/public/img/thumbs/stellar-lumens.png diff --git a/web_app/Source_webapp/public/img/thumbs/tether-us.png b/web_app/public/img/thumbs/tether-us.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/tether-us.png rename to web_app/public/img/thumbs/tether-us.png diff --git a/web_app/Source_webapp/public/img/thumbs/tron.png b/web_app/public/img/thumbs/tron.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/tron.png rename to web_app/public/img/thumbs/tron.png diff --git a/web_app/Source_webapp/public/img/thumbs/zapier.png b/web_app/public/img/thumbs/zapier.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/zapier.png rename to web_app/public/img/thumbs/zapier.png diff --git a/web_app/Source_webapp/public/img/thumbs/zendesk.png b/web_app/public/img/thumbs/zendesk.png similarity index 100% rename from web_app/Source_webapp/public/img/thumbs/zendesk.png rename to web_app/public/img/thumbs/zendesk.png diff --git a/web_app/Source_webapp/public/index.html b/web_app/public/index.html similarity index 100% rename from web_app/Source_webapp/public/index.html rename to web_app/public/index.html diff --git a/web_app/Source_webapp/public/manifest.json b/web_app/public/manifest.json similarity index 100% rename from web_app/Source_webapp/public/manifest.json rename to web_app/public/manifest.json diff --git a/web_app/Source_webapp/public/robots.txt b/web_app/public/robots.txt similarity index 100% rename from web_app/Source_webapp/public/robots.txt rename to web_app/public/robots.txt diff --git a/web_app/Source_webapp/safelist.txt b/web_app/safelist.txt similarity index 100% rename from web_app/Source_webapp/safelist.txt rename to web_app/safelist.txt diff --git a/web_app/Source_webapp/src/@types/auth.ts b/web_app/src/@types/auth.ts similarity index 100% rename from web_app/Source_webapp/src/@types/auth.ts rename to web_app/src/@types/auth.ts diff --git a/web_app/Source_webapp/src/@types/chart.ts b/web_app/src/@types/chart.ts similarity index 100% rename from web_app/Source_webapp/src/@types/chart.ts rename to web_app/src/@types/chart.ts diff --git a/web_app/Source_webapp/src/@types/common.ts b/web_app/src/@types/common.ts similarity index 100% rename from web_app/Source_webapp/src/@types/common.ts rename to web_app/src/@types/common.ts diff --git a/web_app/Source_webapp/src/@types/docs.ts b/web_app/src/@types/docs.ts similarity index 100% rename from web_app/Source_webapp/src/@types/docs.ts rename to web_app/src/@types/docs.ts diff --git a/web_app/Source_webapp/src/@types/navigation.ts b/web_app/src/@types/navigation.ts similarity index 100% rename from web_app/Source_webapp/src/@types/navigation.ts rename to web_app/src/@types/navigation.ts diff --git a/web_app/Source_webapp/src/@types/routes.tsx b/web_app/src/@types/routes.tsx similarity index 100% rename from web_app/Source_webapp/src/@types/routes.tsx rename to web_app/src/@types/routes.tsx diff --git a/web_app/Source_webapp/src/@types/theme.ts b/web_app/src/@types/theme.ts similarity index 100% rename from web_app/Source_webapp/src/@types/theme.ts rename to web_app/src/@types/theme.ts diff --git a/web_app/Source_webapp/src/ABI/CommitmentManagemantABI.json b/web_app/src/ABI/CommitmentManagemantABI.json similarity index 100% rename from web_app/Source_webapp/src/ABI/CommitmentManagemantABI.json rename to web_app/src/ABI/CommitmentManagemantABI.json diff --git a/web_app/Source_webapp/src/ABI/DeviceNFTManagemant.json b/web_app/src/ABI/DeviceNFTManagemant.json similarity index 100% rename from web_app/Source_webapp/src/ABI/DeviceNFTManagemant.json rename to web_app/src/ABI/DeviceNFTManagemant.json diff --git a/web_app/Source_webapp/src/ABI/IdentityOwnershipRegisterationABI.json b/web_app/src/ABI/IdentityOwnershipRegisterationABI.json similarity index 100% rename from web_app/Source_webapp/src/ABI/IdentityOwnershipRegisterationABI.json rename to web_app/src/ABI/IdentityOwnershipRegisterationABI.json diff --git a/web_app/Source_webapp/src/ABI/ZKPStorageABI.json b/web_app/src/ABI/ZKPStorageABI.json similarity index 100% rename from web_app/Source_webapp/src/ABI/ZKPStorageABI.json rename to web_app/src/ABI/ZKPStorageABI.json diff --git a/web_app/Source_webapp/src/App.tsx b/web_app/src/App.tsx similarity index 100% rename from web_app/Source_webapp/src/App.tsx rename to web_app/src/App.tsx diff --git a/web_app/Source_webapp/src/assets/maps/allstates.json b/web_app/src/assets/maps/allstates.json similarity index 100% rename from web_app/Source_webapp/src/assets/maps/allstates.json rename to web_app/src/assets/maps/allstates.json diff --git a/web_app/Source_webapp/src/assets/maps/us-albers.json b/web_app/src/assets/maps/us-albers.json similarity index 100% rename from web_app/Source_webapp/src/assets/maps/us-albers.json rename to web_app/src/assets/maps/us-albers.json diff --git a/web_app/Source_webapp/src/assets/maps/world-countries-sans-antarctica.json b/web_app/src/assets/maps/world-countries-sans-antarctica.json similarity index 100% rename from web_app/Source_webapp/src/assets/maps/world-countries-sans-antarctica.json rename to web_app/src/assets/maps/world-countries-sans-antarctica.json diff --git a/web_app/Source_webapp/src/assets/styles/app.css b/web_app/src/assets/styles/app.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/app.css rename to web_app/src/assets/styles/app.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_alert.css b/web_app/src/assets/styles/components/_alert.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_alert.css rename to web_app/src/assets/styles/components/_alert.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_avatar.css b/web_app/src/assets/styles/components/_avatar.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_avatar.css rename to web_app/src/assets/styles/components/_avatar.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_badge.css b/web_app/src/assets/styles/components/_badge.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_badge.css rename to web_app/src/assets/styles/components/_badge.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_button.css b/web_app/src/assets/styles/components/_button.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_button.css rename to web_app/src/assets/styles/components/_button.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_card.css b/web_app/src/assets/styles/components/_card.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_card.css rename to web_app/src/assets/styles/components/_card.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_checkbox.css b/web_app/src/assets/styles/components/_checkbox.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_checkbox.css rename to web_app/src/assets/styles/components/_checkbox.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_close-button.css b/web_app/src/assets/styles/components/_close-button.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_close-button.css rename to web_app/src/assets/styles/components/_close-button.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_date-picker.css b/web_app/src/assets/styles/components/_date-picker.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_date-picker.css rename to web_app/src/assets/styles/components/_date-picker.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_dialog.css b/web_app/src/assets/styles/components/_dialog.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_dialog.css rename to web_app/src/assets/styles/components/_dialog.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_drawer.css b/web_app/src/assets/styles/components/_drawer.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_drawer.css rename to web_app/src/assets/styles/components/_drawer.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_dropdown.css b/web_app/src/assets/styles/components/_dropdown.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_dropdown.css rename to web_app/src/assets/styles/components/_dropdown.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_form.css b/web_app/src/assets/styles/components/_form.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_form.css rename to web_app/src/assets/styles/components/_form.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_input-group.css b/web_app/src/assets/styles/components/_input-group.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_input-group.css rename to web_app/src/assets/styles/components/_input-group.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_input.css b/web_app/src/assets/styles/components/_input.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_input.css rename to web_app/src/assets/styles/components/_input.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_menu-item.css b/web_app/src/assets/styles/components/_menu-item.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_menu-item.css rename to web_app/src/assets/styles/components/_menu-item.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_menu.css b/web_app/src/assets/styles/components/_menu.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_menu.css rename to web_app/src/assets/styles/components/_menu.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_notification.css b/web_app/src/assets/styles/components/_notification.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_notification.css rename to web_app/src/assets/styles/components/_notification.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_pagination.css b/web_app/src/assets/styles/components/_pagination.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_pagination.css rename to web_app/src/assets/styles/components/_pagination.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_progress.css b/web_app/src/assets/styles/components/_progress.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_progress.css rename to web_app/src/assets/styles/components/_progress.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_radio.css b/web_app/src/assets/styles/components/_radio.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_radio.css rename to web_app/src/assets/styles/components/_radio.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_segment.css b/web_app/src/assets/styles/components/_segment.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_segment.css rename to web_app/src/assets/styles/components/_segment.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_select.css b/web_app/src/assets/styles/components/_select.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_select.css rename to web_app/src/assets/styles/components/_select.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_skeleton.css b/web_app/src/assets/styles/components/_skeleton.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_skeleton.css rename to web_app/src/assets/styles/components/_skeleton.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_steps.css b/web_app/src/assets/styles/components/_steps.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_steps.css rename to web_app/src/assets/styles/components/_steps.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_switcher.css b/web_app/src/assets/styles/components/_switcher.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_switcher.css rename to web_app/src/assets/styles/components/_switcher.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_tables.css b/web_app/src/assets/styles/components/_tables.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_tables.css rename to web_app/src/assets/styles/components/_tables.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_tabs.css b/web_app/src/assets/styles/components/_tabs.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_tabs.css rename to web_app/src/assets/styles/components/_tabs.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_tag.css b/web_app/src/assets/styles/components/_tag.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_tag.css rename to web_app/src/assets/styles/components/_tag.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_time-input.css b/web_app/src/assets/styles/components/_time-input.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_time-input.css rename to web_app/src/assets/styles/components/_time-input.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_timeline.css b/web_app/src/assets/styles/components/_timeline.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_timeline.css rename to web_app/src/assets/styles/components/_timeline.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_toast.css b/web_app/src/assets/styles/components/_toast.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_toast.css rename to web_app/src/assets/styles/components/_toast.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_tooltip.css b/web_app/src/assets/styles/components/_tooltip.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_tooltip.css rename to web_app/src/assets/styles/components/_tooltip.css diff --git a/web_app/Source_webapp/src/assets/styles/components/_upload.css b/web_app/src/assets/styles/components/_upload.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/_upload.css rename to web_app/src/assets/styles/components/_upload.css diff --git a/web_app/Source_webapp/src/assets/styles/components/index.css b/web_app/src/assets/styles/components/index.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/components/index.css rename to web_app/src/assets/styles/components/index.css diff --git a/web_app/Source_webapp/src/assets/styles/tailwind/index.css b/web_app/src/assets/styles/tailwind/index.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/tailwind/index.css rename to web_app/src/assets/styles/tailwind/index.css diff --git a/web_app/Source_webapp/src/assets/styles/template/_header.css b/web_app/src/assets/styles/template/_header.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/template/_header.css rename to web_app/src/assets/styles/template/_header.css diff --git a/web_app/Source_webapp/src/assets/styles/template/_secondary-header.css b/web_app/src/assets/styles/template/_secondary-header.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/template/_secondary-header.css rename to web_app/src/assets/styles/template/_secondary-header.css diff --git a/web_app/Source_webapp/src/assets/styles/template/_side-nav.css b/web_app/src/assets/styles/template/_side-nav.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/template/_side-nav.css rename to web_app/src/assets/styles/template/_side-nav.css diff --git a/web_app/Source_webapp/src/assets/styles/template/_stacked-side-nav.css b/web_app/src/assets/styles/template/_stacked-side-nav.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/template/_stacked-side-nav.css rename to web_app/src/assets/styles/template/_stacked-side-nav.css diff --git a/web_app/Source_webapp/src/assets/styles/template/index.css b/web_app/src/assets/styles/template/index.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/template/index.css rename to web_app/src/assets/styles/template/index.css diff --git a/web_app/Source_webapp/src/assets/styles/vendors/_apex-chart.css b/web_app/src/assets/styles/vendors/_apex-chart.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/vendors/_apex-chart.css rename to web_app/src/assets/styles/vendors/_apex-chart.css diff --git a/web_app/Source_webapp/src/assets/styles/vendors/_full-calendar.css b/web_app/src/assets/styles/vendors/_full-calendar.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/vendors/_full-calendar.css rename to web_app/src/assets/styles/vendors/_full-calendar.css diff --git a/web_app/Source_webapp/src/assets/styles/vendors/_react-quill.css b/web_app/src/assets/styles/vendors/_react-quill.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/vendors/_react-quill.css rename to web_app/src/assets/styles/vendors/_react-quill.css diff --git a/web_app/Source_webapp/src/assets/styles/vendors/index.css b/web_app/src/assets/styles/vendors/index.css similarity index 100% rename from web_app/Source_webapp/src/assets/styles/vendors/index.css rename to web_app/src/assets/styles/vendors/index.css diff --git a/web_app/Source_webapp/src/assets/svg/DriversLicenseSvg.tsx b/web_app/src/assets/svg/DriversLicenseSvg.tsx similarity index 100% rename from web_app/Source_webapp/src/assets/svg/DriversLicenseSvg.tsx rename to web_app/src/assets/svg/DriversLicenseSvg.tsx diff --git a/web_app/Source_webapp/src/assets/svg/NationalIdSvg.tsx b/web_app/src/assets/svg/NationalIdSvg.tsx similarity index 100% rename from web_app/Source_webapp/src/assets/svg/NationalIdSvg.tsx rename to web_app/src/assets/svg/NationalIdSvg.tsx diff --git a/web_app/Source_webapp/src/assets/svg/PassportSvg.tsx b/web_app/src/assets/svg/PassportSvg.tsx similarity index 100% rename from web_app/Source_webapp/src/assets/svg/PassportSvg.tsx rename to web_app/src/assets/svg/PassportSvg.tsx diff --git a/web_app/Source_webapp/src/assets/svg/index.ts b/web_app/src/assets/svg/index.ts similarity index 100% rename from web_app/Source_webapp/src/assets/svg/index.ts rename to web_app/src/assets/svg/index.ts diff --git a/web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx b/web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx similarity index 93% rename from web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx rename to web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx index 73f4ba6d..d2c97fad 100644 --- a/web_app/Source_webapp/src/components/GoogleLoginButton/GoogleLoginButton.tsx +++ b/web_app/src/components/GoogleLoginButton/GoogleLoginButton.tsx @@ -15,7 +15,6 @@ const GoogleLoginButton: React.FC = () => { const { signIn } = useAuth() const handleSuccess = async (credentialResponse: any) => { - console.log('Google Login Success:', credentialResponse) const response = await signIn({ tokenId: credentialResponse.credential, }) @@ -31,7 +30,6 @@ const GoogleLoginButton: React.FC = () => { const login = useGoogleLogin({ onSuccess: async (tokenResponse) => { - console.log('Google Login Success:', tokenResponse) const response = await signIn({ accessToken: tokenResponse.access_token, }) diff --git a/web_app/Source_webapp/src/components/animations/Heart/HeartAnimation.tsx b/web_app/src/components/animations/Heart/HeartAnimation.tsx similarity index 100% rename from web_app/Source_webapp/src/components/animations/Heart/HeartAnimation.tsx rename to web_app/src/components/animations/Heart/HeartAnimation.tsx diff --git a/web_app/Source_webapp/src/components/animations/Heart/style.css b/web_app/src/components/animations/Heart/style.css similarity index 100% rename from web_app/Source_webapp/src/components/animations/Heart/style.css rename to web_app/src/components/animations/Heart/style.css diff --git a/web_app/Source_webapp/src/components/custom/Tab.tsx b/web_app/src/components/custom/Tab.tsx similarity index 100% rename from web_app/Source_webapp/src/components/custom/Tab.tsx rename to web_app/src/components/custom/Tab.tsx diff --git a/web_app/Source_webapp/src/components/layouts/AuthLayout/AuthLayout.tsx b/web_app/src/components/layouts/AuthLayout/AuthLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/AuthLayout/AuthLayout.tsx rename to web_app/src/components/layouts/AuthLayout/AuthLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/AuthLayout/Cover.tsx b/web_app/src/components/layouts/AuthLayout/Cover.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/AuthLayout/Cover.tsx rename to web_app/src/components/layouts/AuthLayout/Cover.tsx diff --git a/web_app/Source_webapp/src/components/layouts/AuthLayout/Side.tsx b/web_app/src/components/layouts/AuthLayout/Side.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/AuthLayout/Side.tsx rename to web_app/src/components/layouts/AuthLayout/Side.tsx diff --git a/web_app/Source_webapp/src/components/layouts/AuthLayout/Simple.tsx b/web_app/src/components/layouts/AuthLayout/Simple.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/AuthLayout/Simple.tsx rename to web_app/src/components/layouts/AuthLayout/Simple.tsx diff --git a/web_app/Source_webapp/src/components/layouts/AuthLayout/index.ts b/web_app/src/components/layouts/AuthLayout/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/layouts/AuthLayout/index.ts rename to web_app/src/components/layouts/AuthLayout/index.ts diff --git a/web_app/Source_webapp/src/components/layouts/BlankLayout.tsx b/web_app/src/components/layouts/BlankLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/BlankLayout.tsx rename to web_app/src/components/layouts/BlankLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/ClassicLayout.tsx b/web_app/src/components/layouts/ClassicLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/ClassicLayout.tsx rename to web_app/src/components/layouts/ClassicLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/DeckedLayout.tsx b/web_app/src/components/layouts/DeckedLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/DeckedLayout.tsx rename to web_app/src/components/layouts/DeckedLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/Layouts.tsx b/web_app/src/components/layouts/Layouts.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/Layouts.tsx rename to web_app/src/components/layouts/Layouts.tsx diff --git a/web_app/Source_webapp/src/components/layouts/ModernLayout.tsx b/web_app/src/components/layouts/ModernLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/ModernLayout.tsx rename to web_app/src/components/layouts/ModernLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/SimpleLayout.tsx b/web_app/src/components/layouts/SimpleLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/SimpleLayout.tsx rename to web_app/src/components/layouts/SimpleLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/StackedSideLayout.tsx b/web_app/src/components/layouts/StackedSideLayout.tsx similarity index 100% rename from web_app/Source_webapp/src/components/layouts/StackedSideLayout.tsx rename to web_app/src/components/layouts/StackedSideLayout.tsx diff --git a/web_app/Source_webapp/src/components/layouts/ThemeApply.tsx b/web_app/src/components/layouts/ThemeApply.tsx similarity index 99% rename from web_app/Source_webapp/src/components/layouts/ThemeApply.tsx rename to web_app/src/components/layouts/ThemeApply.tsx index b0f2bf21..030e04fe 100644 --- a/web_app/Source_webapp/src/components/layouts/ThemeApply.tsx +++ b/web_app/src/components/layouts/ThemeApply.tsx @@ -360,8 +360,6 @@ export default function ThemeApply() { '#' + data.button ).split('-') - console.log('Theme apply') - dispatch(setThemeColor(buttonColorSplited[0])) dispatch(setThemeColorLevel(buttonColorSplited[1])) diff --git a/web_app/Source_webapp/src/components/layouts/index.ts b/web_app/src/components/layouts/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/layouts/index.ts rename to web_app/src/components/layouts/index.ts diff --git a/web_app/Source_webapp/src/components/map/CirclesLayer.tsx b/web_app/src/components/map/CirclesLayer.tsx similarity index 100% rename from web_app/Source_webapp/src/components/map/CirclesLayer.tsx rename to web_app/src/components/map/CirclesLayer.tsx diff --git a/web_app/Source_webapp/src/components/map/MapComponent.tsx b/web_app/src/components/map/MapComponent.tsx similarity index 96% rename from web_app/Source_webapp/src/components/map/MapComponent.tsx rename to web_app/src/components/map/MapComponent.tsx index 14814ef9..084e0580 100644 --- a/web_app/Source_webapp/src/components/map/MapComponent.tsx +++ b/web_app/src/components/map/MapComponent.tsx @@ -27,15 +27,16 @@ const MapComponent: React.FC = ({ positions, loading }) => { useEffect(() => { const unsubscribeFunctions: (() => void)[] = [] + const port = import.meta.env.VITE_MQTT_WEBSOCKET_PORT || '8081' // Default WebSocket port positions.forEach((item) => { if (item?.deviceEncryptedId) { let deviceNodeId = '' if (item.nodeId == 'developer.fidesinnova.io') { - deviceNodeId = `wss://${item.nodeId}:8081` + deviceNodeId = `wss://${item.nodeId}:${port}` } else { - deviceNodeId = `wss://panel.${item.nodeId}:8081` + deviceNodeId = `wss://panel.${item.nodeId}:${port}}` } const unsubscribe = subscribe( @@ -94,7 +95,7 @@ const MapComponent: React.FC = ({ positions, loading }) => { const filteredPositions = selectedNodeId !== null ? positions.filter((item) => item.nodeId === selectedNodeId) - : positions.filter((item) => item.nodeId !== "Sample") + : positions.filter((item) => item.nodeId !== 'Sample') // Custom component to zoom the map to Paris const ZoomToParis: React.FC = () => { diff --git a/web_app/Source_webapp/src/components/map/MarkerCluster.tsx b/web_app/src/components/map/MarkerCluster.tsx similarity index 100% rename from web_app/Source_webapp/src/components/map/MarkerCluster.tsx rename to web_app/src/components/map/MarkerCluster.tsx diff --git a/web_app/Source_webapp/src/components/map/ParisDeviceGen.tsx b/web_app/src/components/map/ParisDeviceGen.tsx similarity index 100% rename from web_app/Source_webapp/src/components/map/ParisDeviceGen.tsx rename to web_app/src/components/map/ParisDeviceGen.tsx diff --git a/web_app/Source_webapp/src/components/map/mapStyle.scss b/web_app/src/components/map/mapStyle.scss similarity index 100% rename from web_app/Source_webapp/src/components/map/mapStyle.scss rename to web_app/src/components/map/mapStyle.scss diff --git a/web_app/Source_webapp/src/components/route/AppRoute.tsx b/web_app/src/components/route/AppRoute.tsx similarity index 100% rename from web_app/Source_webapp/src/components/route/AppRoute.tsx rename to web_app/src/components/route/AppRoute.tsx diff --git a/web_app/Source_webapp/src/components/route/AuthorityGuard.tsx b/web_app/src/components/route/AuthorityGuard.tsx similarity index 100% rename from web_app/Source_webapp/src/components/route/AuthorityGuard.tsx rename to web_app/src/components/route/AuthorityGuard.tsx diff --git a/web_app/Source_webapp/src/components/route/ProtectedRoute.tsx b/web_app/src/components/route/ProtectedRoute.tsx similarity index 100% rename from web_app/Source_webapp/src/components/route/ProtectedRoute.tsx rename to web_app/src/components/route/ProtectedRoute.tsx diff --git a/web_app/Source_webapp/src/components/route/PublicRoute.tsx b/web_app/src/components/route/PublicRoute.tsx similarity index 100% rename from web_app/Source_webapp/src/components/route/PublicRoute.tsx rename to web_app/src/components/route/PublicRoute.tsx diff --git a/web_app/Source_webapp/src/components/shared/ActionLink.tsx b/web_app/src/components/shared/ActionLink.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/ActionLink.tsx rename to web_app/src/components/shared/ActionLink.tsx diff --git a/web_app/Source_webapp/src/components/shared/AdaptableCard.tsx b/web_app/src/components/shared/AdaptableCard.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/AdaptableCard.tsx rename to web_app/src/components/shared/AdaptableCard.tsx diff --git a/web_app/Source_webapp/src/components/shared/Affix.tsx b/web_app/src/components/shared/Affix.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/Affix.tsx rename to web_app/src/components/shared/Affix.tsx diff --git a/web_app/Source_webapp/src/components/shared/AuthorityCheck.tsx b/web_app/src/components/shared/AuthorityCheck.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/AuthorityCheck.tsx rename to web_app/src/components/shared/AuthorityCheck.tsx diff --git a/web_app/Source_webapp/src/components/shared/CalendarView.tsx b/web_app/src/components/shared/CalendarView.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/CalendarView.tsx rename to web_app/src/components/shared/CalendarView.tsx diff --git a/web_app/Source_webapp/src/components/shared/Chart.tsx b/web_app/src/components/shared/Chart.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/Chart.tsx rename to web_app/src/components/shared/Chart.tsx diff --git a/web_app/Source_webapp/src/components/shared/ConfirmDialog.tsx b/web_app/src/components/shared/ConfirmDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/ConfirmDialog.tsx rename to web_app/src/components/shared/ConfirmDialog.tsx diff --git a/web_app/Source_webapp/src/components/shared/Container.tsx b/web_app/src/components/shared/Container.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/Container.tsx rename to web_app/src/components/shared/Container.tsx diff --git a/web_app/Source_webapp/src/components/shared/DataTable.tsx b/web_app/src/components/shared/DataTable.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/DataTable.tsx rename to web_app/src/components/shared/DataTable.tsx diff --git a/web_app/Source_webapp/src/components/shared/DoubleSidedImage.tsx b/web_app/src/components/shared/DoubleSidedImage.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/DoubleSidedImage.tsx rename to web_app/src/components/shared/DoubleSidedImage.tsx diff --git a/web_app/Source_webapp/src/components/shared/EllipsisButton.tsx b/web_app/src/components/shared/EllipsisButton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/EllipsisButton.tsx rename to web_app/src/components/shared/EllipsisButton.tsx diff --git a/web_app/Source_webapp/src/components/shared/FormCustomFormatInput.tsx b/web_app/src/components/shared/FormCustomFormatInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/FormCustomFormatInput.tsx rename to web_app/src/components/shared/FormCustomFormatInput.tsx diff --git a/web_app/Source_webapp/src/components/shared/FormNumericInput.tsx b/web_app/src/components/shared/FormNumericInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/FormNumericInput.tsx rename to web_app/src/components/shared/FormNumericInput.tsx diff --git a/web_app/Source_webapp/src/components/shared/FormPatternInput.tsx b/web_app/src/components/shared/FormPatternInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/FormPatternInput.tsx rename to web_app/src/components/shared/FormPatternInput.tsx diff --git a/web_app/Source_webapp/src/components/shared/GrowShrinkTag.tsx b/web_app/src/components/shared/GrowShrinkTag.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/GrowShrinkTag.tsx rename to web_app/src/components/shared/GrowShrinkTag.tsx diff --git a/web_app/Source_webapp/src/components/shared/IconText.tsx b/web_app/src/components/shared/IconText.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/IconText.tsx rename to web_app/src/components/shared/IconText.tsx diff --git a/web_app/Source_webapp/src/components/shared/Loading.tsx b/web_app/src/components/shared/Loading.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/Loading.tsx rename to web_app/src/components/shared/Loading.tsx diff --git a/web_app/Source_webapp/src/components/shared/NavToggle.tsx b/web_app/src/components/shared/NavToggle.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/NavToggle.tsx rename to web_app/src/components/shared/NavToggle.tsx diff --git a/web_app/Source_webapp/src/components/shared/PasswordInput.tsx b/web_app/src/components/shared/PasswordInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/PasswordInput.tsx rename to web_app/src/components/shared/PasswordInput.tsx diff --git a/web_app/Source_webapp/src/components/shared/RegionMap.tsx b/web_app/src/components/shared/RegionMap.tsx similarity index 97% rename from web_app/Source_webapp/src/components/shared/RegionMap.tsx rename to web_app/src/components/shared/RegionMap.tsx index 784db159..8c7b8f8a 100644 --- a/web_app/Source_webapp/src/components/shared/RegionMap.tsx +++ b/web_app/src/components/shared/RegionMap.tsx @@ -90,8 +90,6 @@ const MapChart = ({ } const handleZoomOut = () => { - console.log(Math.max(position.zoom / 1.5, 0.1)) - setPosition((pos) => ({ ...pos, zoom: Math.max(pos.zoom / 1.5, 0.4) })) } @@ -196,9 +194,6 @@ const MapChart = ({ const [lat, lon] = coords return ( - console.log(item.deviceName) - } key={index} coordinates={[lon - 1.5, lat + 2]} // note: might be [lng, lat] depending on projection > diff --git a/web_app/Source_webapp/src/components/shared/RichTextEditor.tsx b/web_app/src/components/shared/RichTextEditor.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/RichTextEditor.tsx rename to web_app/src/components/shared/RichTextEditor.tsx diff --git a/web_app/Source_webapp/src/components/shared/SegmentItemOption.tsx b/web_app/src/components/shared/SegmentItemOption.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/SegmentItemOption.tsx rename to web_app/src/components/shared/SegmentItemOption.tsx diff --git a/web_app/Source_webapp/src/components/shared/StickyFooter.tsx b/web_app/src/components/shared/StickyFooter.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/StickyFooter.tsx rename to web_app/src/components/shared/StickyFooter.tsx diff --git a/web_app/Source_webapp/src/components/shared/SvgIcon.tsx b/web_app/src/components/shared/SvgIcon.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/SvgIcon.tsx rename to web_app/src/components/shared/SvgIcon.tsx diff --git a/web_app/Source_webapp/src/components/shared/SvgLocation.tsx b/web_app/src/components/shared/SvgLocation.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/SvgLocation.tsx rename to web_app/src/components/shared/SvgLocation.tsx diff --git a/web_app/Source_webapp/src/components/shared/SyntaxHighlighter.tsx b/web_app/src/components/shared/SyntaxHighlighter.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/SyntaxHighlighter.tsx rename to web_app/src/components/shared/SyntaxHighlighter.tsx diff --git a/web_app/Source_webapp/src/components/shared/TextEllipsis.tsx b/web_app/src/components/shared/TextEllipsis.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/TextEllipsis.tsx rename to web_app/src/components/shared/TextEllipsis.tsx diff --git a/web_app/Source_webapp/src/components/shared/UsersAvatarGroup.tsx b/web_app/src/components/shared/UsersAvatarGroup.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/UsersAvatarGroup.tsx rename to web_app/src/components/shared/UsersAvatarGroup.tsx diff --git a/web_app/Source_webapp/src/components/shared/index.ts b/web_app/src/components/shared/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/shared/index.ts rename to web_app/src/components/shared/index.ts diff --git a/web_app/Source_webapp/src/components/shared/loaders/MediaSkeleton.tsx b/web_app/src/components/shared/loaders/MediaSkeleton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/loaders/MediaSkeleton.tsx rename to web_app/src/components/shared/loaders/MediaSkeleton.tsx diff --git a/web_app/Source_webapp/src/components/shared/loaders/TableRowSkeleton.tsx b/web_app/src/components/shared/loaders/TableRowSkeleton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/loaders/TableRowSkeleton.tsx rename to web_app/src/components/shared/loaders/TableRowSkeleton.tsx diff --git a/web_app/Source_webapp/src/components/shared/loaders/TextBlockSkeleton.tsx b/web_app/src/components/shared/loaders/TextBlockSkeleton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/shared/loaders/TextBlockSkeleton.tsx rename to web_app/src/components/shared/loaders/TextBlockSkeleton.tsx diff --git a/web_app/Source_webapp/src/components/template/Footer.tsx b/web_app/src/components/template/Footer.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Footer.tsx rename to web_app/src/components/template/Footer.tsx diff --git a/web_app/Source_webapp/src/components/template/Header.tsx b/web_app/src/components/template/Header.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Header.tsx rename to web_app/src/components/template/Header.tsx diff --git a/web_app/Source_webapp/src/components/template/HeaderLogo.tsx b/web_app/src/components/template/HeaderLogo.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HeaderLogo.tsx rename to web_app/src/components/template/HeaderLogo.tsx diff --git a/web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx b/web_app/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx rename to web_app/src/components/template/HorizontalMenuContent/HorizontalMenuContent.tsx diff --git a/web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx b/web_app/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx rename to web_app/src/components/template/HorizontalMenuContent/HorizontalMenuDropdownItem.tsx diff --git a/web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx b/web_app/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx rename to web_app/src/components/template/HorizontalMenuContent/HorizontalMenuItem.tsx diff --git a/web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx b/web_app/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx rename to web_app/src/components/template/HorizontalMenuContent/HorizontalMenuNavLink.tsx diff --git a/web_app/Source_webapp/src/components/template/HorizontalMenuContent/index.ts b/web_app/src/components/template/HorizontalMenuContent/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalMenuContent/index.ts rename to web_app/src/components/template/HorizontalMenuContent/index.ts diff --git a/web_app/Source_webapp/src/components/template/HorizontalNav.tsx b/web_app/src/components/template/HorizontalNav.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/HorizontalNav.tsx rename to web_app/src/components/template/HorizontalNav.tsx diff --git a/admin_web_app/Source_webapp/src/components/template/LanguageSelector.tsx b/web_app/src/components/template/LanguageSelector.tsx similarity index 98% rename from admin_web_app/Source_webapp/src/components/template/LanguageSelector.tsx rename to web_app/src/components/template/LanguageSelector.tsx index a1c6ef6c..7cdf83fd 100644 --- a/admin_web_app/Source_webapp/src/components/template/LanguageSelector.tsx +++ b/web_app/src/components/template/LanguageSelector.tsx @@ -44,7 +44,6 @@ const _LanguageSelector = ({ className }: CommonProps) => { const formattedLang = lang.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase() }) - console.log(formattedLang) setLoading(true) diff --git a/web_app/Source_webapp/src/components/template/Logo.tsx b/web_app/src/components/template/Logo.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Logo.tsx rename to web_app/src/components/template/Logo.tsx diff --git a/web_app/Source_webapp/src/components/template/MobileNav.tsx b/web_app/src/components/template/MobileNav.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/MobileNav.tsx rename to web_app/src/components/template/MobileNav.tsx diff --git a/web_app/Source_webapp/src/components/template/Notification.tsx b/web_app/src/components/template/Notification.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Notification.tsx rename to web_app/src/components/template/Notification.tsx diff --git a/web_app/Source_webapp/src/components/template/PageContainer.tsx b/web_app/src/components/template/PageContainer.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/PageContainer.tsx rename to web_app/src/components/template/PageContainer.tsx diff --git a/web_app/Source_webapp/src/components/template/Search.tsx b/web_app/src/components/template/Search.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Search.tsx rename to web_app/src/components/template/Search.tsx diff --git a/web_app/Source_webapp/src/components/template/SecondaryHeader.tsx b/web_app/src/components/template/SecondaryHeader.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/SecondaryHeader.tsx rename to web_app/src/components/template/SecondaryHeader.tsx diff --git a/web_app/Source_webapp/src/components/template/SideNav.tsx b/web_app/src/components/template/SideNav.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/SideNav.tsx rename to web_app/src/components/template/SideNav.tsx diff --git a/web_app/Source_webapp/src/components/template/SideNavToggle.tsx b/web_app/src/components/template/SideNavToggle.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/SideNavToggle.tsx rename to web_app/src/components/template/SideNavToggle.tsx diff --git a/web_app/Source_webapp/src/components/template/SidePanel/SidePanel.tsx b/web_app/src/components/template/SidePanel/SidePanel.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/SidePanel/SidePanel.tsx rename to web_app/src/components/template/SidePanel/SidePanel.tsx diff --git a/web_app/Source_webapp/src/components/template/SidePanel/SidePanelContent.tsx b/web_app/src/components/template/SidePanel/SidePanelContent.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/SidePanel/SidePanelContent.tsx rename to web_app/src/components/template/SidePanel/SidePanelContent.tsx diff --git a/web_app/Source_webapp/src/components/template/SidePanel/index.ts b/web_app/src/components/template/SidePanel/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/template/SidePanel/index.ts rename to web_app/src/components/template/SidePanel/index.ts diff --git a/web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNav.tsx b/web_app/src/components/template/StackedSideNav/StackedSideNav.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNav.tsx rename to web_app/src/components/template/StackedSideNav/StackedSideNav.tsx diff --git a/web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavMini.tsx b/web_app/src/components/template/StackedSideNav/StackedSideNavMini.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavMini.tsx rename to web_app/src/components/template/StackedSideNav/StackedSideNavMini.tsx diff --git a/web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx b/web_app/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx rename to web_app/src/components/template/StackedSideNav/StackedSideNavSecondary.tsx diff --git a/web_app/Source_webapp/src/components/template/StackedSideNav/index.ts b/web_app/src/components/template/StackedSideNav/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/template/StackedSideNav/index.ts rename to web_app/src/components/template/StackedSideNav/index.ts diff --git a/web_app/Source_webapp/src/components/template/Theme.tsx b/web_app/src/components/template/Theme.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/Theme.tsx rename to web_app/src/components/template/Theme.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/CopyButton.tsx b/web_app/src/components/template/ThemeConfigurator/CopyButton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/CopyButton.tsx rename to web_app/src/components/template/ThemeConfigurator/CopyButton.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx b/web_app/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx rename to web_app/src/components/template/ThemeConfigurator/DirectionSwitcher.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx b/web_app/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx rename to web_app/src/components/template/ThemeConfigurator/LayoutSwitcher.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/ModeSwitcher.tsx b/web_app/src/components/template/ThemeConfigurator/ModeSwitcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/ModeSwitcher.tsx rename to web_app/src/components/template/ThemeConfigurator/ModeSwitcher.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx b/web_app/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx rename to web_app/src/components/template/ThemeConfigurator/NavModeSwitcher.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx b/web_app/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx rename to web_app/src/components/template/ThemeConfigurator/ThemeConfigurator.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx b/web_app/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx rename to web_app/src/components/template/ThemeConfigurator/ThemeSwitcher.tsx diff --git a/web_app/Source_webapp/src/components/template/ThemeConfigurator/index.ts b/web_app/src/components/template/ThemeConfigurator/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/template/ThemeConfigurator/index.ts rename to web_app/src/components/template/ThemeConfigurator/index.ts diff --git a/web_app/Source_webapp/src/components/template/UserDropdown.tsx b/web_app/src/components/template/UserDropdown.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/UserDropdown.tsx rename to web_app/src/components/template/UserDropdown.tsx diff --git a/web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx b/web_app/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx rename to web_app/src/components/template/VerticalMenuContent/VerticalCollapsedMenuItem.tsx diff --git a/web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx b/web_app/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx rename to web_app/src/components/template/VerticalMenuContent/VerticalMenuContent.tsx diff --git a/web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx b/web_app/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx rename to web_app/src/components/template/VerticalMenuContent/VerticalMenuIcon.tsx diff --git a/web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx b/web_app/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx rename to web_app/src/components/template/VerticalMenuContent/VerticalSingleMenuItem.tsx diff --git a/web_app/Source_webapp/src/components/template/VerticalMenuContent/index.ts b/web_app/src/components/template/VerticalMenuContent/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/template/VerticalMenuContent/index.ts rename to web_app/src/components/template/VerticalMenuContent/index.ts diff --git a/web_app/Source_webapp/src/components/template/style.css b/web_app/src/components/template/style.css similarity index 100% rename from web_app/Source_webapp/src/components/template/style.css rename to web_app/src/components/template/style.css diff --git a/web_app/Source_webapp/src/components/ui/@types/common.ts b/web_app/src/components/ui/@types/common.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/@types/common.ts rename to web_app/src/components/ui/@types/common.ts diff --git a/web_app/Source_webapp/src/components/ui/@types/date.ts b/web_app/src/components/ui/@types/date.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/@types/date.ts rename to web_app/src/components/ui/@types/date.ts diff --git a/web_app/Source_webapp/src/components/ui/@types/placement.ts b/web_app/src/components/ui/@types/placement.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/@types/placement.ts rename to web_app/src/components/ui/@types/placement.ts diff --git a/web_app/Source_webapp/src/components/ui/Alert/Alert.tsx b/web_app/src/components/ui/Alert/Alert.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Alert/Alert.tsx rename to web_app/src/components/ui/Alert/Alert.tsx diff --git a/web_app/Source_webapp/src/components/ui/Alert/index.tsx b/web_app/src/components/ui/Alert/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Alert/index.tsx rename to web_app/src/components/ui/Alert/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Avatar/Avatar.tsx b/web_app/src/components/ui/Avatar/Avatar.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Avatar/Avatar.tsx rename to web_app/src/components/ui/Avatar/Avatar.tsx diff --git a/web_app/Source_webapp/src/components/ui/Avatar/AvatarGroup.tsx b/web_app/src/components/ui/Avatar/AvatarGroup.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Avatar/AvatarGroup.tsx rename to web_app/src/components/ui/Avatar/AvatarGroup.tsx diff --git a/web_app/Source_webapp/src/components/ui/Avatar/index.tsx b/web_app/src/components/ui/Avatar/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Avatar/index.tsx rename to web_app/src/components/ui/Avatar/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Badge/Badge.tsx b/web_app/src/components/ui/Badge/Badge.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Badge/Badge.tsx rename to web_app/src/components/ui/Badge/Badge.tsx diff --git a/web_app/Source_webapp/src/components/ui/Badge/index.tsx b/web_app/src/components/ui/Badge/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Badge/index.tsx rename to web_app/src/components/ui/Badge/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Button/Button.tsx b/web_app/src/components/ui/Button/Button.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Button/Button.tsx rename to web_app/src/components/ui/Button/Button.tsx diff --git a/web_app/Source_webapp/src/components/ui/Button/index.tsx b/web_app/src/components/ui/Button/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Button/index.tsx rename to web_app/src/components/ui/Button/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Button/style.css b/web_app/src/components/ui/Button/style.css similarity index 100% rename from web_app/Source_webapp/src/components/ui/Button/style.css rename to web_app/src/components/ui/Button/style.css diff --git a/web_app/Source_webapp/src/components/ui/Calendar/index.ts b/web_app/src/components/ui/Calendar/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Calendar/index.ts rename to web_app/src/components/ui/Calendar/index.ts diff --git a/web_app/Source_webapp/src/components/ui/Card/Card.tsx b/web_app/src/components/ui/Card/Card.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Card/Card.tsx rename to web_app/src/components/ui/Card/Card.tsx diff --git a/web_app/Source_webapp/src/components/ui/Card/index.tsx b/web_app/src/components/ui/Card/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Card/index.tsx rename to web_app/src/components/ui/Card/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/CardHolder/index.tsx b/web_app/src/components/ui/CardHolder/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/CardHolder/index.tsx rename to web_app/src/components/ui/CardHolder/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/CardHolder/style.scss b/web_app/src/components/ui/CardHolder/style.scss similarity index 100% rename from web_app/Source_webapp/src/components/ui/CardHolder/style.scss rename to web_app/src/components/ui/CardHolder/style.scss diff --git a/web_app/Source_webapp/src/components/ui/Checkbox/Checkbox.tsx b/web_app/src/components/ui/Checkbox/Checkbox.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Checkbox/Checkbox.tsx rename to web_app/src/components/ui/Checkbox/Checkbox.tsx diff --git a/web_app/Source_webapp/src/components/ui/Checkbox/Group.tsx b/web_app/src/components/ui/Checkbox/Group.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Checkbox/Group.tsx rename to web_app/src/components/ui/Checkbox/Group.tsx diff --git a/web_app/Source_webapp/src/components/ui/Checkbox/context.tsx b/web_app/src/components/ui/Checkbox/context.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Checkbox/context.tsx rename to web_app/src/components/ui/Checkbox/context.tsx diff --git a/web_app/Source_webapp/src/components/ui/Checkbox/index.tsx b/web_app/src/components/ui/Checkbox/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Checkbox/index.tsx rename to web_app/src/components/ui/Checkbox/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/CloseButton/CloseButton.tsx b/web_app/src/components/ui/CloseButton/CloseButton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/CloseButton/CloseButton.tsx rename to web_app/src/components/ui/CloseButton/CloseButton.tsx diff --git a/web_app/Source_webapp/src/components/ui/CloseButton/index.tsx b/web_app/src/components/ui/CloseButton/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/CloseButton/index.tsx rename to web_app/src/components/ui/CloseButton/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/ConfigProvider/ConfigProvider.ts b/web_app/src/components/ui/ConfigProvider/ConfigProvider.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/ConfigProvider/ConfigProvider.ts rename to web_app/src/components/ui/ConfigProvider/ConfigProvider.ts diff --git a/web_app/Source_webapp/src/components/ui/ConfigProvider/index.ts b/web_app/src/components/ui/ConfigProvider/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/ConfigProvider/index.ts rename to web_app/src/components/ui/ConfigProvider/index.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/BasePicker.tsx b/web_app/src/components/ui/DatePicker/BasePicker.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/BasePicker.tsx rename to web_app/src/components/ui/DatePicker/BasePicker.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/Calendar.tsx b/web_app/src/components/ui/DatePicker/Calendar.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/Calendar.tsx rename to web_app/src/components/ui/DatePicker/Calendar.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/CalendarBase.tsx b/web_app/src/components/ui/DatePicker/CalendarBase.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/CalendarBase.tsx rename to web_app/src/components/ui/DatePicker/CalendarBase.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/DatePicker.tsx b/web_app/src/components/ui/DatePicker/DatePicker.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/DatePicker.tsx rename to web_app/src/components/ui/DatePicker/DatePicker.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/DatePickerRange.tsx b/web_app/src/components/ui/DatePicker/DatePickerRange.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/DatePickerRange.tsx rename to web_app/src/components/ui/DatePicker/DatePickerRange.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/DateTimepicker.tsx b/web_app/src/components/ui/DatePicker/DateTimepicker.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/DateTimepicker.tsx rename to web_app/src/components/ui/DatePicker/DateTimepicker.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/RangeCalendar.tsx b/web_app/src/components/ui/DatePicker/RangeCalendar.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/RangeCalendar.tsx rename to web_app/src/components/ui/DatePicker/RangeCalendar.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/index.tsx b/web_app/src/components/ui/DatePicker/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/index.tsx rename to web_app/src/components/ui/DatePicker/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/DateTable.tsx b/web_app/src/components/ui/DatePicker/tables/DateTable.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/DateTable.tsx rename to web_app/src/components/ui/DatePicker/tables/DateTable.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/Header.tsx b/web_app/src/components/ui/DatePicker/tables/Header.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/Header.tsx rename to web_app/src/components/ui/DatePicker/tables/Header.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/MonthTable.tsx b/web_app/src/components/ui/DatePicker/tables/MonthTable.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/MonthTable.tsx rename to web_app/src/components/ui/DatePicker/tables/MonthTable.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/YearTable.tsx b/web_app/src/components/ui/DatePicker/tables/YearTable.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/YearTable.tsx rename to web_app/src/components/ui/DatePicker/tables/YearTable.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Day.tsx b/web_app/src/components/ui/DatePicker/tables/components/Day.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Day.tsx rename to web_app/src/components/ui/DatePicker/tables/components/Day.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Month.tsx b/web_app/src/components/ui/DatePicker/tables/components/Month.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/Month.tsx rename to web_app/src/components/ui/DatePicker/tables/components/Month.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getDayProps.ts b/web_app/src/components/ui/DatePicker/tables/components/props/getDayProps.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getDayProps.ts rename to web_app/src/components/ui/DatePicker/tables/components/props/getDayProps.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts b/web_app/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts rename to web_app/src/components/ui/DatePicker/tables/components/props/getRangeProps.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isDisabled.ts b/web_app/src/components/ui/DatePicker/tables/components/props/isDisabled.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isDisabled.ts rename to web_app/src/components/ui/DatePicker/tables/components/props/isDisabled.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isOutside.ts b/web_app/src/components/ui/DatePicker/tables/components/props/isOutside.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isOutside.ts rename to web_app/src/components/ui/DatePicker/tables/components/props/isOutside.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isWeekend.ts b/web_app/src/components/ui/DatePicker/tables/components/props/isWeekend.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/props/isWeekend.ts rename to web_app/src/components/ui/DatePicker/tables/components/props/isWeekend.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/tables/components/types.ts b/web_app/src/components/ui/DatePicker/tables/components/types.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/tables/components/types.ts rename to web_app/src/components/ui/DatePicker/tables/components/types.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/formatYear.tsx b/web_app/src/components/ui/DatePicker/utils/formatYear.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/formatYear.tsx rename to web_app/src/components/ui/DatePicker/utils/formatYear.tsx diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getDecadeRange.ts b/web_app/src/components/ui/DatePicker/utils/getDecadeRange.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getDecadeRange.ts rename to web_app/src/components/ui/DatePicker/utils/getDecadeRange.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getEndOfWeek.ts b/web_app/src/components/ui/DatePicker/utils/getEndOfWeek.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getEndOfWeek.ts rename to web_app/src/components/ui/DatePicker/utils/getEndOfWeek.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthDays.ts b/web_app/src/components/ui/DatePicker/utils/getMonthDays.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthDays.ts rename to web_app/src/components/ui/DatePicker/utils/getMonthDays.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthsNames.ts b/web_app/src/components/ui/DatePicker/utils/getMonthsNames.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getMonthsNames.ts rename to web_app/src/components/ui/DatePicker/utils/getMonthsNames.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getStartOfWeek.ts b/web_app/src/components/ui/DatePicker/utils/getStartOfWeek.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getStartOfWeek.ts rename to web_app/src/components/ui/DatePicker/utils/getStartOfWeek.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getWeekdaysNames.ts b/web_app/src/components/ui/DatePicker/utils/getWeekdaysNames.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getWeekdaysNames.ts rename to web_app/src/components/ui/DatePicker/utils/getWeekdaysNames.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/getYearsRange.ts b/web_app/src/components/ui/DatePicker/utils/getYearsRange.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/getYearsRange.ts rename to web_app/src/components/ui/DatePicker/utils/getYearsRange.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/index.ts b/web_app/src/components/ui/DatePicker/utils/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/index.ts rename to web_app/src/components/ui/DatePicker/utils/index.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/isMonthInRange.ts b/web_app/src/components/ui/DatePicker/utils/isMonthInRange.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/isMonthInRange.ts rename to web_app/src/components/ui/DatePicker/utils/isMonthInRange.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameDate.ts b/web_app/src/components/ui/DatePicker/utils/isSameDate.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameDate.ts rename to web_app/src/components/ui/DatePicker/utils/isSameDate.ts diff --git a/web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameMonth.ts b/web_app/src/components/ui/DatePicker/utils/isSameMonth.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/DatePicker/utils/isSameMonth.ts rename to web_app/src/components/ui/DatePicker/utils/isSameMonth.ts diff --git a/web_app/Source_webapp/src/components/ui/Dialog/Confirm/ConfirmDialog.tsx b/web_app/src/components/ui/Dialog/Confirm/ConfirmDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dialog/Confirm/ConfirmDialog.tsx rename to web_app/src/components/ui/Dialog/Confirm/ConfirmDialog.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dialog/Dialog.tsx b/web_app/src/components/ui/Dialog/Dialog.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dialog/Dialog.tsx rename to web_app/src/components/ui/Dialog/Dialog.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dialog/index.tsx b/web_app/src/components/ui/Dialog/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dialog/index.tsx rename to web_app/src/components/ui/Dialog/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Drawer/Drawer.tsx b/web_app/src/components/ui/Drawer/Drawer.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Drawer/Drawer.tsx rename to web_app/src/components/ui/Drawer/Drawer.tsx diff --git a/web_app/Source_webapp/src/components/ui/Drawer/index.tsx b/web_app/src/components/ui/Drawer/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Drawer/index.tsx rename to web_app/src/components/ui/Drawer/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/Dropdown.tsx b/web_app/src/components/ui/Dropdown/Dropdown.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/Dropdown.tsx rename to web_app/src/components/ui/Dropdown/Dropdown.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/DropdownInnerMenu.tsx b/web_app/src/components/ui/Dropdown/DropdownInnerMenu.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/DropdownInnerMenu.tsx rename to web_app/src/components/ui/Dropdown/DropdownInnerMenu.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/DropdownItem.tsx b/web_app/src/components/ui/Dropdown/DropdownItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/DropdownItem.tsx rename to web_app/src/components/ui/Dropdown/DropdownItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/DropdownMenu.tsx b/web_app/src/components/ui/Dropdown/DropdownMenu.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/DropdownMenu.tsx rename to web_app/src/components/ui/Dropdown/DropdownMenu.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/DropdownToggle.tsx b/web_app/src/components/ui/Dropdown/DropdownToggle.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/DropdownToggle.tsx rename to web_app/src/components/ui/Dropdown/DropdownToggle.tsx diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownContext.ts b/web_app/src/components/ui/Dropdown/context/dropdownContext.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownContext.ts rename to web_app/src/components/ui/Dropdown/context/dropdownContext.ts diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownMenuContext.ts b/web_app/src/components/ui/Dropdown/context/dropdownMenuContext.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/context/dropdownMenuContext.ts rename to web_app/src/components/ui/Dropdown/context/dropdownMenuContext.ts diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/context/menuContext.ts b/web_app/src/components/ui/Dropdown/context/menuContext.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/context/menuContext.ts rename to web_app/src/components/ui/Dropdown/context/menuContext.ts diff --git a/web_app/Source_webapp/src/components/ui/Dropdown/index.tsx b/web_app/src/components/ui/Dropdown/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Dropdown/index.tsx rename to web_app/src/components/ui/Dropdown/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Form/FormContainer.tsx b/web_app/src/components/ui/Form/FormContainer.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Form/FormContainer.tsx rename to web_app/src/components/ui/Form/FormContainer.tsx diff --git a/web_app/Source_webapp/src/components/ui/Form/FormItem.tsx b/web_app/src/components/ui/Form/FormItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Form/FormItem.tsx rename to web_app/src/components/ui/Form/FormItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Form/context.ts b/web_app/src/components/ui/Form/context.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Form/context.ts rename to web_app/src/components/ui/Form/context.ts diff --git a/web_app/Source_webapp/src/components/ui/Form/index.tsx b/web_app/src/components/ui/Form/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Form/index.tsx rename to web_app/src/components/ui/Form/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Input/Input.tsx b/web_app/src/components/ui/Input/Input.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Input/Input.tsx rename to web_app/src/components/ui/Input/Input.tsx diff --git a/web_app/Source_webapp/src/components/ui/Input/index.tsx b/web_app/src/components/ui/Input/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Input/index.tsx rename to web_app/src/components/ui/Input/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/InputGroup/Addon.tsx b/web_app/src/components/ui/InputGroup/Addon.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/InputGroup/Addon.tsx rename to web_app/src/components/ui/InputGroup/Addon.tsx diff --git a/web_app/Source_webapp/src/components/ui/InputGroup/InputGroup.tsx b/web_app/src/components/ui/InputGroup/InputGroup.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/InputGroup/InputGroup.tsx rename to web_app/src/components/ui/InputGroup/InputGroup.tsx diff --git a/web_app/Source_webapp/src/components/ui/InputGroup/context.ts b/web_app/src/components/ui/InputGroup/context.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/InputGroup/context.ts rename to web_app/src/components/ui/InputGroup/context.ts diff --git a/web_app/Source_webapp/src/components/ui/InputGroup/index.tsx b/web_app/src/components/ui/InputGroup/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/InputGroup/index.tsx rename to web_app/src/components/ui/InputGroup/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/JsonDisplay/index.tsx b/web_app/src/components/ui/JsonDisplay/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/JsonDisplay/index.tsx rename to web_app/src/components/ui/JsonDisplay/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/Menu.tsx b/web_app/src/components/ui/Menu/Menu.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/Menu.tsx rename to web_app/src/components/ui/Menu/Menu.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/MenuCollapse.tsx b/web_app/src/components/ui/Menu/MenuCollapse.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/MenuCollapse.tsx rename to web_app/src/components/ui/Menu/MenuCollapse.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/MenuGroup.tsx b/web_app/src/components/ui/Menu/MenuGroup.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/MenuGroup.tsx rename to web_app/src/components/ui/Menu/MenuGroup.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/MenuItem.tsx b/web_app/src/components/ui/Menu/MenuItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/MenuItem.tsx rename to web_app/src/components/ui/Menu/MenuItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/context/collapseContext.tsx b/web_app/src/components/ui/Menu/context/collapseContext.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/context/collapseContext.tsx rename to web_app/src/components/ui/Menu/context/collapseContext.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/context/groupContext.tsx b/web_app/src/components/ui/Menu/context/groupContext.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/context/groupContext.tsx rename to web_app/src/components/ui/Menu/context/groupContext.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/context/menuContext.tsx b/web_app/src/components/ui/Menu/context/menuContext.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/context/menuContext.tsx rename to web_app/src/components/ui/Menu/context/menuContext.tsx diff --git a/web_app/Source_webapp/src/components/ui/Menu/index.tsx b/web_app/src/components/ui/Menu/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Menu/index.tsx rename to web_app/src/components/ui/Menu/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/MenuItem/index.tsx b/web_app/src/components/ui/MenuItem/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/MenuItem/index.tsx rename to web_app/src/components/ui/MenuItem/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/MqttComp/index.tsx b/web_app/src/components/ui/MqttComp/index.tsx similarity index 88% rename from web_app/Source_webapp/src/components/ui/MqttComp/index.tsx rename to web_app/src/components/ui/MqttComp/index.tsx index ddc13d0d..57fdfa6b 100644 --- a/web_app/Source_webapp/src/components/ui/MqttComp/index.tsx +++ b/web_app/src/components/ui/MqttComp/index.tsx @@ -8,7 +8,8 @@ const clients: Record = {} function convertToWebSocketUrl(url: string): string { const parsedUrl = new URL(url) const host = parsedUrl.host - return `wss://${host}:8081` + const port = import.meta.env.VITE_MQTT_WEBSOCKET_PORT || '8081' // Default WebSocket port + return `wss://${host}:${port}` } export const useMQTT = () => { @@ -42,16 +43,12 @@ export const useMQTT = () => { clients[mqttUrl] = client client.on('connect', () => { - console.log(`Connected to MQTT broker at ${mqttUrl}`) updateStatus(mqttUrl, 'connected') }) client.on('message', (topic, payload) => { let message = payload.toString() - /* console.log( - `Message from MQTT (${mqttUrl} - ${topic}):`, - message - ) */ + try { message = JSON.parse(message) if (messageHandlers[mqttUrl]?.[topic]) { @@ -72,7 +69,6 @@ export const useMQTT = () => { }) client.on('close', () => { - console.log(`Disconnected from MQTT broker at ${mqttUrl}`) updateStatus(mqttUrl, 'disconnected') delete clients[mqttUrl] }) @@ -91,7 +87,6 @@ export const useMQTT = () => { {status} {statusIcon[status]}

) - //console.log(`Status of ${mqttUrl}: ${status}`) } const subscribe = ( @@ -118,9 +113,6 @@ export const useMQTT = () => { ) updateStatus(mqttUrl, 'error') } else { - console.log( - `Subscribed to topic: ${topic} at ${mqttUrl}` - ) updateStatus(mqttUrl, 'connected') } }) @@ -138,7 +130,6 @@ export const useMQTT = () => { // Unsubscribe from the topic if no handlers are left client.unsubscribe(topic) delete messageHandlers[mqttUrl][topic] - console.log(`Unsubscribed from topic: ${topic} at ${mqttUrl}`) } // Clean up MQTT client if no topics are subscribed for this URL @@ -152,6 +143,3 @@ export const useMQTT = () => { return { subscribe, status } } - - - diff --git a/web_app/Source_webapp/src/components/ui/Notification/Notification.tsx b/web_app/src/components/ui/Notification/Notification.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Notification/Notification.tsx rename to web_app/src/components/ui/Notification/Notification.tsx diff --git a/web_app/Source_webapp/src/components/ui/Notification/index.tsx b/web_app/src/components/ui/Notification/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Notification/index.tsx rename to web_app/src/components/ui/Notification/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/Next.tsx b/web_app/src/components/ui/Pagination/Next.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/Next.tsx rename to web_app/src/components/ui/Pagination/Next.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/Pagers.tsx b/web_app/src/components/ui/Pagination/Pagers.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/Pagers.tsx rename to web_app/src/components/ui/Pagination/Pagers.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/Pagination.tsx b/web_app/src/components/ui/Pagination/Pagination.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/Pagination.tsx rename to web_app/src/components/ui/Pagination/Pagination.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/Prev.tsx b/web_app/src/components/ui/Pagination/Prev.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/Prev.tsx rename to web_app/src/components/ui/Pagination/Prev.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/Total.tsx b/web_app/src/components/ui/Pagination/Total.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/Total.tsx rename to web_app/src/components/ui/Pagination/Total.tsx diff --git a/web_app/Source_webapp/src/components/ui/Pagination/index.tsx b/web_app/src/components/ui/Pagination/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Pagination/index.tsx rename to web_app/src/components/ui/Pagination/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/PaginationList/PaginationList.tsx b/web_app/src/components/ui/PaginationList/PaginationList.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/PaginationList/PaginationList.tsx rename to web_app/src/components/ui/PaginationList/PaginationList.tsx diff --git a/web_app/Source_webapp/src/components/ui/Progress/Circle.tsx b/web_app/src/components/ui/Progress/Circle.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Progress/Circle.tsx rename to web_app/src/components/ui/Progress/Circle.tsx diff --git a/web_app/Source_webapp/src/components/ui/Progress/Line.tsx b/web_app/src/components/ui/Progress/Line.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Progress/Line.tsx rename to web_app/src/components/ui/Progress/Line.tsx diff --git a/web_app/Source_webapp/src/components/ui/Progress/Progress.tsx b/web_app/src/components/ui/Progress/Progress.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Progress/Progress.tsx rename to web_app/src/components/ui/Progress/Progress.tsx diff --git a/web_app/Source_webapp/src/components/ui/Progress/index.tsx b/web_app/src/components/ui/Progress/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Progress/index.tsx rename to web_app/src/components/ui/Progress/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Radio/Group.tsx b/web_app/src/components/ui/Radio/Group.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Radio/Group.tsx rename to web_app/src/components/ui/Radio/Group.tsx diff --git a/web_app/Source_webapp/src/components/ui/Radio/Radio.tsx b/web_app/src/components/ui/Radio/Radio.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Radio/Radio.tsx rename to web_app/src/components/ui/Radio/Radio.tsx diff --git a/web_app/Source_webapp/src/components/ui/Radio/context.tsx b/web_app/src/components/ui/Radio/context.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Radio/context.tsx rename to web_app/src/components/ui/Radio/context.tsx diff --git a/web_app/Source_webapp/src/components/ui/Radio/index.tsx b/web_app/src/components/ui/Radio/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Radio/index.tsx rename to web_app/src/components/ui/Radio/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/RangeCalendar/index.ts b/web_app/src/components/ui/RangeCalendar/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/RangeCalendar/index.ts rename to web_app/src/components/ui/RangeCalendar/index.ts diff --git a/web_app/Source_webapp/src/components/ui/ScrollBar/ScrollBar.tsx b/web_app/src/components/ui/ScrollBar/ScrollBar.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/ScrollBar/ScrollBar.tsx rename to web_app/src/components/ui/ScrollBar/ScrollBar.tsx diff --git a/web_app/Source_webapp/src/components/ui/ScrollBar/index.tsx b/web_app/src/components/ui/ScrollBar/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/ScrollBar/index.tsx rename to web_app/src/components/ui/ScrollBar/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Segment/Segment.tsx b/web_app/src/components/ui/Segment/Segment.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Segment/Segment.tsx rename to web_app/src/components/ui/Segment/Segment.tsx diff --git a/web_app/Source_webapp/src/components/ui/Segment/SegmentItem.tsx b/web_app/src/components/ui/Segment/SegmentItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Segment/SegmentItem.tsx rename to web_app/src/components/ui/Segment/SegmentItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Segment/context.ts b/web_app/src/components/ui/Segment/context.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Segment/context.ts rename to web_app/src/components/ui/Segment/context.ts diff --git a/web_app/Source_webapp/src/components/ui/Segment/index.tsx b/web_app/src/components/ui/Segment/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Segment/index.tsx rename to web_app/src/components/ui/Segment/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Select/Select.tsx b/web_app/src/components/ui/Select/Select.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Select/Select.tsx rename to web_app/src/components/ui/Select/Select.tsx diff --git a/web_app/Source_webapp/src/components/ui/Select/index.tsx b/web_app/src/components/ui/Select/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Select/index.tsx rename to web_app/src/components/ui/Select/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Skeleton/Skeleton.tsx b/web_app/src/components/ui/Skeleton/Skeleton.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Skeleton/Skeleton.tsx rename to web_app/src/components/ui/Skeleton/Skeleton.tsx diff --git a/web_app/Source_webapp/src/components/ui/Skeleton/index.tsx b/web_app/src/components/ui/Skeleton/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Skeleton/index.tsx rename to web_app/src/components/ui/Skeleton/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Spinner/Spinner.tsx b/web_app/src/components/ui/Spinner/Spinner.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Spinner/Spinner.tsx rename to web_app/src/components/ui/Spinner/Spinner.tsx diff --git a/web_app/Source_webapp/src/components/ui/Spinner/index.ts b/web_app/src/components/ui/Spinner/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Spinner/index.ts rename to web_app/src/components/ui/Spinner/index.ts diff --git a/web_app/Source_webapp/src/components/ui/StatusIcon/StatusIcon.tsx b/web_app/src/components/ui/StatusIcon/StatusIcon.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/StatusIcon/StatusIcon.tsx rename to web_app/src/components/ui/StatusIcon/StatusIcon.tsx diff --git a/web_app/Source_webapp/src/components/ui/StatusIcon/index.tsx b/web_app/src/components/ui/StatusIcon/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/StatusIcon/index.tsx rename to web_app/src/components/ui/StatusIcon/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Steps/StepItem.tsx b/web_app/src/components/ui/Steps/StepItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Steps/StepItem.tsx rename to web_app/src/components/ui/Steps/StepItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Steps/Steps.tsx b/web_app/src/components/ui/Steps/Steps.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Steps/Steps.tsx rename to web_app/src/components/ui/Steps/Steps.tsx diff --git a/web_app/Source_webapp/src/components/ui/Steps/index.tsx b/web_app/src/components/ui/Steps/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Steps/index.tsx rename to web_app/src/components/ui/Steps/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Switcher/Switcher.tsx b/web_app/src/components/ui/Switcher/Switcher.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Switcher/Switcher.tsx rename to web_app/src/components/ui/Switcher/Switcher.tsx diff --git a/web_app/Source_webapp/src/components/ui/Switcher/index.tsx b/web_app/src/components/ui/Switcher/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Switcher/index.tsx rename to web_app/src/components/ui/Switcher/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/Sorter.tsx b/web_app/src/components/ui/Table/Sorter.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/Sorter.tsx rename to web_app/src/components/ui/Table/Sorter.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/TBody.tsx b/web_app/src/components/ui/Table/TBody.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/TBody.tsx rename to web_app/src/components/ui/Table/TBody.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/TFoot.tsx b/web_app/src/components/ui/Table/TFoot.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/TFoot.tsx rename to web_app/src/components/ui/Table/TFoot.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/THead.tsx b/web_app/src/components/ui/Table/THead.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/THead.tsx rename to web_app/src/components/ui/Table/THead.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/Table.tsx b/web_app/src/components/ui/Table/Table.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/Table.tsx rename to web_app/src/components/ui/Table/Table.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/Td.tsx b/web_app/src/components/ui/Table/Td.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/Td.tsx rename to web_app/src/components/ui/Table/Td.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/Th.tsx b/web_app/src/components/ui/Table/Th.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/Th.tsx rename to web_app/src/components/ui/Table/Th.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/Tr.tsx b/web_app/src/components/ui/Table/Tr.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/Tr.tsx rename to web_app/src/components/ui/Table/Tr.tsx diff --git a/web_app/Source_webapp/src/components/ui/Table/index.tsx b/web_app/src/components/ui/Table/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Table/index.tsx rename to web_app/src/components/ui/Table/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tabs/TabContent.tsx b/web_app/src/components/ui/Tabs/TabContent.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/TabContent.tsx rename to web_app/src/components/ui/Tabs/TabContent.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tabs/TabList.tsx b/web_app/src/components/ui/Tabs/TabList.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/TabList.tsx rename to web_app/src/components/ui/Tabs/TabList.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tabs/TabNav.tsx b/web_app/src/components/ui/Tabs/TabNav.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/TabNav.tsx rename to web_app/src/components/ui/Tabs/TabNav.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tabs/Tabs.tsx b/web_app/src/components/ui/Tabs/Tabs.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/Tabs.tsx rename to web_app/src/components/ui/Tabs/Tabs.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tabs/context.ts b/web_app/src/components/ui/Tabs/context.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/context.ts rename to web_app/src/components/ui/Tabs/context.ts diff --git a/web_app/Source_webapp/src/components/ui/Tabs/index.tsx b/web_app/src/components/ui/Tabs/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tabs/index.tsx rename to web_app/src/components/ui/Tabs/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tag/Tag.tsx b/web_app/src/components/ui/Tag/Tag.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tag/Tag.tsx rename to web_app/src/components/ui/Tag/Tag.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tag/index.tsx b/web_app/src/components/ui/Tag/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tag/index.tsx rename to web_app/src/components/ui/Tag/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/AmPmInput.tsx b/web_app/src/components/ui/TimeInput/AmPmInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/AmPmInput.tsx rename to web_app/src/components/ui/TimeInput/AmPmInput.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/TimeInput.tsx b/web_app/src/components/ui/TimeInput/TimeInput.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/TimeInput.tsx rename to web_app/src/components/ui/TimeInput/TimeInput.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/TimeInputField.tsx b/web_app/src/components/ui/TimeInput/TimeInputField.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/TimeInputField.tsx rename to web_app/src/components/ui/TimeInput/TimeInputField.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/TimeInputRange.tsx b/web_app/src/components/ui/TimeInput/TimeInputRange.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/TimeInputRange.tsx rename to web_app/src/components/ui/TimeInput/TimeInputRange.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/index.tsx b/web_app/src/components/ui/TimeInput/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/index.tsx rename to web_app/src/components/ui/TimeInput/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/clamp.ts b/web_app/src/components/ui/TimeInput/utils/clamp.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/clamp.ts rename to web_app/src/components/ui/TimeInput/utils/clamp.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/createAmPmHandler.ts b/web_app/src/components/ui/TimeInput/utils/createAmPmHandler.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/createAmPmHandler.ts rename to web_app/src/components/ui/TimeInput/utils/createAmPmHandler.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/createTimeHandler.ts b/web_app/src/components/ui/TimeInput/utils/createTimeHandler.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/createTimeHandler.ts rename to web_app/src/components/ui/TimeInput/utils/createTimeHandler.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/getDate.ts b/web_app/src/components/ui/TimeInput/utils/getDate.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/getDate.ts rename to web_app/src/components/ui/TimeInput/utils/getDate.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/getTimeValues.ts b/web_app/src/components/ui/TimeInput/utils/getTimeValues.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/getTimeValues.ts rename to web_app/src/components/ui/TimeInput/utils/getTimeValues.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/index.ts b/web_app/src/components/ui/TimeInput/utils/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/index.ts rename to web_app/src/components/ui/TimeInput/utils/index.ts diff --git a/web_app/Source_webapp/src/components/ui/TimeInput/utils/padTime.ts b/web_app/src/components/ui/TimeInput/utils/padTime.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/TimeInput/utils/padTime.ts rename to web_app/src/components/ui/TimeInput/utils/padTime.ts diff --git a/web_app/Source_webapp/src/components/ui/Timeline/TimeLineItem.tsx b/web_app/src/components/ui/Timeline/TimeLineItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Timeline/TimeLineItem.tsx rename to web_app/src/components/ui/Timeline/TimeLineItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Timeline/Timeline.tsx b/web_app/src/components/ui/Timeline/Timeline.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Timeline/Timeline.tsx rename to web_app/src/components/ui/Timeline/Timeline.tsx diff --git a/web_app/Source_webapp/src/components/ui/Timeline/index.tsx b/web_app/src/components/ui/Timeline/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Timeline/index.tsx rename to web_app/src/components/ui/Timeline/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tooltip/Arrow.tsx b/web_app/src/components/ui/Tooltip/Arrow.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tooltip/Arrow.tsx rename to web_app/src/components/ui/Tooltip/Arrow.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tooltip/Tooltip.tsx b/web_app/src/components/ui/Tooltip/Tooltip.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tooltip/Tooltip.tsx rename to web_app/src/components/ui/Tooltip/Tooltip.tsx diff --git a/web_app/Source_webapp/src/components/ui/Tooltip/index.tsx b/web_app/src/components/ui/Tooltip/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Tooltip/index.tsx rename to web_app/src/components/ui/Tooltip/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/Upload/FileItem.tsx b/web_app/src/components/ui/Upload/FileItem.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Upload/FileItem.tsx rename to web_app/src/components/ui/Upload/FileItem.tsx diff --git a/web_app/Source_webapp/src/components/ui/Upload/Upload.tsx b/web_app/src/components/ui/Upload/Upload.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Upload/Upload.tsx rename to web_app/src/components/ui/Upload/Upload.tsx diff --git a/web_app/Source_webapp/src/components/ui/Upload/index.tsx b/web_app/src/components/ui/Upload/index.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/Upload/index.tsx rename to web_app/src/components/ui/Upload/index.tsx diff --git a/web_app/Source_webapp/src/components/ui/hooks/index.ts b/web_app/src/components/ui/hooks/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/index.ts rename to web_app/src/components/ui/hooks/index.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useCallbackRef.ts b/web_app/src/components/ui/hooks/useCallbackRef.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useCallbackRef.ts rename to web_app/src/components/ui/hooks/useCallbackRef.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useColorLevel.ts b/web_app/src/components/ui/hooks/useColorLevel.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useColorLevel.ts rename to web_app/src/components/ui/hooks/useColorLevel.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useControllableState.ts b/web_app/src/components/ui/hooks/useControllableState.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useControllableState.ts rename to web_app/src/components/ui/hooks/useControllableState.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useDidUpdate.ts b/web_app/src/components/ui/hooks/useDidUpdate.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useDidUpdate.ts rename to web_app/src/components/ui/hooks/useDidUpdate.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useMergeRef.ts b/web_app/src/components/ui/hooks/useMergeRef.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useMergeRef.ts rename to web_app/src/components/ui/hooks/useMergeRef.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useRootClose.ts b/web_app/src/components/ui/hooks/useRootClose.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useRootClose.ts rename to web_app/src/components/ui/hooks/useRootClose.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useTimeout.ts b/web_app/src/components/ui/hooks/useTimeout.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useTimeout.ts rename to web_app/src/components/ui/hooks/useTimeout.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useUncertainRef.ts b/web_app/src/components/ui/hooks/useUncertainRef.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useUncertainRef.ts rename to web_app/src/components/ui/hooks/useUncertainRef.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useUniqueId.ts b/web_app/src/components/ui/hooks/useUniqueId.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useUniqueId.ts rename to web_app/src/components/ui/hooks/useUniqueId.ts diff --git a/web_app/Source_webapp/src/components/ui/hooks/useWindowSize.ts b/web_app/src/components/ui/hooks/useWindowSize.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/hooks/useWindowSize.ts rename to web_app/src/components/ui/hooks/useWindowSize.ts diff --git a/web_app/Source_webapp/src/components/ui/index.ts b/web_app/src/components/ui/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/index.ts rename to web_app/src/components/ui/index.ts diff --git a/web_app/Source_webapp/src/components/ui/toast/ToastWrapper.tsx b/web_app/src/components/ui/toast/ToastWrapper.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/toast/ToastWrapper.tsx rename to web_app/src/components/ui/toast/ToastWrapper.tsx diff --git a/web_app/Source_webapp/src/components/ui/toast/index.ts b/web_app/src/components/ui/toast/index.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/toast/index.ts rename to web_app/src/components/ui/toast/index.ts diff --git a/web_app/Source_webapp/src/components/ui/toast/toast.tsx b/web_app/src/components/ui/toast/toast.tsx similarity index 100% rename from web_app/Source_webapp/src/components/ui/toast/toast.tsx rename to web_app/src/components/ui/toast/toast.tsx diff --git a/web_app/Source_webapp/src/components/ui/toast/transition.ts b/web_app/src/components/ui/toast/transition.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/toast/transition.ts rename to web_app/src/components/ui/toast/transition.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/arrayIndexOf.ts b/web_app/src/components/ui/utils/arrayIndexOf.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/arrayIndexOf.ts rename to web_app/src/components/ui/utils/arrayIndexOf.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/capitalize.ts b/web_app/src/components/ui/utils/capitalize.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/capitalize.ts rename to web_app/src/components/ui/utils/capitalize.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/chainedFunction.ts b/web_app/src/components/ui/utils/chainedFunction.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/chainedFunction.ts rename to web_app/src/components/ui/utils/chainedFunction.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/constants.ts b/web_app/src/components/ui/utils/constants.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/constants.ts rename to web_app/src/components/ui/utils/constants.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/createUid.ts b/web_app/src/components/ui/utils/createUid.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/createUid.ts rename to web_app/src/components/ui/utils/createUid.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/mapCloneElement.ts b/web_app/src/components/ui/utils/mapCloneElement.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/mapCloneElement.ts rename to web_app/src/components/ui/utils/mapCloneElement.ts diff --git a/web_app/Source_webapp/src/components/ui/utils/shallowEqual.ts b/web_app/src/components/ui/utils/shallowEqual.ts similarity index 100% rename from web_app/Source_webapp/src/components/ui/utils/shallowEqual.ts rename to web_app/src/components/ui/utils/shallowEqual.ts diff --git a/web_app/Source_webapp/src/configs/app.config.ts b/web_app/src/configs/app.config.ts similarity index 100% rename from web_app/Source_webapp/src/configs/app.config.ts rename to web_app/src/configs/app.config.ts diff --git a/web_app/Source_webapp/src/configs/chart.config.ts b/web_app/src/configs/chart.config.ts similarity index 100% rename from web_app/Source_webapp/src/configs/chart.config.ts rename to web_app/src/configs/chart.config.ts diff --git a/web_app/Source_webapp/src/configs/navigation-icon.config.tsx b/web_app/src/configs/navigation-icon.config.tsx similarity index 95% rename from web_app/Source_webapp/src/configs/navigation-icon.config.tsx rename to web_app/src/configs/navigation-icon.config.tsx index e83b5a16..f90ebe03 100644 --- a/web_app/Source_webapp/src/configs/navigation-icon.config.tsx +++ b/web_app/src/configs/navigation-icon.config.tsx @@ -11,6 +11,7 @@ import { HiUserGroup, HiGlobe, HiGlobeAlt, + HiPrinter, } from 'react-icons/hi' export type NavigationIcons = Record @@ -27,6 +28,7 @@ const navigationIcon: NavigationIcons = { groupSingleMenu: , groupCollapseMenu: , explorer: , + logs: , } export default navigationIcon diff --git a/web_app/Source_webapp/src/configs/navigation.config/index.ts b/web_app/src/configs/navigation.config/index.ts similarity index 100% rename from web_app/Source_webapp/src/configs/navigation.config/index.ts rename to web_app/src/configs/navigation.config/index.ts diff --git a/web_app/Source_webapp/src/configs/routes.config/authRoute.tsx b/web_app/src/configs/routes.config/authRoute.tsx similarity index 100% rename from web_app/Source_webapp/src/configs/routes.config/authRoute.tsx rename to web_app/src/configs/routes.config/authRoute.tsx diff --git a/web_app/Source_webapp/src/configs/routes.config/index.ts b/web_app/src/configs/routes.config/index.ts similarity index 100% rename from web_app/Source_webapp/src/configs/routes.config/index.ts rename to web_app/src/configs/routes.config/index.ts diff --git a/web_app/Source_webapp/src/configs/routes.config/routes.config.ts b/web_app/src/configs/routes.config/routes.config.ts similarity index 100% rename from web_app/Source_webapp/src/configs/routes.config/routes.config.ts rename to web_app/src/configs/routes.config/routes.config.ts diff --git a/web_app/Source_webapp/src/configs/theme.config.ts b/web_app/src/configs/theme.config.ts similarity index 100% rename from web_app/Source_webapp/src/configs/theme.config.ts rename to web_app/src/configs/theme.config.ts diff --git a/web_app/Source_webapp/src/constants/api.constant.ts b/web_app/src/constants/api.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/api.constant.ts rename to web_app/src/constants/api.constant.ts diff --git a/web_app/Source_webapp/src/constants/app.constant.ts b/web_app/src/constants/app.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/app.constant.ts rename to web_app/src/constants/app.constant.ts diff --git a/web_app/Source_webapp/src/constants/chart.constant.ts b/web_app/src/constants/chart.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/chart.constant.ts rename to web_app/src/constants/chart.constant.ts diff --git a/web_app/Source_webapp/src/constants/countries.constant.ts b/web_app/src/constants/countries.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/countries.constant.ts rename to web_app/src/constants/countries.constant.ts diff --git a/web_app/Source_webapp/src/constants/navigation.constant.ts b/web_app/src/constants/navigation.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/navigation.constant.ts rename to web_app/src/constants/navigation.constant.ts diff --git a/web_app/Source_webapp/src/constants/roles.constant.ts b/web_app/src/constants/roles.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/roles.constant.ts rename to web_app/src/constants/roles.constant.ts diff --git a/web_app/Source_webapp/src/constants/route.constant.ts b/web_app/src/constants/route.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/route.constant.ts rename to web_app/src/constants/route.constant.ts diff --git a/web_app/Source_webapp/src/constants/theme.constant.ts b/web_app/src/constants/theme.constant.ts similarity index 100% rename from web_app/Source_webapp/src/constants/theme.constant.ts rename to web_app/src/constants/theme.constant.ts diff --git a/web_app/Source_webapp/src/history.ts b/web_app/src/history.ts similarity index 100% rename from web_app/Source_webapp/src/history.ts rename to web_app/src/history.ts diff --git a/web_app/Source_webapp/src/hooks/useConnectWallet.ts b/web_app/src/hooks/useConnectWallet.ts similarity index 100% rename from web_app/Source_webapp/src/hooks/useConnectWallet.ts rename to web_app/src/hooks/useConnectWallet.ts diff --git a/web_app/Source_webapp/src/index.css b/web_app/src/index.css similarity index 100% rename from web_app/Source_webapp/src/index.css rename to web_app/src/index.css diff --git a/web_app/Source_webapp/src/locales/index.ts b/web_app/src/locales/index.ts similarity index 100% rename from web_app/Source_webapp/src/locales/index.ts rename to web_app/src/locales/index.ts diff --git a/web_app/Source_webapp/src/locales/lang/en.json b/web_app/src/locales/lang/en.json similarity index 100% rename from web_app/Source_webapp/src/locales/lang/en.json rename to web_app/src/locales/lang/en.json diff --git a/web_app/Source_webapp/src/locales/lang/fa.json b/web_app/src/locales/lang/fa.json similarity index 100% rename from web_app/Source_webapp/src/locales/lang/fa.json rename to web_app/src/locales/lang/fa.json diff --git a/web_app/Source_webapp/src/locales/locales.ts b/web_app/src/locales/locales.ts similarity index 100% rename from web_app/Source_webapp/src/locales/locales.ts rename to web_app/src/locales/locales.ts diff --git a/web_app/Source_webapp/src/main.tsx b/web_app/src/main.tsx similarity index 100% rename from web_app/Source_webapp/src/main.tsx rename to web_app/src/main.tsx diff --git a/admin_web_app/Source_webapp/src/mock/data/authData.ts b/web_app/src/mock/data/authData.ts similarity index 100% rename from admin_web_app/Source_webapp/src/mock/data/authData.ts rename to web_app/src/mock/data/authData.ts diff --git a/web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts b/web_app/src/mock/fakeApi/authFakeApi.ts similarity index 98% rename from web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts rename to web_app/src/mock/fakeApi/authFakeApi.ts index 7b5fe69d..255c3985 100644 --- a/web_app/Source_webapp/src/mock/fakeApi/authFakeApi.ts +++ b/web_app/src/mock/fakeApi/authFakeApi.ts @@ -9,7 +9,7 @@ export default function authFakeApi(server: Server, apiPrefix: string) { accountUserName: userName, password, }) - console.log('user', user) + if (user) { const { avatar, email, authority } = user return { diff --git a/admin_web_app/Source_webapp/src/mock/fakeApi/index.ts b/web_app/src/mock/fakeApi/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/mock/fakeApi/index.ts rename to web_app/src/mock/fakeApi/index.ts diff --git a/admin_web_app/Source_webapp/src/mock/index.ts b/web_app/src/mock/index.ts similarity index 100% rename from admin_web_app/Source_webapp/src/mock/index.ts rename to web_app/src/mock/index.ts diff --git a/admin_web_app/Source_webapp/src/mock/mock.ts b/web_app/src/mock/mock.ts similarity index 100% rename from admin_web_app/Source_webapp/src/mock/mock.ts rename to web_app/src/mock/mock.ts diff --git a/web_app/Source_webapp/src/provider/appkit-provider.tsx b/web_app/src/provider/appkit-provider.tsx similarity index 100% rename from web_app/Source_webapp/src/provider/appkit-provider.tsx rename to web_app/src/provider/appkit-provider.tsx diff --git a/web_app/Source_webapp/src/provider/contract-provider.tsx b/web_app/src/provider/contract-provider.tsx similarity index 100% rename from web_app/Source_webapp/src/provider/contract-provider.tsx rename to web_app/src/provider/contract-provider.tsx diff --git a/web_app/Source_webapp/src/services/AccountServices.ts b/web_app/src/services/AccountServices.ts similarity index 100% rename from web_app/Source_webapp/src/services/AccountServices.ts rename to web_app/src/services/AccountServices.ts diff --git a/web_app/Source_webapp/src/services/ApiService.ts b/web_app/src/services/ApiService.ts similarity index 100% rename from web_app/Source_webapp/src/services/ApiService.ts rename to web_app/src/services/ApiService.ts diff --git a/web_app/Source_webapp/src/services/AuthService.ts b/web_app/src/services/AuthService.ts similarity index 100% rename from web_app/Source_webapp/src/services/AuthService.ts rename to web_app/src/services/AuthService.ts diff --git a/web_app/Source_webapp/src/services/BaseService.ts b/web_app/src/services/BaseService.ts similarity index 100% rename from web_app/Source_webapp/src/services/BaseService.ts rename to web_app/src/services/BaseService.ts diff --git a/web_app/Source_webapp/src/services/ContractServices.ts b/web_app/src/services/ContractServices.ts similarity index 100% rename from web_app/Source_webapp/src/services/ContractServices.ts rename to web_app/src/services/ContractServices.ts diff --git a/web_app/Source_webapp/src/services/CrmService.ts b/web_app/src/services/CrmService.ts similarity index 100% rename from web_app/Source_webapp/src/services/CrmService.ts rename to web_app/src/services/CrmService.ts diff --git a/web_app/Source_webapp/src/services/DeviceApi.ts b/web_app/src/services/DeviceApi.ts similarity index 100% rename from web_app/Source_webapp/src/services/DeviceApi.ts rename to web_app/src/services/DeviceApi.ts diff --git a/web_app/src/services/LogApi.ts b/web_app/src/services/LogApi.ts new file mode 100644 index 00000000..2de76826 --- /dev/null +++ b/web_app/src/services/LogApi.ts @@ -0,0 +1,8 @@ +import ApiService from './ApiService' + +export async function apiGetLogs() { + return ApiService.fetchData({ + url: import.meta.env.VITE_URL + 'v1/logs', + method: 'get', + }) +} diff --git a/web_app/Source_webapp/src/services/MediaAPI.ts b/web_app/src/services/MediaAPI.ts similarity index 100% rename from web_app/Source_webapp/src/services/MediaAPI.ts rename to web_app/src/services/MediaAPI.ts diff --git a/web_app/Source_webapp/src/services/NotificationService.ts b/web_app/src/services/NotificationService.ts similarity index 100% rename from web_app/Source_webapp/src/services/NotificationService.ts rename to web_app/src/services/NotificationService.ts diff --git a/web_app/Source_webapp/src/services/RtkQueryService.ts b/web_app/src/services/RtkQueryService.ts similarity index 100% rename from web_app/Source_webapp/src/services/RtkQueryService.ts rename to web_app/src/services/RtkQueryService.ts diff --git a/web_app/Source_webapp/src/services/SalesService.ts b/web_app/src/services/SalesService.ts similarity index 100% rename from web_app/Source_webapp/src/services/SalesService.ts rename to web_app/src/services/SalesService.ts diff --git a/web_app/Source_webapp/src/services/ServiceAPI.ts b/web_app/src/services/ServiceAPI.ts similarity index 100% rename from web_app/Source_webapp/src/services/ServiceAPI.ts rename to web_app/src/services/ServiceAPI.ts diff --git a/web_app/Source_webapp/src/services/StorxApi.ts b/web_app/src/services/StorxApi.ts similarity index 100% rename from web_app/Source_webapp/src/services/StorxApi.ts rename to web_app/src/services/StorxApi.ts diff --git a/web_app/Source_webapp/src/services/Subscriptions.ts b/web_app/src/services/Subscriptions.ts similarity index 100% rename from web_app/Source_webapp/src/services/Subscriptions.ts rename to web_app/src/services/Subscriptions.ts diff --git a/web_app/Source_webapp/src/services/UserApi.ts b/web_app/src/services/UserApi.ts similarity index 100% rename from web_app/Source_webapp/src/services/UserApi.ts rename to web_app/src/services/UserApi.ts diff --git a/web_app/Source_webapp/src/store/contract/contract-data.ts b/web_app/src/store/contract/contract-data.ts similarity index 100% rename from web_app/Source_webapp/src/store/contract/contract-data.ts rename to web_app/src/store/contract/contract-data.ts diff --git a/web_app/Source_webapp/src/store/contract/useContractStore.ts b/web_app/src/store/contract/useContractStore.ts similarity index 94% rename from web_app/Source_webapp/src/store/contract/useContractStore.ts rename to web_app/src/store/contract/useContractStore.ts index ffd7d221..ca6b13f7 100644 --- a/web_app/Source_webapp/src/store/contract/useContractStore.ts +++ b/web_app/src/store/contract/useContractStore.ts @@ -103,7 +103,6 @@ export function createContractStore(walletProvider: any) { try { set({ loading: true }) const signer = await provider.getSigner() - console.log('Signer wallet address:', await signer.getAddress()) const tx = await ( deviceNFTManagemantContract.connect(signer) as any @@ -133,7 +132,7 @@ export function createContractStore(walletProvider: any) { try { set({ loading: true }) const signer = await provider.getSigner() - console.log('Signer wallet address:', await signer.getAddress()) + const tx = await ( identityOwnershipRegisterationContract.connect( signer @@ -154,7 +153,7 @@ export function createContractStore(walletProvider: any) { try { set({ loading: true }) const signer = await provider.getSigner() - console.log('Signer wallet address:', await signer.getAddress()) + const tx = await ( identityOwnershipRegisterationContract.connect( signer @@ -175,11 +174,7 @@ export function createContractStore(walletProvider: any) { try { set({ loading: true }) const signer = await provider.getSigner() - console.log('Signer wallet address:', await signer.getAddress()) - console.log( - 'ownershipAddress wallet address:', - ownershipAddress - ) + const tx = await ( identityOwnershipRegisterationContract.connect( signer diff --git a/web_app/Source_webapp/src/store/hook.ts b/web_app/src/store/hook.ts similarity index 100% rename from web_app/Source_webapp/src/store/hook.ts rename to web_app/src/store/hook.ts diff --git a/web_app/Source_webapp/src/store/index.ts b/web_app/src/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/store/index.ts rename to web_app/src/store/index.ts diff --git a/web_app/Source_webapp/src/store/rootReducer.ts b/web_app/src/store/rootReducer.ts similarity index 100% rename from web_app/Source_webapp/src/store/rootReducer.ts rename to web_app/src/store/rootReducer.ts diff --git a/web_app/Source_webapp/src/store/slices/auth/constants.ts b/web_app/src/store/slices/auth/constants.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/auth/constants.ts rename to web_app/src/store/slices/auth/constants.ts diff --git a/web_app/Source_webapp/src/store/slices/auth/index.ts b/web_app/src/store/slices/auth/index.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/auth/index.ts rename to web_app/src/store/slices/auth/index.ts diff --git a/web_app/Source_webapp/src/store/slices/auth/sessionSlice.ts b/web_app/src/store/slices/auth/sessionSlice.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/auth/sessionSlice.ts rename to web_app/src/store/slices/auth/sessionSlice.ts diff --git a/web_app/Source_webapp/src/store/slices/auth/userSlice.ts b/web_app/src/store/slices/auth/userSlice.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/auth/userSlice.ts rename to web_app/src/store/slices/auth/userSlice.ts diff --git a/web_app/Source_webapp/src/store/slices/base/commonSlice.ts b/web_app/src/store/slices/base/commonSlice.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/base/commonSlice.ts rename to web_app/src/store/slices/base/commonSlice.ts diff --git a/web_app/Source_webapp/src/store/slices/base/constants.ts b/web_app/src/store/slices/base/constants.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/base/constants.ts rename to web_app/src/store/slices/base/constants.ts diff --git a/web_app/Source_webapp/src/store/slices/base/index.ts b/web_app/src/store/slices/base/index.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/base/index.ts rename to web_app/src/store/slices/base/index.ts diff --git a/web_app/Source_webapp/src/store/slices/locale/index.ts b/web_app/src/store/slices/locale/index.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/locale/index.ts rename to web_app/src/store/slices/locale/index.ts diff --git a/web_app/Source_webapp/src/store/slices/locale/localeSlice.ts b/web_app/src/store/slices/locale/localeSlice.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/locale/localeSlice.ts rename to web_app/src/store/slices/locale/localeSlice.ts diff --git a/web_app/Source_webapp/src/store/slices/theme/themeSlice.ts b/web_app/src/store/slices/theme/themeSlice.ts similarity index 100% rename from web_app/Source_webapp/src/store/slices/theme/themeSlice.ts rename to web_app/src/store/slices/theme/themeSlice.ts diff --git a/web_app/Source_webapp/src/store/storeSetup.ts b/web_app/src/store/storeSetup.ts similarity index 100% rename from web_app/Source_webapp/src/store/storeSetup.ts rename to web_app/src/store/storeSetup.ts diff --git a/web_app/Source_webapp/src/store/user/useWalletStore.ts b/web_app/src/store/user/useWalletStore.ts similarity index 100% rename from web_app/Source_webapp/src/store/user/useWalletStore.ts rename to web_app/src/store/user/useWalletStore.ts diff --git a/web_app/Source_webapp/src/store/user/userRoleStore.ts b/web_app/src/store/user/userRoleStore.ts similarity index 100% rename from web_app/Source_webapp/src/store/user/userRoleStore.ts rename to web_app/src/store/user/userRoleStore.ts diff --git a/web_app/Source_webapp/src/utils/acronym.ts b/web_app/src/utils/acronym.ts similarity index 100% rename from web_app/Source_webapp/src/utils/acronym.ts rename to web_app/src/utils/acronym.ts diff --git a/web_app/Source_webapp/src/utils/components/ImageWithFallBack.tsx b/web_app/src/utils/components/ImageWithFallBack.tsx similarity index 100% rename from web_app/Source_webapp/src/utils/components/ImageWithFallBack.tsx rename to web_app/src/utils/components/ImageWithFallBack.tsx diff --git a/web_app/Source_webapp/src/utils/deepParseJson.ts b/web_app/src/utils/deepParseJson.ts similarity index 100% rename from web_app/Source_webapp/src/utils/deepParseJson.ts rename to web_app/src/utils/deepParseJson.ts diff --git a/web_app/Source_webapp/src/utils/growShrinkColor.ts b/web_app/src/utils/growShrinkColor.ts similarity index 100% rename from web_app/Source_webapp/src/utils/growShrinkColor.ts rename to web_app/src/utils/growShrinkColor.ts diff --git a/web_app/Source_webapp/src/utils/hoc/withHeaderItem.tsx b/web_app/src/utils/hoc/withHeaderItem.tsx similarity index 100% rename from web_app/Source_webapp/src/utils/hoc/withHeaderItem.tsx rename to web_app/src/utils/hoc/withHeaderItem.tsx diff --git a/web_app/Source_webapp/src/utils/hooks/useApi.ts b/web_app/src/utils/hooks/useApi.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useApi.ts rename to web_app/src/utils/hooks/useApi.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useAuth.ts b/web_app/src/utils/hooks/useAuth.ts similarity index 99% rename from web_app/Source_webapp/src/utils/hooks/useAuth.ts rename to web_app/src/utils/hooks/useAuth.ts index c244fa39..21892509 100644 --- a/web_app/Source_webapp/src/utils/hooks/useAuth.ts +++ b/web_app/src/utils/hooks/useAuth.ts @@ -89,7 +89,7 @@ function useAuth() { const signUp = async (values: SignUpCredential) => { try { const resp = await apiSignUp(values) - console.log(resp) + if (resp.data) { const token = resp.data.data.tokens.accessToken //dispatch(signInSuccess(token)) diff --git a/web_app/Source_webapp/src/utils/hooks/useAuthority.ts b/web_app/src/utils/hooks/useAuthority.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useAuthority.ts rename to web_app/src/utils/hooks/useAuthority.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useDarkmode.ts b/web_app/src/utils/hooks/useDarkmode.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useDarkmode.ts rename to web_app/src/utils/hooks/useDarkmode.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useDeleteService.ts b/web_app/src/utils/hooks/useDeleteService.ts similarity index 97% rename from web_app/Source_webapp/src/utils/hooks/useDeleteService.ts rename to web_app/src/utils/hooks/useDeleteService.ts index 1fa4d444..93d1db91 100644 --- a/web_app/Source_webapp/src/utils/hooks/useDeleteService.ts +++ b/web_app/src/utils/hooks/useDeleteService.ts @@ -9,7 +9,6 @@ export type ApiResponse = { message: string } - type BlocklyJson = { blocks: { languageVersion: number @@ -41,7 +40,6 @@ type Variable = { export function useDeleteService() { const { serviceId } = useParams() - console.log(serviceId) const { data: service, status } = useQuery({ queryKey: ['service'], diff --git a/web_app/Source_webapp/src/utils/hooks/useDirection.ts b/web_app/src/utils/hooks/useDirection.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useDirection.ts rename to web_app/src/utils/hooks/useDirection.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useEditService.ts b/web_app/src/utils/hooks/useEditService.ts similarity index 98% rename from web_app/Source_webapp/src/utils/hooks/useEditService.ts rename to web_app/src/utils/hooks/useEditService.ts index 58acf0a6..9d5cd50b 100644 --- a/web_app/Source_webapp/src/utils/hooks/useEditService.ts +++ b/web_app/src/utils/hooks/useEditService.ts @@ -62,7 +62,7 @@ export function useEditService() { //const { serviceId } = useParams() const { serviceId } = useAppSelector((state) => state.) - console.log(serviceId) + const { data: service, status } = useQuery({ queryKey: ['service'], diff --git a/web_app/Source_webapp/src/utils/hooks/useGetCurUserProfile.ts b/web_app/src/utils/hooks/useGetCurUserProfile.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useGetCurUserProfile.ts rename to web_app/src/utils/hooks/useGetCurUserProfile.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useGetDevices.ts b/web_app/src/utils/hooks/useGetDevices.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useGetDevices.ts rename to web_app/src/utils/hooks/useGetDevices.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useGetService.ts b/web_app/src/utils/hooks/useGetService.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useGetService.ts rename to web_app/src/utils/hooks/useGetService.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useGetServices.ts b/web_app/src/utils/hooks/useGetServices.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useGetServices.ts rename to web_app/src/utils/hooks/useGetServices.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useLocale.ts b/web_app/src/utils/hooks/useLocale.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useLocale.ts rename to web_app/src/utils/hooks/useLocale.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useMenuActive.ts b/web_app/src/utils/hooks/useMenuActive.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useMenuActive.ts rename to web_app/src/utils/hooks/useMenuActive.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useQuery.ts b/web_app/src/utils/hooks/useQuery.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useQuery.ts rename to web_app/src/utils/hooks/useQuery.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useResponsive.ts b/web_app/src/utils/hooks/useResponsive.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useResponsive.ts rename to web_app/src/utils/hooks/useResponsive.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useThemeClass.ts b/web_app/src/utils/hooks/useThemeClass.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useThemeClass.ts rename to web_app/src/utils/hooks/useThemeClass.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useTimeOutMessage.ts b/web_app/src/utils/hooks/useTimeOutMessage.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useTimeOutMessage.ts rename to web_app/src/utils/hooks/useTimeOutMessage.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useTwColorByName.ts b/web_app/src/utils/hooks/useTwColorByName.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useTwColorByName.ts rename to web_app/src/utils/hooks/useTwColorByName.ts diff --git a/web_app/Source_webapp/src/utils/hooks/useWaletAddress.ts b/web_app/src/utils/hooks/useWaletAddress.ts similarity index 100% rename from web_app/Source_webapp/src/utils/hooks/useWaletAddress.ts rename to web_app/src/utils/hooks/useWaletAddress.ts diff --git a/web_app/Source_webapp/src/utils/imageUtils.ts b/web_app/src/utils/imageUtils.ts similarity index 100% rename from web_app/Source_webapp/src/utils/imageUtils.ts rename to web_app/src/utils/imageUtils.ts diff --git a/web_app/Source_webapp/src/utils/ipfsUtils.ts b/web_app/src/utils/ipfsUtils.ts similarity index 100% rename from web_app/Source_webapp/src/utils/ipfsUtils.ts rename to web_app/src/utils/ipfsUtils.ts diff --git a/web_app/Source_webapp/src/utils/isLastChild.ts b/web_app/src/utils/isLastChild.ts similarity index 100% rename from web_app/Source_webapp/src/utils/isLastChild.ts rename to web_app/src/utils/isLastChild.ts diff --git a/web_app/Source_webapp/src/utils/paginate.ts b/web_app/src/utils/paginate.ts similarity index 100% rename from web_app/Source_webapp/src/utils/paginate.ts rename to web_app/src/utils/paginate.ts diff --git a/web_app/Source_webapp/src/utils/requiredFieldValidation.ts b/web_app/src/utils/requiredFieldValidation.ts similarity index 100% rename from web_app/Source_webapp/src/utils/requiredFieldValidation.ts rename to web_app/src/utils/requiredFieldValidation.ts diff --git a/web_app/Source_webapp/src/utils/shadeColor.ts b/web_app/src/utils/shadeColor.ts similarity index 100% rename from web_app/Source_webapp/src/utils/shadeColor.ts rename to web_app/src/utils/shadeColor.ts diff --git a/web_app/Source_webapp/src/utils/sortBy.ts b/web_app/src/utils/sortBy.ts similarity index 100% rename from web_app/Source_webapp/src/utils/sortBy.ts rename to web_app/src/utils/sortBy.ts diff --git a/web_app/Source_webapp/src/utils/wildCardSearch.ts b/web_app/src/utils/wildCardSearch.ts similarity index 100% rename from web_app/Source_webapp/src/utils/wildCardSearch.ts rename to web_app/src/utils/wildCardSearch.ts diff --git a/web_app/Source_webapp/src/views/Home.tsx b/web_app/src/views/Home.tsx similarity index 100% rename from web_app/Source_webapp/src/views/Home.tsx rename to web_app/src/views/Home.tsx diff --git a/web_app/Source_webapp/src/views/Views.tsx b/web_app/src/views/Views.tsx similarity index 100% rename from web_app/Source_webapp/src/views/Views.tsx rename to web_app/src/views/Views.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/ActivityLog.tsx b/web_app/src/views/account/ActivityLog/ActivityLog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/ActivityLog.tsx rename to web_app/src/views/account/ActivityLog/ActivityLog.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/components/Event.tsx b/web_app/src/views/account/ActivityLog/components/Event.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/components/Event.tsx rename to web_app/src/views/account/ActivityLog/components/Event.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/components/Log.tsx b/web_app/src/views/account/ActivityLog/components/Log.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/components/Log.tsx rename to web_app/src/views/account/ActivityLog/components/Log.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/components/LogFilter.tsx b/web_app/src/views/account/ActivityLog/components/LogFilter.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/components/LogFilter.tsx rename to web_app/src/views/account/ActivityLog/components/LogFilter.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/components/TimeLineAvatar.tsx b/web_app/src/views/account/ActivityLog/components/TimeLineAvatar.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/components/TimeLineAvatar.tsx rename to web_app/src/views/account/ActivityLog/components/TimeLineAvatar.tsx diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/constants.ts b/web_app/src/views/account/ActivityLog/constants.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/constants.ts rename to web_app/src/views/account/ActivityLog/constants.ts diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/index.ts b/web_app/src/views/account/ActivityLog/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/index.ts rename to web_app/src/views/account/ActivityLog/index.ts diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/store/activityLogSlice.ts b/web_app/src/views/account/ActivityLog/store/activityLogSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/store/activityLogSlice.ts rename to web_app/src/views/account/ActivityLog/store/activityLogSlice.ts diff --git a/web_app/Source_webapp/src/views/account/ActivityLog/store/index.ts b/web_app/src/views/account/ActivityLog/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/ActivityLog/store/index.ts rename to web_app/src/views/account/ActivityLog/store/index.ts diff --git a/web_app/Source_webapp/src/views/account/Invoice/Invoice.tsx b/web_app/src/views/account/Invoice/Invoice.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Invoice/Invoice.tsx rename to web_app/src/views/account/Invoice/Invoice.tsx diff --git a/web_app/Source_webapp/src/views/account/Invoice/components/ContentTable.tsx b/web_app/src/views/account/Invoice/components/ContentTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Invoice/components/ContentTable.tsx rename to web_app/src/views/account/Invoice/components/ContentTable.tsx diff --git a/web_app/Source_webapp/src/views/account/Invoice/components/InvoiceContent.tsx b/web_app/src/views/account/Invoice/components/InvoiceContent.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Invoice/components/InvoiceContent.tsx rename to web_app/src/views/account/Invoice/components/InvoiceContent.tsx diff --git a/web_app/Source_webapp/src/views/account/Invoice/index.ts b/web_app/src/views/account/Invoice/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/Invoice/index.ts rename to web_app/src/views/account/Invoice/index.ts diff --git a/web_app/Source_webapp/src/views/account/KycForm/KycForm.tsx b/web_app/src/views/account/KycForm/KycForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/KycForm.tsx rename to web_app/src/views/account/KycForm/KycForm.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/AccountReview.tsx b/web_app/src/views/account/KycForm/components/AccountReview.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/AccountReview.tsx rename to web_app/src/views/account/KycForm/components/AccountReview.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/AddressInfomation.tsx b/web_app/src/views/account/KycForm/components/AddressInfomation.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/AddressInfomation.tsx rename to web_app/src/views/account/KycForm/components/AddressInfomation.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/FinancialInformation.tsx b/web_app/src/views/account/KycForm/components/FinancialInformation.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/FinancialInformation.tsx rename to web_app/src/views/account/KycForm/components/FinancialInformation.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/FormStep.tsx b/web_app/src/views/account/KycForm/components/FormStep.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/FormStep.tsx rename to web_app/src/views/account/KycForm/components/FormStep.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/Identification.tsx b/web_app/src/views/account/KycForm/components/Identification.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/Identification.tsx rename to web_app/src/views/account/KycForm/components/Identification.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/components/PersonalInformation.tsx b/web_app/src/views/account/KycForm/components/PersonalInformation.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/components/PersonalInformation.tsx rename to web_app/src/views/account/KycForm/components/PersonalInformation.tsx diff --git a/web_app/Source_webapp/src/views/account/KycForm/constants.ts b/web_app/src/views/account/KycForm/constants.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/constants.ts rename to web_app/src/views/account/KycForm/constants.ts diff --git a/web_app/Source_webapp/src/views/account/KycForm/index.ts b/web_app/src/views/account/KycForm/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/index.ts rename to web_app/src/views/account/KycForm/index.ts diff --git a/web_app/Source_webapp/src/views/account/KycForm/store/index.ts b/web_app/src/views/account/KycForm/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/store/index.ts rename to web_app/src/views/account/KycForm/store/index.ts diff --git a/web_app/Source_webapp/src/views/account/KycForm/store/kycFormSlice.ts b/web_app/src/views/account/KycForm/store/kycFormSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/KycForm/store/kycFormSlice.ts rename to web_app/src/views/account/KycForm/store/kycFormSlice.ts diff --git a/web_app/Source_webapp/src/views/account/Settings/Settings.tsx b/web_app/src/views/account/Settings/Settings.tsx similarity index 96% rename from web_app/Source_webapp/src/views/account/Settings/Settings.tsx rename to web_app/src/views/account/Settings/Settings.tsx index 3eb56b56..baa4b8cc 100644 --- a/web_app/Source_webapp/src/views/account/Settings/Settings.tsx +++ b/web_app/src/views/account/Settings/Settings.tsx @@ -6,6 +6,7 @@ import { useNavigate, useLocation } from 'react-router-dom' import isEmpty from 'lodash/isEmpty' import { apiGetAccountSettingData } from '@/services/AccountServices' import CompanyDeveloperPage from './components/CompanyDeveloper' +import LogTable from './components/LogTable' const Profile = lazy(() => import('./components/Profile/Profile')) const Address = lazy(() => import('./components/Address')) @@ -46,6 +47,7 @@ const settingsMenu: Record< path: 'subscriptions', element: , }, + logs: { label: 'Activity/System logs', path: 'logs', element: }, storx: { label: 'StorX', path: 'storx', element: }, password: { label: 'Password', path: 'password', element: }, developer: { @@ -72,8 +74,6 @@ const Settings = () => { ) const onTabChange = (val: string) => { - console.log(val) - setCurrentTab(val) navigate(`/account/settings/${val}`) } diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Address.tsx b/web_app/src/views/account/Settings/components/Address.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/Address.tsx rename to web_app/src/views/account/Settings/components/Address.tsx index 44572d2e..0a7c7a57 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/Address.tsx +++ b/web_app/src/views/account/Settings/components/Address.tsx @@ -76,7 +76,6 @@ const Address = () => { placement: 'top-center', }) setSubmitting(false) - console.log('values', dbDatas) } return ( diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Billing.tsx b/web_app/src/views/account/Settings/components/Billing.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/Billing.tsx rename to web_app/src/views/account/Settings/components/Billing.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/BillingHistory.tsx b/web_app/src/views/account/Settings/components/BillingHistory.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/BillingHistory.tsx rename to web_app/src/views/account/Settings/components/BillingHistory.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/CompanyDeveloper/index.tsx b/web_app/src/views/account/Settings/components/CompanyDeveloper/index.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/CompanyDeveloper/index.tsx rename to web_app/src/views/account/Settings/components/CompanyDeveloper/index.tsx index 53ba5685..a0f57b5c 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/CompanyDeveloper/index.tsx +++ b/web_app/src/views/account/Settings/components/CompanyDeveloper/index.tsx @@ -105,7 +105,6 @@ export default function CompanyDeveloperPage() { placement: 'top-center', }) setSubmitting(false) - console.log('values', dbDatas) } const isDeveloper = checkUserHasRole('company_developer') diff --git a/web_app/Source_webapp/src/views/account/Settings/components/CountrySelector.tsx b/web_app/src/views/account/Settings/components/CountrySelector.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/CountrySelector.tsx rename to web_app/src/views/account/Settings/components/CountrySelector.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx b/web_app/src/views/account/Settings/components/CreditCardForm.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx rename to web_app/src/views/account/Settings/components/CreditCardForm.tsx index 84b5da4d..f18c9f3f 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/CreditCardForm.tsx +++ b/web_app/src/views/account/Settings/components/CreditCardForm.tsx @@ -109,7 +109,6 @@ const CreditCardForm = ({ card, type, onUpdate }: CreditCardFormProps) => { cardType: 'VISA', } } - console.log('updatedCard', updatedCard) onUpdate(updatedCard) } } diff --git a/web_app/Source_webapp/src/views/account/Settings/components/DeleteAccount.tsx b/web_app/src/views/account/Settings/components/DeleteAccount.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/DeleteAccount.tsx rename to web_app/src/views/account/Settings/components/DeleteAccount.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/DigitalIdentity.tsx b/web_app/src/views/account/Settings/components/DigitalIdentity.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/DigitalIdentity.tsx rename to web_app/src/views/account/Settings/components/DigitalIdentity.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/DigitalTwin.tsx b/web_app/src/views/account/Settings/components/DigitalTwin.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/DigitalTwin.tsx rename to web_app/src/views/account/Settings/components/DigitalTwin.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/FDSToken.tsx b/web_app/src/views/account/Settings/components/FDSToken.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/FDSToken.tsx rename to web_app/src/views/account/Settings/components/FDSToken.tsx index bdb54459..0d469dbe 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/FDSToken.tsx +++ b/web_app/src/views/account/Settings/components/FDSToken.tsx @@ -44,7 +44,6 @@ export default function FDSToken() { } const ethersProvider = new BrowserProvider(walletProvider as any) const accounts = await ethersProvider.send('eth_requestAccounts', []) - console.log('Selected accounts:', accounts) return accounts || [] } diff --git a/web_app/Source_webapp/src/views/account/Settings/components/FormDesription.tsx b/web_app/src/views/account/Settings/components/FormDesription.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/FormDesription.tsx rename to web_app/src/views/account/Settings/components/FormDesription.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/FormRow.tsx b/web_app/src/views/account/Settings/components/FormRow.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/FormRow.tsx rename to web_app/src/views/account/Settings/components/FormRow.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Integration.tsx b/web_app/src/views/account/Settings/components/Integration.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/Integration.tsx rename to web_app/src/views/account/Settings/components/Integration.tsx diff --git a/web_app/src/views/account/Settings/components/LogTable.tsx b/web_app/src/views/account/Settings/components/LogTable.tsx new file mode 100644 index 00000000..c04d50f8 --- /dev/null +++ b/web_app/src/views/account/Settings/components/LogTable.tsx @@ -0,0 +1,110 @@ +import { Card } from '@/components/ui' +import Table from '@/components/ui/Table' +import { useNavigate } from 'react-router-dom' +import { useState, useEffect } from 'react' +import { apiGetLogs } from '@/services/LogApi' + +import { useConfig } from '@/components/ui/ConfigProvider' +import useColorLevel from '@/components/ui/hooks/useColorLevel' + + +export type LogData = { + _id: string + message: string + timestamp: string + level: string + source?: string + serviceId?: string +} + +const useGetLogs = () => { + const [logs, setLogs] = useState([]) + const [loading, setLoading] = useState(true) + const [error, setError] = useState(null) + + const fetchLogs = async () => { + try { + setLoading(true) + const response = await apiGetLogs() + if (response && (response as any).data) { + setLogs((response as any).data.data || []) + } else { + setError('Failed to fetch logs') + } + } catch (err) { + setError('Failed to fetch logs') + console.error('Error fetching logs:', err) + } finally { + setLoading(false) + } + } + + useEffect(() => { + fetchLogs() + }, []) + + return { logs, loading, error, refetch: fetchLogs } +} + +const { Tr, Th, Td, THead, TBody } = Table + +const LogTable = () => { + const navigate = useNavigate() + const { logs, loading, error, refetch } = useGetLogs() + + const { themeColor, controlSize, primaryColorLevel } = useConfig() + const [increaseLevel, decreaseLevel] = useColorLevel( + primaryColorLevel as any + ) + + return ( + +
+ + + + + + + + + + {loading ? ( + + + + ) : error ? ( + + + + ) : logs && logs.length > 0 ? ( + logs.slice(0, 10).map((log: LogData, i: number) => ( + + + + + + )) + ) : ( + + + + )} + +
MessageTimestampLevel
+ Loading logs... +
+ {error} +
{log.message} + {new Date( + log.timestamp + ).toLocaleString()} + {log.level}
+ No logs available. +
+
+
+ ) +} + +export default LogTable diff --git a/admin_web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx b/web_app/src/views/account/Settings/components/NotificationSetting.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx rename to web_app/src/views/account/Settings/components/NotificationSetting.tsx index 813fe67f..4c527d84 100644 --- a/admin_web_app/Source_webapp/src/views/account/Settings/components/NotificationSetting.tsx +++ b/web_app/src/views/account/Settings/components/NotificationSetting.tsx @@ -166,7 +166,6 @@ const NotificationSetting = ({ } ) setSubmitting(false) - console.log(values) } return ( diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Password.tsx b/web_app/src/views/account/Settings/components/Password.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/Password.tsx rename to web_app/src/views/account/Settings/components/Password.tsx index 5ddef3b1..e39b28ff 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/Password.tsx +++ b/web_app/src/views/account/Settings/components/Password.tsx @@ -51,7 +51,6 @@ const Password = () => { async function fetchData() { const resData = (await apiGetMyProfile()) as any setApiData(resData.data.data) - console.log(resData.data.data) } fetchData() }, []) @@ -103,7 +102,6 @@ const Password = () => { } setSubmitting(false) - console.log('values', values) } return ( diff --git a/web_app/Source_webapp/src/views/account/Settings/components/PhoneNumberSelector.tsx b/web_app/src/views/account/Settings/components/PhoneNumberSelector.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/PhoneNumberSelector.tsx rename to web_app/src/views/account/Settings/components/PhoneNumberSelector.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Profile/Profile.tsx b/web_app/src/views/account/Settings/components/Profile/Profile.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/Profile/Profile.tsx rename to web_app/src/views/account/Settings/components/Profile/Profile.tsx index 6f824ed3..c8481dd8 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/Profile/Profile.tsx +++ b/web_app/src/views/account/Settings/components/Profile/Profile.tsx @@ -196,8 +196,6 @@ const Profile = ({}: ProfileProps) => { } ) if (resData.data.data.timezone) { - console.log(resData.data.data.timezone) - setSelectedTimeZone({ label: resData.data.data.timezone, value: resData.data.data.timezone, diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Profile/style.scss b/web_app/src/views/account/Settings/components/Profile/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/Profile/style.scss rename to web_app/src/views/account/Settings/components/Profile/style.scss diff --git a/web_app/Source_webapp/src/views/account/Settings/components/ReChart.tsx b/web_app/src/views/account/Settings/components/ReChart.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/ReChart.tsx rename to web_app/src/views/account/Settings/components/ReChart.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/SelectDeviceForNFT.tsx b/web_app/src/views/account/Settings/components/SelectDeviceForNFT.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/SelectDeviceForNFT.tsx rename to web_app/src/views/account/Settings/components/SelectDeviceForNFT.tsx index 66f36ad1..34e88b8d 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/SelectDeviceForNFT.tsx +++ b/web_app/src/views/account/Settings/components/SelectDeviceForNFT.tsx @@ -37,7 +37,6 @@ export default function SelectDeviceForNFT() { const imageUrl = URL.createObjectURL(processedImage) setProcessedImagePreview(imageUrl) - // Step 2: Upload metadata to IPFS const ipfsMetadataURL = await uploadNFTToIPFS({ name: String(atob(device.deviceEncryptedId)), @@ -178,7 +177,7 @@ export default function SelectDeviceForNFT() { try { setIsLoading(true) const deviceRes = (await apiGetDevices(userId || '')) as any - console.log('deviceRes.data.data:', deviceRes.data.data) + setDevices(deviceRes.data.data) } finally { setIsLoading(false) diff --git a/web_app/Source_webapp/src/views/account/Settings/components/StorX/StorX.tsx b/web_app/src/views/account/Settings/components/StorX/StorX.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/StorX/StorX.tsx rename to web_app/src/views/account/Settings/components/StorX/StorX.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/StorX/sotrxLogo.tsx b/web_app/src/views/account/Settings/components/StorX/sotrxLogo.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/StorX/sotrxLogo.tsx rename to web_app/src/views/account/Settings/components/StorX/sotrxLogo.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/StorX/style.scss b/web_app/src/views/account/Settings/components/StorX/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/StorX/style.scss rename to web_app/src/views/account/Settings/components/StorX/style.scss diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Subscriptions.tsx b/web_app/src/views/account/Settings/components/Subscriptions.tsx similarity index 99% rename from web_app/Source_webapp/src/views/account/Settings/components/Subscriptions.tsx rename to web_app/src/views/account/Settings/components/Subscriptions.tsx index b9e32904..d86dfea2 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/Subscriptions.tsx +++ b/web_app/src/views/account/Settings/components/Subscriptions.tsx @@ -58,8 +58,6 @@ export default function Subscriptions() { } async function handleChangeEmailSubscribe(state: boolean) { - console.log('state:', state) - try { setApiLoading(true) const res = await apiSetMyEmailSubscription(state) diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Table2D.tsx b/web_app/src/views/account/Settings/components/Table2D.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/Table2D.tsx rename to web_app/src/views/account/Settings/components/Table2D.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/TimezoneSelector.tsx b/web_app/src/views/account/Settings/components/TimezoneSelector.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/TimezoneSelector.tsx rename to web_app/src/views/account/Settings/components/TimezoneSelector.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/UserNFTAssets.tsx b/web_app/src/views/account/Settings/components/UserNFTAssets.tsx similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/UserNFTAssets.tsx rename to web_app/src/views/account/Settings/components/UserNFTAssets.tsx diff --git a/web_app/Source_webapp/src/views/account/Settings/components/Verify.tsx b/web_app/src/views/account/Settings/components/Verify.tsx similarity index 98% rename from web_app/Source_webapp/src/views/account/Settings/components/Verify.tsx rename to web_app/src/views/account/Settings/components/Verify.tsx index 9232823b..9332dfeb 100644 --- a/web_app/Source_webapp/src/views/account/Settings/components/Verify.tsx +++ b/web_app/src/views/account/Settings/components/Verify.tsx @@ -15,7 +15,6 @@ const Verify = () => { async function fetchData() { const resData = (await apiGetMyProfile()) as any setApiData(resData.data.data) - console.log(resData.data.data) setLoading(false) } fetchData() diff --git a/web_app/Source_webapp/src/views/account/Settings/components/countrys.json b/web_app/src/views/account/Settings/components/countrys.json similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/countrys.json rename to web_app/src/views/account/Settings/components/countrys.json diff --git a/web_app/Source_webapp/src/views/account/Settings/components/timezone.json b/web_app/src/views/account/Settings/components/timezone.json similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/components/timezone.json rename to web_app/src/views/account/Settings/components/timezone.json diff --git a/web_app/Source_webapp/src/views/account/Settings/index.ts b/web_app/src/views/account/Settings/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/account/Settings/index.ts rename to web_app/src/views/account/Settings/index.ts diff --git a/web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPassword.tsx b/web_app/src/views/auth/ForgotPassword/ForgotPassword.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPassword.tsx rename to web_app/src/views/auth/ForgotPassword/ForgotPassword.tsx diff --git a/web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx b/web_app/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx rename to web_app/src/views/auth/ForgotPassword/ForgotPasswordForm.tsx diff --git a/web_app/Source_webapp/src/views/auth/ForgotPassword/index.tsx b/web_app/src/views/auth/ForgotPassword/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ForgotPassword/index.tsx rename to web_app/src/views/auth/ForgotPassword/index.tsx diff --git a/web_app/Source_webapp/src/views/auth/Message/SignUpSuccess.tsx b/web_app/src/views/auth/Message/SignUpSuccess.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/Message/SignUpSuccess.tsx rename to web_app/src/views/auth/Message/SignUpSuccess.tsx diff --git a/web_app/Source_webapp/src/views/auth/Message/index.tsx b/web_app/src/views/auth/Message/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/Message/index.tsx rename to web_app/src/views/auth/Message/index.tsx diff --git a/web_app/Source_webapp/src/views/auth/ResetPassword/ResetPassword.tsx b/web_app/src/views/auth/ResetPassword/ResetPassword.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ResetPassword/ResetPassword.tsx rename to web_app/src/views/auth/ResetPassword/ResetPassword.tsx diff --git a/web_app/Source_webapp/src/views/auth/ResetPassword/ResetPasswordForm.tsx b/web_app/src/views/auth/ResetPassword/ResetPasswordForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ResetPassword/ResetPasswordForm.tsx rename to web_app/src/views/auth/ResetPassword/ResetPasswordForm.tsx diff --git a/web_app/Source_webapp/src/views/auth/ResetPassword/index.tsx b/web_app/src/views/auth/ResetPassword/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/ResetPassword/index.tsx rename to web_app/src/views/auth/ResetPassword/index.tsx diff --git a/web_app/Source_webapp/src/views/auth/SignIn/SignIn.tsx b/web_app/src/views/auth/SignIn/SignIn.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignIn/SignIn.tsx rename to web_app/src/views/auth/SignIn/SignIn.tsx diff --git a/web_app/Source_webapp/src/views/auth/SignIn/SignInForm.tsx b/web_app/src/views/auth/SignIn/SignInForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignIn/SignInForm.tsx rename to web_app/src/views/auth/SignIn/SignInForm.tsx diff --git a/web_app/Source_webapp/src/views/auth/SignIn/index.ts b/web_app/src/views/auth/SignIn/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignIn/index.ts rename to web_app/src/views/auth/SignIn/index.ts diff --git a/web_app/Source_webapp/src/views/auth/SignUp/SignUp.tsx b/web_app/src/views/auth/SignUp/SignUp.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignUp/SignUp.tsx rename to web_app/src/views/auth/SignUp/SignUp.tsx diff --git a/web_app/Source_webapp/src/views/auth/SignUp/SignUpForm.tsx b/web_app/src/views/auth/SignUp/SignUpForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignUp/SignUpForm.tsx rename to web_app/src/views/auth/SignUp/SignUpForm.tsx diff --git a/web_app/Source_webapp/src/views/auth/SignUp/index.ts b/web_app/src/views/auth/SignUp/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/auth/SignUp/index.ts rename to web_app/src/views/auth/SignUp/index.ts diff --git a/web_app/Source_webapp/src/views/building/BuildingPage.tsx b/web_app/src/views/building/BuildingPage.tsx similarity index 99% rename from web_app/Source_webapp/src/views/building/BuildingPage.tsx rename to web_app/src/views/building/BuildingPage.tsx index aa84135c..b74b2b92 100644 --- a/web_app/Source_webapp/src/views/building/BuildingPage.tsx +++ b/web_app/src/views/building/BuildingPage.tsx @@ -33,7 +33,7 @@ export default function BuildingPage() { setBuildings(res.data.data) setLoading(false) } catch (error) { - console.log(error) + console.error(error) setLoading(false) } } diff --git a/web_app/Source_webapp/src/views/building/index.ts b/web_app/src/views/building/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/building/index.ts rename to web_app/src/views/building/index.ts diff --git a/web_app/Source_webapp/src/views/building/pages/createedit/CreateEditBuilding.tsx b/web_app/src/views/building/pages/createedit/CreateEditBuilding.tsx similarity index 99% rename from web_app/Source_webapp/src/views/building/pages/createedit/CreateEditBuilding.tsx rename to web_app/src/views/building/pages/createedit/CreateEditBuilding.tsx index 70491ba6..977f6b3d 100644 --- a/web_app/Source_webapp/src/views/building/pages/createedit/CreateEditBuilding.tsx +++ b/web_app/src/views/building/pages/createedit/CreateEditBuilding.tsx @@ -399,9 +399,6 @@ export function CreateEditBuilding() { function replaceEncryptedId(data: any) { if (data && typeof data === 'object') { // Debugging: log data at each level - console.log('Inspecting data:', data) - - console.log('Gool:', myDevices) // Check if the current object has a 'device' property if (data.device) { @@ -411,9 +408,6 @@ export function CreateEditBuilding() { ) if (foundDevice) { data.device = foundDevice._id - console.log( - `Replaced deviceEncryptedId with _id for: ${data.device}` - ) } } @@ -433,7 +427,6 @@ export function CreateEditBuilding() { } useEffect(() => { - dispatch(setSideNavCollapse(true)) async function fetchData() { let functionLocalMyDevices = undefined @@ -521,7 +514,6 @@ export function CreateEditBuilding() { functionLocalMyDevices ) - setBuildData(updatedBuildData) saveAllLastData(updatedBuildData) @@ -866,12 +858,6 @@ export function CreateEditBuilding() { value={buildData.name} onChange={handleInputChange} /> - {/* */}

)} diff --git a/web_app/Source_webapp/src/views/building/pages/createedit/index.ts b/web_app/src/views/building/pages/createedit/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/building/pages/createedit/index.ts rename to web_app/src/views/building/pages/createedit/index.ts diff --git a/web_app/Source_webapp/src/views/building/pages/createedit/style.scss b/web_app/src/views/building/pages/createedit/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/building/pages/createedit/style.scss rename to web_app/src/views/building/pages/createedit/style.scss diff --git a/web_app/Source_webapp/src/views/building/pages/details/BuildingDetails.tsx b/web_app/src/views/building/pages/details/BuildingDetails.tsx similarity index 99% rename from web_app/Source_webapp/src/views/building/pages/details/BuildingDetails.tsx rename to web_app/src/views/building/pages/details/BuildingDetails.tsx index 94186e88..88bbb08d 100644 --- a/web_app/Source_webapp/src/views/building/pages/details/BuildingDetails.tsx +++ b/web_app/src/views/building/pages/details/BuildingDetails.tsx @@ -22,7 +22,7 @@ export default function BuildingDetails() { const { subscribe } = useMQTT() const themeColor = useAppSelector((state) => state.theme.themeColor) const timersRef = useRef>({}) - + useEffect(() => { async function fetchData() { setLoading(true) @@ -110,7 +110,6 @@ export default function BuildingDetails() { String(message.from) === String(device.deviceEncryptedId) ) { - console.log('Shared devices set') setDevicePayloads((prevData) => ({ ...prevData, [String(message.from)]: { diff --git a/web_app/Source_webapp/src/views/building/pages/details/index.ts b/web_app/src/views/building/pages/details/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/building/pages/details/index.ts rename to web_app/src/views/building/pages/details/index.ts diff --git a/web_app/Source_webapp/src/views/building/pages/details/style.scss b/web_app/src/views/building/pages/details/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/building/pages/details/style.scss rename to web_app/src/views/building/pages/details/style.scss diff --git a/web_app/Source_webapp/src/views/building/scripts/utils.ts b/web_app/src/views/building/scripts/utils.ts similarity index 100% rename from web_app/Source_webapp/src/views/building/scripts/utils.ts rename to web_app/src/views/building/scripts/utils.ts diff --git a/web_app/Source_webapp/src/views/commitment/CommitmentTable.tsx b/web_app/src/views/commitment/CommitmentTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/commitment/CommitmentTable.tsx rename to web_app/src/views/commitment/CommitmentTable.tsx diff --git a/web_app/Source_webapp/src/views/commitment/index.tsx b/web_app/src/views/commitment/index.tsx similarity index 99% rename from web_app/Source_webapp/src/views/commitment/index.tsx rename to web_app/src/views/commitment/index.tsx index 2e6a7c81..fe9efb8d 100644 --- a/web_app/Source_webapp/src/views/commitment/index.tsx +++ b/web_app/src/views/commitment/index.tsx @@ -95,8 +95,6 @@ export default function CommitmentPage() { const file = event.target.files[0] if (!file || file.type !== 'application/json') { - console.log('Maghol 55') - toast.push( Please upload a valid JSON file. @@ -114,8 +112,6 @@ export default function CommitmentPage() { const reader = new FileReader() reader.onload = (e) => { if (!e.target?.result) { - console.log('Maghol') - toast.push( Please upload a valid JSON file. @@ -172,8 +168,6 @@ export default function CommitmentPage() { { placement: 'top-center' } ) } catch (error) { - console.log('Maghol 22') - toast.push( Please upload a valid JSON file. @@ -192,8 +186,6 @@ export default function CommitmentPage() { setSubmitting: (isSubmitting: boolean) => void ) => { if (!values.commitmentData) { - console.log('Maghol 33') - toast.push( Please upload a valid JSON file. @@ -219,8 +211,6 @@ export default function CommitmentPage() { const jsonText = e.target?.result as string - console.log('Maghol:', jsonText) - let parsedJson try { parsedJson = JSON.parse(jsonText) @@ -310,7 +300,7 @@ export default function CommitmentPage() { ) }, 5000) } catch (err) { - console.log('err:', err) + console.error('err:', err) toast.push( diff --git a/web_app/Source_webapp/src/views/crm/Calendar/Calendar.tsx b/web_app/src/views/crm/Calendar/Calendar.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Calendar/Calendar.tsx rename to web_app/src/views/crm/Calendar/Calendar.tsx diff --git a/web_app/Source_webapp/src/views/crm/Calendar/components/EventDialog.tsx b/web_app/src/views/crm/Calendar/components/EventDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Calendar/components/EventDialog.tsx rename to web_app/src/views/crm/Calendar/components/EventDialog.tsx diff --git a/web_app/Source_webapp/src/views/crm/Calendar/index.ts b/web_app/src/views/crm/Calendar/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Calendar/index.ts rename to web_app/src/views/crm/Calendar/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Calendar/store/calendarSlice.ts b/web_app/src/views/crm/Calendar/store/calendarSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Calendar/store/calendarSlice.ts rename to web_app/src/views/crm/Calendar/store/calendarSlice.ts diff --git a/web_app/Source_webapp/src/views/crm/Calendar/store/index.ts b/web_app/src/views/crm/Calendar/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Calendar/store/index.ts rename to web_app/src/views/crm/Calendar/store/index.ts diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/CrmDashboard.tsx b/web_app/src/views/crm/CrmDashboard/CrmDashboard.tsx similarity index 98% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/CrmDashboard.tsx rename to web_app/src/views/crm/CrmDashboard/CrmDashboard.tsx index fa8c297c..9224cd26 100644 --- a/web_app/Source_webapp/src/views/crm/CrmDashboard/CrmDashboard.tsx +++ b/web_app/src/views/crm/CrmDashboard/CrmDashboard.tsx @@ -63,8 +63,6 @@ const CrmDashboard = () => { isValidCoordinate(item?.location?.coordinates) ) - console.log('newPositions:', newPositions) - setPositions([...newPositions, ...generateParisData(200, 200)]) setMapLoading(false) } diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/ActiveUsers.tsx b/web_app/src/views/crm/CrmDashboard/components/ActiveUsers.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/ActiveUsers.tsx rename to web_app/src/views/crm/CrmDashboard/components/ActiveUsers.tsx diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/LeadByCountries.tsx b/web_app/src/views/crm/CrmDashboard/components/LeadByCountries.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/LeadByCountries.tsx rename to web_app/src/views/crm/CrmDashboard/components/LeadByCountries.tsx diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/Leads.tsx b/web_app/src/views/crm/CrmDashboard/components/Leads.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/Leads.tsx rename to web_app/src/views/crm/CrmDashboard/components/Leads.tsx diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/ServiceTable.tsx b/web_app/src/views/crm/CrmDashboard/components/ServiceTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/ServiceTable.tsx rename to web_app/src/views/crm/CrmDashboard/components/ServiceTable.tsx diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/Statistic.tsx b/web_app/src/views/crm/CrmDashboard/components/Statistic.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/Statistic.tsx rename to web_app/src/views/crm/CrmDashboard/components/Statistic.tsx diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/UserRatio.tsx b/web_app/src/views/crm/CrmDashboard/components/UserRatio.tsx similarity index 98% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/UserRatio.tsx rename to web_app/src/views/crm/CrmDashboard/components/UserRatio.tsx index aa7e0c36..ca220cac 100644 --- a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/UserRatio.tsx +++ b/web_app/src/views/crm/CrmDashboard/components/UserRatio.tsx @@ -62,7 +62,6 @@ const EmailSent = ({ data = {}, className }: EmailSentProps) => { ) { AddressValues?.forEach((item) => { if (resData?.data?.data?.address[item]) { - console.log(item) nowPercent = nowPercent + 7.5 } }) diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/components/style.css b/web_app/src/views/crm/CrmDashboard/components/style.css similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/components/style.css rename to web_app/src/views/crm/CrmDashboard/components/style.css diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/index.ts b/web_app/src/views/crm/CrmDashboard/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/index.ts rename to web_app/src/views/crm/CrmDashboard/index.ts diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts b/web_app/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts rename to web_app/src/views/crm/CrmDashboard/store/crmDashboardSlice.ts diff --git a/web_app/Source_webapp/src/views/crm/CrmDashboard/store/index.ts b/web_app/src/views/crm/CrmDashboard/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CrmDashboard/store/index.ts rename to web_app/src/views/crm/CrmDashboard/store/index.ts diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/CustomerDetail.tsx b/web_app/src/views/crm/CustomerDetail/CustomerDetail.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/CustomerDetail.tsx rename to web_app/src/views/crm/CustomerDetail/CustomerDetail.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx b/web_app/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx rename to web_app/src/views/crm/CustomerDetail/components/CurrentSubscription.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/CustomerProfile.tsx b/web_app/src/views/crm/CustomerDetail/components/CustomerProfile.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/CustomerProfile.tsx rename to web_app/src/views/crm/CustomerDetail/components/CustomerProfile.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx b/web_app/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx rename to web_app/src/views/crm/CustomerDetail/components/DeletePaymentMethod.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx b/web_app/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx rename to web_app/src/views/crm/CustomerDetail/components/EditCustomerProfile.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx b/web_app/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx rename to web_app/src/views/crm/CustomerDetail/components/EditPaymentMethod.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentHistory.tsx b/web_app/src/views/crm/CustomerDetail/components/PaymentHistory.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentHistory.tsx rename to web_app/src/views/crm/CustomerDetail/components/PaymentHistory.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentMethods.tsx b/web_app/src/views/crm/CustomerDetail/components/PaymentMethods.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/components/PaymentMethods.tsx rename to web_app/src/views/crm/CustomerDetail/components/PaymentMethods.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/index.ts b/web_app/src/views/crm/CustomerDetail/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/index.ts rename to web_app/src/views/crm/CustomerDetail/index.ts diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/store/customerDetailSlice.ts b/web_app/src/views/crm/CustomerDetail/store/customerDetailSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/store/customerDetailSlice.ts rename to web_app/src/views/crm/CustomerDetail/store/customerDetailSlice.ts diff --git a/web_app/Source_webapp/src/views/crm/CustomerDetail/store/index.ts b/web_app/src/views/crm/CustomerDetail/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerDetail/store/index.ts rename to web_app/src/views/crm/CustomerDetail/store/index.ts diff --git a/web_app/Source_webapp/src/views/crm/CustomerForm/CustomerForm.tsx b/web_app/src/views/crm/CustomerForm/CustomerForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerForm/CustomerForm.tsx rename to web_app/src/views/crm/CustomerForm/CustomerForm.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerForm/PersonalInfoForm.tsx b/web_app/src/views/crm/CustomerForm/PersonalInfoForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerForm/PersonalInfoForm.tsx rename to web_app/src/views/crm/CustomerForm/PersonalInfoForm.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerForm/SocialLinkForm.tsx b/web_app/src/views/crm/CustomerForm/SocialLinkForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerForm/SocialLinkForm.tsx rename to web_app/src/views/crm/CustomerForm/SocialLinkForm.tsx diff --git a/web_app/Source_webapp/src/views/crm/CustomerForm/index.ts b/web_app/src/views/crm/CustomerForm/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/CustomerForm/index.ts rename to web_app/src/views/crm/CustomerForm/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Customers/Customers.tsx b/web_app/src/views/crm/Customers/Customers.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/Customers.tsx rename to web_app/src/views/crm/Customers/Customers.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditContent.tsx b/web_app/src/views/crm/Customers/components/CustomerEditContent.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditContent.tsx rename to web_app/src/views/crm/Customers/components/CustomerEditContent.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditDialog.tsx b/web_app/src/views/crm/Customers/components/CustomerEditDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomerEditDialog.tsx rename to web_app/src/views/crm/Customers/components/CustomerEditDialog.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomerStatistic.tsx b/web_app/src/views/crm/Customers/components/CustomerStatistic.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomerStatistic.tsx rename to web_app/src/views/crm/Customers/components/CustomerStatistic.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableFilter.tsx b/web_app/src/views/crm/Customers/components/CustomerTableFilter.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableFilter.tsx rename to web_app/src/views/crm/Customers/components/CustomerTableFilter.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableSearch.tsx b/web_app/src/views/crm/Customers/components/CustomerTableSearch.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomerTableSearch.tsx rename to web_app/src/views/crm/Customers/components/CustomerTableSearch.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomersTable.tsx b/web_app/src/views/crm/Customers/components/CustomersTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomersTable.tsx rename to web_app/src/views/crm/Customers/components/CustomersTable.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/components/CustomersTableTools.tsx b/web_app/src/views/crm/Customers/components/CustomersTableTools.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/components/CustomersTableTools.tsx rename to web_app/src/views/crm/Customers/components/CustomersTableTools.tsx diff --git a/web_app/Source_webapp/src/views/crm/Customers/index.ts b/web_app/src/views/crm/Customers/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/index.ts rename to web_app/src/views/crm/Customers/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Customers/store/customersSlice.ts b/web_app/src/views/crm/Customers/store/customersSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/store/customersSlice.ts rename to web_app/src/views/crm/Customers/store/customersSlice.ts diff --git a/web_app/Source_webapp/src/views/crm/Customers/store/index.ts b/web_app/src/views/crm/Customers/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Customers/store/index.ts rename to web_app/src/views/crm/Customers/store/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Mail/Mail.tsx b/web_app/src/views/crm/Mail/Mail.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/Mail.tsx rename to web_app/src/views/crm/Mail/Mail.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailBody.tsx b/web_app/src/views/crm/Mail/components/MailBody.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailBody.tsx rename to web_app/src/views/crm/Mail/components/MailBody.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailDetail.tsx b/web_app/src/views/crm/Mail/components/MailDetail.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailDetail.tsx rename to web_app/src/views/crm/Mail/components/MailDetail.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailDetailActionBar.tsx b/web_app/src/views/crm/Mail/components/MailDetailActionBar.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailDetailActionBar.tsx rename to web_app/src/views/crm/Mail/components/MailDetailActionBar.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailDetailContent.tsx b/web_app/src/views/crm/Mail/components/MailDetailContent.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailDetailContent.tsx rename to web_app/src/views/crm/Mail/components/MailDetailContent.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailEditor.tsx b/web_app/src/views/crm/Mail/components/MailEditor.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailEditor.tsx rename to web_app/src/views/crm/Mail/components/MailEditor.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailList.tsx b/web_app/src/views/crm/Mail/components/MailList.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailList.tsx rename to web_app/src/views/crm/Mail/components/MailList.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MailSidebar.tsx b/web_app/src/views/crm/Mail/components/MailSidebar.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MailSidebar.tsx rename to web_app/src/views/crm/Mail/components/MailSidebar.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/components/MainCompose.tsx b/web_app/src/views/crm/Mail/components/MainCompose.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/components/MainCompose.tsx rename to web_app/src/views/crm/Mail/components/MainCompose.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/constants.tsx b/web_app/src/views/crm/Mail/constants.tsx similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/constants.tsx rename to web_app/src/views/crm/Mail/constants.tsx diff --git a/web_app/Source_webapp/src/views/crm/Mail/index.ts b/web_app/src/views/crm/Mail/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/index.ts rename to web_app/src/views/crm/Mail/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Mail/store/index.ts b/web_app/src/views/crm/Mail/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/store/index.ts rename to web_app/src/views/crm/Mail/store/index.ts diff --git a/web_app/Source_webapp/src/views/crm/Mail/store/mailSlice.ts b/web_app/src/views/crm/Mail/store/mailSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/crm/Mail/store/mailSlice.ts rename to web_app/src/views/crm/Mail/store/mailSlice.ts diff --git a/web_app/Source_webapp/src/views/demo/CollapseMenuItemView1.tsx b/web_app/src/views/demo/CollapseMenuItemView1.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/CollapseMenuItemView1.tsx rename to web_app/src/views/demo/CollapseMenuItemView1.tsx diff --git a/web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView1.tsx b/web_app/src/views/demo/GroupCollapseMenuItemView1.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView1.tsx rename to web_app/src/views/demo/GroupCollapseMenuItemView1.tsx diff --git a/web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView2.tsx b/web_app/src/views/demo/GroupCollapseMenuItemView2.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/GroupCollapseMenuItemView2.tsx rename to web_app/src/views/demo/GroupCollapseMenuItemView2.tsx diff --git a/web_app/Source_webapp/src/views/demo/GroupSingleMenuItemView.tsx b/web_app/src/views/demo/GroupSingleMenuItemView.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/GroupSingleMenuItemView.tsx rename to web_app/src/views/demo/GroupSingleMenuItemView.tsx diff --git a/web_app/Source_webapp/src/views/demo/SingleMenuView.tsx b/web_app/src/views/demo/SingleMenuView.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/SingleMenuView.tsx rename to web_app/src/views/demo/SingleMenuView.tsx diff --git a/web_app/Source_webapp/src/views/demo/component/index.tsx b/web_app/src/views/demo/component/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/demo/component/index.tsx rename to web_app/src/views/demo/component/index.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/DeviceDetails.tsx b/web_app/src/views/devices/DeviceDetails/DeviceDetails.tsx similarity index 99% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/DeviceDetails.tsx rename to web_app/src/views/devices/DeviceDetails/DeviceDetails.tsx index 4f3baaa2..69aa3282 100644 --- a/web_app/Source_webapp/src/views/devices/DeviceDetails/DeviceDetails.tsx +++ b/web_app/src/views/devices/DeviceDetails/DeviceDetails.tsx @@ -73,7 +73,6 @@ function DeviceDetails() { undefined, data.deviceEncryptedId, (message: any) => { - //console.log('message', message) let tempData = message.data delete tempData.HV delete tempData.FV diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceLog.tsx b/web_app/src/views/devices/DeviceDetails/componetns/DeviceLog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceLog.tsx rename to web_app/src/views/devices/DeviceDetails/componetns/DeviceLog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DevicePayload/DevicePayload.tsx b/web_app/src/views/devices/DeviceDetails/componetns/DevicePayload/DevicePayload.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DevicePayload/DevicePayload.tsx rename to web_app/src/views/devices/DeviceDetails/componetns/DevicePayload/DevicePayload.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DevicePayload/style.scss b/web_app/src/views/devices/DeviceDetails/componetns/DevicePayload/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DevicePayload/style.scss rename to web_app/src/views/devices/DeviceDetails/componetns/DevicePayload/style.scss diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx b/web_app/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx rename to web_app/src/views/devices/DeviceDetails/componetns/DeviceSpecifics.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/MapLocation.tsx b/web_app/src/views/devices/DeviceDetails/componetns/MapLocation.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/MapLocation.tsx rename to web_app/src/views/devices/DeviceDetails/componetns/MapLocation.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/UserInfo.tsx b/web_app/src/views/devices/DeviceDetails/componetns/UserInfo.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/componetns/UserInfo.tsx rename to web_app/src/views/devices/DeviceDetails/componetns/UserInfo.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceDetails/index.ts b/web_app/src/views/devices/DeviceDetails/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceDetails/index.ts rename to web_app/src/views/devices/DeviceDetails/index.ts diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/DevicesList.tsx b/web_app/src/views/devices/DeviceList/DevicesList.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/DevicesList.tsx rename to web_app/src/views/devices/DeviceList/DevicesList.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/DeviceTable.tsx b/web_app/src/views/devices/DeviceList/components/DeviceTable.tsx similarity index 98% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/DeviceTable.tsx rename to web_app/src/views/devices/DeviceList/components/DeviceTable.tsx index 53098f34..21721857 100644 --- a/web_app/Source_webapp/src/views/devices/DeviceList/components/DeviceTable.tsx +++ b/web_app/src/views/devices/DeviceList/components/DeviceTable.tsx @@ -396,13 +396,16 @@ const DeviceTable = memo( cell: (props) => { const { lastLog, deviceEncryptedId } = props.row.original - return ( - - ) + if (!lastLog) { + return N/A + } else + return ( + + ) }, }, diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/DeleteDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/DeleteDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/DeleteDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/DeleteDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/GlobalShareDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/GlobalShareDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/GlobalShareDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/GlobalShareDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/MapMarker.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/MapMarker.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/MapMarker.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/GlobalShareDevice/MapMarker.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalUnshareDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/GlobalUnshareDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/GlobalUnshareDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/GlobalUnshareDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/LocalShareDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/LocalShareDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/LocalShareDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/LocalShareDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/RenameDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/RenameDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/RenameDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/RenameDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/ShareDeviceDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/ShareDeviceDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/ShareDeviceDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/ShareDeviceDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/SharedListDialog.tsx b/web_app/src/views/devices/DeviceList/components/dialogs/SharedListDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/dialogs/SharedListDialog.tsx rename to web_app/src/views/devices/DeviceList/components/dialogs/SharedListDialog.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/components/table/Action.tsx b/web_app/src/views/devices/DeviceList/components/table/Action.tsx similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/components/table/Action.tsx rename to web_app/src/views/devices/DeviceList/components/table/Action.tsx diff --git a/web_app/Source_webapp/src/views/devices/DeviceList/index.ts b/web_app/src/views/devices/DeviceList/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/devices/DeviceList/index.ts rename to web_app/src/views/devices/DeviceList/index.ts diff --git a/web_app/Source_webapp/src/views/dialog/ServerImageDialog.tsx b/web_app/src/views/dialog/ServerImageDialog.tsx similarity index 100% rename from web_app/Source_webapp/src/views/dialog/ServerImageDialog.tsx rename to web_app/src/views/dialog/ServerImageDialog.tsx diff --git a/web_app/Source_webapp/src/views/explorer/Explorer.tsx b/web_app/src/views/explorer/Explorer.tsx similarity index 100% rename from web_app/Source_webapp/src/views/explorer/Explorer.tsx rename to web_app/src/views/explorer/Explorer.tsx diff --git a/web_app/Source_webapp/src/views/explorer/index.tsx b/web_app/src/views/explorer/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/explorer/index.tsx rename to web_app/src/views/explorer/index.tsx diff --git a/web_app/Source_webapp/src/views/index.ts b/web_app/src/views/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/index.ts rename to web_app/src/views/index.ts diff --git a/web_app/Source_webapp/src/views/market/Market.tsx b/web_app/src/views/market/Market.tsx similarity index 100% rename from web_app/Source_webapp/src/views/market/Market.tsx rename to web_app/src/views/market/Market.tsx diff --git a/web_app/Source_webapp/src/views/market/components/Card/Card.tsx b/web_app/src/views/market/components/Card/Card.tsx similarity index 99% rename from web_app/Source_webapp/src/views/market/components/Card/Card.tsx rename to web_app/src/views/market/components/Card/Card.tsx index bf69bba7..ba687b27 100644 --- a/web_app/Source_webapp/src/views/market/components/Card/Card.tsx +++ b/web_app/src/views/market/components/Card/Card.tsx @@ -117,8 +117,6 @@ const ServiceCard = ({ nowDevice: string, deviceType: string ) { - console.log('Ghol', deviceType) - const selecteId = selectedDevices[nowDevice] let deviceList: Array = [] @@ -317,7 +315,7 @@ const ServiceCard = ({ setInstallModal(false) setSelectedDevices({}) } catch (error) { - console.log('Error while installing service, error: ', error) + console.error('Error while installing service, error: ', error) } } diff --git a/web_app/Source_webapp/src/views/market/components/Card/blockly.tsx b/web_app/src/views/market/components/Card/blockly.tsx similarity index 97% rename from web_app/Source_webapp/src/views/market/components/Card/blockly.tsx rename to web_app/src/views/market/components/Card/blockly.tsx index 612422c8..328e54da 100644 --- a/web_app/Source_webapp/src/views/market/components/Card/blockly.tsx +++ b/web_app/src/views/market/components/Card/blockly.tsx @@ -32,12 +32,8 @@ export default function CardBlockly({ setXml(formatedXml) if (workspaceRef.current) { - console.log('Work Space Available') - const domXml = Blockly.utils.xml.textToDom(xmlText) - //workspaceRef.current.clear() - const parser = new DOMParser() const xmlDoc = parser.parseFromString( formatedXml, diff --git a/web_app/Source_webapp/src/views/market/components/Card/style.css b/web_app/src/views/market/components/Card/style.css similarity index 100% rename from web_app/Source_webapp/src/views/market/components/Card/style.css rename to web_app/src/views/market/components/Card/style.css diff --git a/web_app/Source_webapp/src/views/market/components/PaginationTable.tsx b/web_app/src/views/market/components/PaginationTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/market/components/PaginationTable.tsx rename to web_app/src/views/market/components/PaginationTable.tsx diff --git a/web_app/Source_webapp/src/views/market/components/Sorting.tsx b/web_app/src/views/market/components/Sorting.tsx similarity index 100% rename from web_app/Source_webapp/src/views/market/components/Sorting.tsx rename to web_app/src/views/market/components/Sorting.tsx diff --git a/web_app/Source_webapp/src/views/market/components/Statistic.tsx b/web_app/src/views/market/components/Statistic.tsx similarity index 100% rename from web_app/Source_webapp/src/views/market/components/Statistic.tsx rename to web_app/src/views/market/components/Statistic.tsx diff --git a/web_app/Source_webapp/src/views/market/components/data/index.ts b/web_app/src/views/market/components/data/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/market/components/data/index.ts rename to web_app/src/views/market/components/data/index.ts diff --git a/web_app/Source_webapp/src/views/market/index.ts b/web_app/src/views/market/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/market/index.ts rename to web_app/src/views/market/index.ts diff --git a/web_app/Source_webapp/src/views/market/store/crmDashboardSlice.ts b/web_app/src/views/market/store/crmDashboardSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/market/store/crmDashboardSlice.ts rename to web_app/src/views/market/store/crmDashboardSlice.ts diff --git a/web_app/Source_webapp/src/views/market/store/index.ts b/web_app/src/views/market/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/market/store/index.ts rename to web_app/src/views/market/store/index.ts diff --git a/web_app/Source_webapp/src/views/notification/index.ts b/web_app/src/views/notification/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/notification/index.ts rename to web_app/src/views/notification/index.ts diff --git a/web_app/Source_webapp/src/views/notification/my-notifications/MyNotifications.tsx b/web_app/src/views/notification/my-notifications/MyNotifications.tsx similarity index 99% rename from web_app/Source_webapp/src/views/notification/my-notifications/MyNotifications.tsx rename to web_app/src/views/notification/my-notifications/MyNotifications.tsx index 5592da4b..1d3e46b3 100644 --- a/web_app/Source_webapp/src/views/notification/my-notifications/MyNotifications.tsx +++ b/web_app/src/views/notification/my-notifications/MyNotifications.tsx @@ -67,7 +67,6 @@ export default function MyNotifications() { }, [myNotifs, publicNotifs]) async function handleReadClick(data: NotificationProps) { - console.log(readedNotifs) if (!data.read) { if (data.public === false) { const res = await apiReadNotificationsByNotifIdList([data._id]) diff --git a/web_app/Source_webapp/src/views/proof-submiter/ProofPage.tsx b/web_app/src/views/proof-submiter/ProofPage.tsx similarity index 99% rename from web_app/Source_webapp/src/views/proof-submiter/ProofPage.tsx rename to web_app/src/views/proof-submiter/ProofPage.tsx index 7980e7c0..fc1f81c2 100644 --- a/web_app/Source_webapp/src/views/proof-submiter/ProofPage.tsx +++ b/web_app/src/views/proof-submiter/ProofPage.tsx @@ -176,7 +176,7 @@ export default function ProofPage() { ) }, 5000) } catch (error: any) { - console.log('error:', error) + console.error('error:', error) setTransactionLoading(false) toast.push( @@ -188,10 +188,6 @@ export default function ProofPage() { } ) } - - console.log('filteredItems:', filteredItems) - console.log('deviceType:', values.deviceType.value) - console.log('Proof:', values.proof) } const handleProofFileChange = (event: any, setFieldValue: any) => { diff --git a/web_app/Source_webapp/src/views/proof-submiter/index.tsx b/web_app/src/views/proof-submiter/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/proof-submiter/index.tsx rename to web_app/src/views/proof-submiter/index.tsx diff --git a/web_app/Source_webapp/src/views/remix/Remix.tsx b/web_app/src/views/remix/Remix.tsx similarity index 100% rename from web_app/Source_webapp/src/views/remix/Remix.tsx rename to web_app/src/views/remix/Remix.tsx diff --git a/web_app/Source_webapp/src/views/remix/index.ts b/web_app/src/views/remix/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/remix/index.ts rename to web_app/src/views/remix/index.ts diff --git a/admin_web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx b/web_app/src/views/services/CreateNewService/CreateNewService.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx rename to web_app/src/views/services/CreateNewService/CreateNewService.tsx index eb5a7e7b..ebe1bd9a 100644 --- a/admin_web_app/Source_webapp/src/views/services/CreateNewService/CreateNewService.tsx +++ b/web_app/src/views/services/CreateNewService/CreateNewService.tsx @@ -55,8 +55,6 @@ const createNewService = () => { ) const onTabChange = (val: string) => { - console.log(val) - setCurrentTab(val) navigate(`/account/settings/${val}`) } diff --git a/web_app/Source_webapp/src/views/services/CreateNewService/index.ts b/web_app/src/views/services/CreateNewService/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/CreateNewService/index.ts rename to web_app/src/views/services/CreateNewService/index.ts diff --git a/web_app/Source_webapp/src/views/services/InstallService/InstalledServices.tsx b/web_app/src/views/services/InstallService/InstalledServices.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/InstallService/InstalledServices.tsx rename to web_app/src/views/services/InstallService/InstalledServices.tsx diff --git a/web_app/Source_webapp/src/views/services/InstallService/index.ts b/web_app/src/views/services/InstallService/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/InstallService/index.ts rename to web_app/src/views/services/InstallService/index.ts diff --git a/web_app/Source_webapp/src/views/services/ServiceCode/ServiceCode.tsx b/web_app/src/views/services/ServiceCode/ServiceCode.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceCode/ServiceCode.tsx rename to web_app/src/views/services/ServiceCode/ServiceCode.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceCode/components/BlocklyEditor.tsx b/web_app/src/views/services/ServiceCode/components/BlocklyEditor.tsx similarity index 99% rename from web_app/Source_webapp/src/views/services/ServiceCode/components/BlocklyEditor.tsx rename to web_app/src/views/services/ServiceCode/components/BlocklyEditor.tsx index 93cf7f33..8e339f8a 100644 --- a/web_app/Source_webapp/src/views/services/ServiceCode/components/BlocklyEditor.tsx +++ b/web_app/src/views/services/ServiceCode/components/BlocklyEditor.tsx @@ -481,10 +481,6 @@ export default function BlocklyEditor() { type: deviceTypes[device], })) - console.log('ghol:', maghol) - - console.log('ghol 2:', getUsedDeviceTypesFromXml()) - const res = (await apiEditService({ ...data, blocklyJson: xml, @@ -698,10 +694,6 @@ export default function BlocklyEditor() { workspace.clear() // Clear the current workspace Xml.domToWorkspace(xmlDoc.documentElement, workspace) // Set the new XML to the workspace - - console.log('Valid XML, workspace updated') - } else { - console.log('Invalid XML') } } catch (err) { console.error('Failed to read clipboard contents:', err) @@ -808,5 +800,3 @@ export default function BlocklyEditor() { ) } - - diff --git a/web_app/Source_webapp/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.ts b/web_app/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.ts rename to web_app/src/views/services/ServiceCode/components/customBlocks/custom_Blocks.ts diff --git a/web_app/Source_webapp/src/views/services/ServiceCode/components/style.scss b/web_app/src/views/services/ServiceCode/components/style.scss similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceCode/components/style.scss rename to web_app/src/views/services/ServiceCode/components/style.scss diff --git a/web_app/Source_webapp/src/views/services/ServiceCode/index.tsx b/web_app/src/views/services/ServiceCode/index.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceCode/index.tsx rename to web_app/src/views/services/ServiceCode/index.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/BasicInformationFields.tsx b/web_app/src/views/services/ServiceForm/BasicInformationFields.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceForm/BasicInformationFields.tsx rename to web_app/src/views/services/ServiceForm/BasicInformationFields.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/OrganizationFields.tsx b/web_app/src/views/services/ServiceForm/OrganizationFields.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceForm/OrganizationFields.tsx rename to web_app/src/views/services/ServiceForm/OrganizationFields.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/PricingFields.tsx b/web_app/src/views/services/ServiceForm/PricingFields.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceForm/PricingFields.tsx rename to web_app/src/views/services/ServiceForm/PricingFields.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/ProductForm.tsx b/web_app/src/views/services/ServiceForm/ProductForm.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceForm/ProductForm.tsx rename to web_app/src/views/services/ServiceForm/ProductForm.tsx diff --git a/admin_web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx b/web_app/src/views/services/ServiceForm/ProductImages.tsx similarity index 99% rename from admin_web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx rename to web_app/src/views/services/ServiceForm/ProductImages.tsx index b49878dd..bd52b622 100644 --- a/admin_web_app/Source_webapp/src/views/services/ServiceForm/ProductImages.tsx +++ b/web_app/src/views/services/ServiceForm/ProductImages.tsx @@ -164,7 +164,6 @@ const ProductImages = (props: ProductImagesProps) => { img: URL.createObjectURL(files[latestUpload]), } const imageList = [...values.imgList, ...[image]] - console.log('imageList', imageList) form.setFieldValue(field.name, imageList) } diff --git a/web_app/Source_webapp/src/views/services/ServiceForm/index.ts b/web_app/src/views/services/ServiceForm/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceForm/index.ts rename to web_app/src/views/services/ServiceForm/index.ts diff --git a/web_app/Source_webapp/src/views/services/ServiceView/ServiceCreate.tsx b/web_app/src/views/services/ServiceView/ServiceCreate.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceView/ServiceCreate.tsx rename to web_app/src/views/services/ServiceView/ServiceCreate.tsx diff --git a/web_app/Source_webapp/src/views/services/ServiceView/index.ts b/web_app/src/views/services/ServiceView/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceView/index.ts rename to web_app/src/views/services/ServiceView/index.ts diff --git a/web_app/Source_webapp/src/views/services/ServiceView/store/index.ts b/web_app/src/views/services/ServiceView/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceView/store/index.ts rename to web_app/src/views/services/ServiceView/store/index.ts diff --git a/web_app/Source_webapp/src/views/services/ServiceView/store/productEditSlice.ts b/web_app/src/views/services/ServiceView/store/productEditSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/ServiceView/store/productEditSlice.ts rename to web_app/src/views/services/ServiceView/store/productEditSlice.ts diff --git a/web_app/Source_webapp/src/views/services/Services/Services.tsx b/web_app/src/views/services/Services/Services.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/Services.tsx rename to web_app/src/views/services/Services/Services.tsx diff --git a/web_app/Source_webapp/src/views/services/Services/components/Card.tsx b/web_app/src/views/services/Services/components/Card.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/Card.tsx rename to web_app/src/views/services/Services/components/Card.tsx diff --git a/web_app/Source_webapp/src/views/services/Services/components/PaginationTable.tsx b/web_app/src/views/services/Services/components/PaginationTable.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/PaginationTable.tsx rename to web_app/src/views/services/Services/components/PaginationTable.tsx diff --git a/web_app/Source_webapp/src/views/services/Services/components/Sorting.tsx b/web_app/src/views/services/Services/components/Sorting.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/Sorting.tsx rename to web_app/src/views/services/Services/components/Sorting.tsx diff --git a/web_app/Source_webapp/src/views/services/Services/components/Statistic.tsx b/web_app/src/views/services/Services/components/Statistic.tsx similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/Statistic.tsx rename to web_app/src/views/services/Services/components/Statistic.tsx diff --git a/web_app/Source_webapp/src/views/services/Services/components/data/index.ts b/web_app/src/views/services/Services/components/data/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/data/index.ts rename to web_app/src/views/services/Services/components/data/index.ts diff --git a/web_app/Source_webapp/src/views/services/Services/components/style.css b/web_app/src/views/services/Services/components/style.css similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/components/style.css rename to web_app/src/views/services/Services/components/style.css diff --git a/web_app/Source_webapp/src/views/services/Services/index.ts b/web_app/src/views/services/Services/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/index.ts rename to web_app/src/views/services/Services/index.ts diff --git a/web_app/Source_webapp/src/views/services/Services/store/crmDashboardSlice.ts b/web_app/src/views/services/Services/store/crmDashboardSlice.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/store/crmDashboardSlice.ts rename to web_app/src/views/services/Services/store/crmDashboardSlice.ts diff --git a/web_app/Source_webapp/src/views/services/Services/store/index.ts b/web_app/src/views/services/Services/store/index.ts similarity index 100% rename from web_app/Source_webapp/src/views/services/Services/store/index.ts rename to web_app/src/views/services/Services/store/index.ts diff --git a/web_app/Source_webapp/src/vite-env.d.ts b/web_app/src/vite-env.d.ts similarity index 100% rename from web_app/Source_webapp/src/vite-env.d.ts rename to web_app/src/vite-env.d.ts diff --git a/web_app/Source_webapp/tailwind.config.cjs b/web_app/tailwind.config.cjs similarity index 100% rename from web_app/Source_webapp/tailwind.config.cjs rename to web_app/tailwind.config.cjs diff --git a/web_app/Source_webapp/tsconfig.eslint.json b/web_app/tsconfig.eslint.json similarity index 100% rename from web_app/Source_webapp/tsconfig.eslint.json rename to web_app/tsconfig.eslint.json diff --git a/web_app/Source_webapp/tsconfig.json b/web_app/tsconfig.json similarity index 100% rename from web_app/Source_webapp/tsconfig.json rename to web_app/tsconfig.json diff --git a/web_app/Source_webapp/tsconfig.node.json b/web_app/tsconfig.node.json similarity index 100% rename from web_app/Source_webapp/tsconfig.node.json rename to web_app/tsconfig.node.json diff --git a/web_app/Source_webapp/twSafelistGenerator/generator.js b/web_app/twSafelistGenerator/generator.js similarity index 100% rename from web_app/Source_webapp/twSafelistGenerator/generator.js rename to web_app/twSafelistGenerator/generator.js diff --git a/web_app/Source_webapp/twSafelistGenerator/index.js b/web_app/twSafelistGenerator/index.js similarity index 100% rename from web_app/Source_webapp/twSafelistGenerator/index.js rename to web_app/twSafelistGenerator/index.js diff --git a/web_app/Source_webapp/vite.config.ts b/web_app/vite.config.ts similarity index 100% rename from web_app/Source_webapp/vite.config.ts rename to web_app/vite.config.ts