-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6bbc50a
commit b5b6e32
Showing
135 changed files
with
10,099 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: engagement ui service docker Image CI | ||
|
||
on: | ||
push: | ||
branches: [ "mf-build-docker", "mf","mf-stable-common-module" ] | ||
pull_request: | ||
branches: [ "mf-build" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Fetch all history for tags and branches | ||
|
||
- name: Set up environment variables | ||
id: env | ||
run: | | ||
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV | ||
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA | ||
- name: Build the Docker image | ||
id: docker_build | ||
working-directory: ./micro-ui/web/packages/engagement | ||
run: | | ||
IMAGE_TAG=egovio/engagement-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }} | ||
docker build . \ | ||
--file docker/Dockerfile \ | ||
--tag $IMAGE_TAG | ||
echo "::set-output name=image_name::$IMAGE_TAG" | ||
- name: Login to Docker Hub and Push Docker Image | ||
working-directory: ./micro-ui/web/packages/engagement | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }} | ||
run: | | ||
# Authenticate with Docker Hub | ||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | ||
# Push the image to Docker Hub | ||
docker push $IMAGE_NAME | ||
echo "Docker image pushed: $IMAGE_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env","@babel/preset-react" | ||
], | ||
"plugins": ["react-html-attrs"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
|
||
|
||
# digit-ui-module-engagement | ||
|
||
## Install | ||
|
||
```bash | ||
npm install --save @egovernments/digit-ui-module-engagement | ||
``` | ||
|
||
## Limitation | ||
|
||
```bash | ||
This Package is more specific to DIGIT-UI's can be used across mission's | ||
``` | ||
|
||
## Usage | ||
|
||
After adding the dependency make sure you have this dependency in | ||
|
||
```bash | ||
frontend/micro-ui/web/package.json | ||
``` | ||
|
||
```json | ||
"@egovernments/digit-ui-module-engagement":"^1.5.0", | ||
``` | ||
|
||
then navigate to App.js | ||
|
||
```bash | ||
frontend/micro-ui/web/src/App.js | ||
``` | ||
|
||
|
||
```jsx | ||
/** add this import **/ | ||
|
||
import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; | ||
|
||
/** inside enabledModules add this new module key **/ | ||
|
||
const enabledModules = ["Engagement"]; | ||
|
||
/** inside init Function call this function **/ | ||
|
||
const initDigitUI = () => { | ||
initEngagementComponents(); | ||
}; | ||
``` | ||
|
||
### Changelog | ||
|
||
```bash | ||
1.8.0 workbench v1.0 release | ||
1.8.0-beta workbench base version beta release | ||
1.7.0 urban 2.9 | ||
1.6.0 urban 2.8 | ||
1.5.25 updated the readme content | ||
1.5.24 added the readme file | ||
1.5.23 base version | ||
``` | ||
|
||
### Contributors | ||
|
||
[jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [vamshikrishnakole-wtt-egov] | ||
|
||
## Documentation | ||
|
||
Documentation Site (https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) | ||
|
||
## Maintainer | ||
|
||
- [jagankumar-egov](https://www.github.com/jagankumar-egov) | ||
|
||
|
||
### Published from DIGIT Frontend | ||
DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/master) | ||
|
||
|
||
![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Use Node.js base image with version 16 | ||
FROM node:16 AS build | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy package.json and yarn.lock (if exists) | ||
COPY package.json ./ | ||
|
||
RUN rm -rf node_modules/ | ||
|
||
RUN rm -rf yarn.lock | ||
|
||
# clear cache | ||
RUN yarn cache clean | ||
|
||
# Install dependencies | ||
RUN yarn install | ||
|
||
# RUN yarn add @digit-ui/[email protected] | ||
|
||
# Copy the rest of the application | ||
COPY . . | ||
|
||
# Build the React app with Webpack | ||
RUN yarn build | ||
|
||
FROM nginx:mainline-alpine | ||
|
||
ENV WORK_DIR=/var/web/engagement-ui | ||
|
||
RUN mkdir -p ${WORK_DIR} | ||
|
||
|
||
COPY --from=build /app/dist ${WORK_DIR}/ | ||
COPY --from=build /app/docker/nginx.conf /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server | ||
{ | ||
listen 80; | ||
underscores_in_headers on; | ||
|
||
location /engagement-ui | ||
{ | ||
root /var/web; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /engagement-ui/index.html; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"name": "@egovernments/digit-ui-module-engagement-mfe", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"predeploy":"yarn build", | ||
"deploy":"gh-pages -d dist", | ||
"start": "webpack serve --config webpack.dev.js", | ||
"build": "webpack --config webpack.prod.js", | ||
"build:dev": "webpack --config webpack.dev.js" | ||
}, | ||
"dependencies": { | ||
"@egovernments/digit-ui-react-components": "1.5.5", | ||
"react": "17.0.2", | ||
"react-dom": "17.0.2", | ||
"react-hook-form": "6.15.8", | ||
"react-i18next": "11.16.2", | ||
"react-query": "3.6.1", | ||
"react-router-dom": "5.3.0", | ||
"react-time-picker": "4.2.1", | ||
"recharts": "^2.0.9" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.12.10", | ||
"@babel/preset-react": "7.12.10", | ||
"babel-loader": "8.2.2", | ||
"gh-pages": "^5.0.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"babel-plugin-react-html-attrs": "^3.0.5", | ||
"@babel/preset-env":"7.23.9" | ||
}, | ||
"author": "JaganKumar <[email protected]>" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Engagement Page</title> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" /> | ||
<script src="https://s3.ap-south-1.amazonaws.com/egov-dev-assets/globalConfigsWorkbench.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/@egovernments/[email protected]/dist/index.css" /> | ||
|
||
<link | ||
href="https://fonts.googleapis.com/css2?family=Oxygen:wght@400;700&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: "Oxygen", sans-serif; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="engagement-module-root"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { QueryClientProvider } from 'react-query'; | ||
import { Switch, useLocation, BrowserRouter as Router } from 'react-router-dom'; | ||
import { initEngagementComponents,EngagementModule } from './Module'; | ||
|
||
const App = ({ queryClient, title,userType }) => { | ||
initEngagementComponents(); | ||
|
||
return ( | ||
<QueryClientProvider client={queryClient}> | ||
<Router> | ||
<EngagementModule path={`/${window.contextPath ? window.contextPath : "core-digit-ui"}/employee/engagement`} userType={userType} stateCode={"pg"} tenants={["pg.citya","pg.cityb","pg.cityc"]} /> | ||
</Router> | ||
</QueryClientProvider> | ||
); | ||
}; | ||
|
||
export default App; |
Oops, something went wrong.