diff --git a/db/Dep/about/CSE.html b/db/Dep/about/CSE.html new file mode 100644 index 00000000..87f4f863 --- /dev/null +++ b/db/Dep/about/CSE.html @@ -0,0 +1,17 @@ +

+ Our Missions : +

+

+ The mission of the Computer Engineering Department is to provide educational programs that would encourage students + to read critically, reason analytically, communicate persuasively, apply professionally and prepare them to excel in + the field of computing. +

+

+ Our Vision : +

+

+ The vision of the Computer Engineering Department is to recognize itself as renowned department in the field of + technical education in Computer Engineering and strives to carry out the superior level of research based on the + quality, innovation and excellence; with the help of its stakeholders viz. the students, research scholars, faculty + members, the support staff and the alumni. +

\ No newline at end of file diff --git a/db/Dep/about/DESIGN.html b/db/Dep/about/DESIGN.html new file mode 100644 index 00000000..87f4f863 --- /dev/null +++ b/db/Dep/about/DESIGN.html @@ -0,0 +1,17 @@ +

+ Our Missions : +

+

+ The mission of the Computer Engineering Department is to provide educational programs that would encourage students + to read critically, reason analytically, communicate persuasively, apply professionally and prepare them to excel in + the field of computing. +

+

+ Our Vision : +

+

+ The vision of the Computer Engineering Department is to recognize itself as renowned department in the field of + technical education in Computer Engineering and strives to carry out the superior level of research based on the + quality, innovation and excellence; with the help of its stakeholders viz. the students, research scholars, faculty + members, the support staff and the alumni. +

\ No newline at end of file diff --git a/db/Dep/about/ECE.html b/db/Dep/about/ECE.html new file mode 100644 index 00000000..7d40697a --- /dev/null +++ b/db/Dep/about/ECE.html @@ -0,0 +1,12 @@ +

+ Our Missions : +

+

+ The discipline of Electronics and Communication Engineering (ECE) has a perfect combination of teaching and research activities pertaining to field of Electronics and Communication. Since its inception the main objective of discipline is to impart quality education, hands-on training and research in the frontier areas of Electronics & Communication Engineering with broad focus on IT enabled design and manufacturing. +

+

+ Our Vision : +

+

+ The vision of ECE department is to become pioneer in higher learning and research and to produce creative solution to societal needs. To provide excellence in education, research and public service. To provide quality education and to make the students entrepreneur and employable. +

\ No newline at end of file diff --git a/db/Dep/about/ME.html b/db/Dep/about/ME.html new file mode 100644 index 00000000..5213aebd --- /dev/null +++ b/db/Dep/about/ME.html @@ -0,0 +1,12 @@ +

+ Our Missions : +

+

+ The primary focus of our pedagogy is to impart technical know-how to students, promote their problem solving and innovation skills and make them abreast with new technologies. The department offers a wide spectrum of optional courses to the students to pursue their interest. The course contents are periodically updated to keep them inline with the global developments. Undergraduate students are encouraged for hands-on-training, in the form of course projects and participate in various sponsored research projects. +

+

+ Our Vision : +

+

+ The vision of the mechanical Engineering Department is to recognize itself as renowned department in the field of Research and technical education in Mechanical Engineering and strives to carry out the superior level of research based on the quality, innovation and excellence; with the help of its stakeholders viz. the students, research scholars, faculty members, the support staff and the alumni. +

\ No newline at end of file diff --git a/db/Dep/about/SM.html b/db/Dep/about/SM.html new file mode 100644 index 00000000..1d582b5e --- /dev/null +++ b/db/Dep/about/SM.html @@ -0,0 +1,12 @@ +

+ Our Missions : +

+

+ The programme is designed to provide various tools and techniques associated with IoT, IIoT, Information and Computing Technology (ICT) and System Engineering, with special focus on additive manufacturing (AM) or 3D printing and near net shape manufacturing processes. +

+

+ Our Vision : +

+

+ This programme focuses on some of the disruptive innovations that the last decade has been witnessed to, namely, Internet of Things (IoT), Robotics, Additive Manufacturing (3D Printing), Industrial Automation, Artificial Intelligence, Machine Learning, etc. These technologies have a huge potential to shape the future of mankind. Smart manufacturing, being an important aspect of the Industrial Internet of Things (IIoT) is the next industrial revolution. Smart manufacturing integrates data and information from multiple open and vendor applications and products to form new solutions. It can be applied to a single machine line, an entire factory or across a network of manufacturers, suppliers and customers. This new area of innovation will optimize the entire manufacturing industry to create higher quality products at lower prices, improve productivity, increase energy efficiency, and sustain safer plants. +

\ No newline at end of file diff --git a/db/Dep/achievements/CSE.html b/db/Dep/achievements/CSE.html new file mode 100644 index 00000000..0c700e5d --- /dev/null +++ b/db/Dep/achievements/CSE.html @@ -0,0 +1,38 @@ +

Achievements

+
    +
  1. +

    + PDPM IIITDMJ Student Team has won the International Chess + Competition, out of 160 teams participated, organized by Collegiate Chess League 2021 +

    +
  2. +
    +
  3. +

    + Ph.D. student Mr. Ravi Yadav working under the guidance of Dr. Ravi Panwar + awarded with "Swachhta Saarthi Fellowship" under the Waste to Wealth Mission of the Government of India, + 2021 +

    +
  4. +
    +
  5. +

    + Ph.D. student Mr. Varun Chaudhary working + under the guidance of Dr. Ravi Panwar won the MP Young Scientist Award with the First Position and was + rewarded with a cash prize of Rs. 25,000 /-, 2021 +

    +
  6. +
    +
  7. +

    + Abhishek Patel student of M.Tech ECE won Silver Medal in Men's Single Fairway Competition in All India + Inter-University Woodball Championship 2019-2020 held at Chandigarh University, Chandigarh from + 04-07Jan,2020 +

    +
  8. +
  9. +

    + fusion is going to be deployed on 30.04.2023. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/achievements/DESIGN.html b/db/Dep/achievements/DESIGN.html new file mode 100644 index 00000000..0c700e5d --- /dev/null +++ b/db/Dep/achievements/DESIGN.html @@ -0,0 +1,38 @@ +

Achievements

+
    +
  1. +

    + PDPM IIITDMJ Student Team has won the International Chess + Competition, out of 160 teams participated, organized by Collegiate Chess League 2021 +

    +
  2. +
    +
  3. +

    + Ph.D. student Mr. Ravi Yadav working under the guidance of Dr. Ravi Panwar + awarded with "Swachhta Saarthi Fellowship" under the Waste to Wealth Mission of the Government of India, + 2021 +

    +
  4. +
    +
  5. +

    + Ph.D. student Mr. Varun Chaudhary working + under the guidance of Dr. Ravi Panwar won the MP Young Scientist Award with the First Position and was + rewarded with a cash prize of Rs. 25,000 /-, 2021 +

    +
  6. +
    +
  7. +

    + Abhishek Patel student of M.Tech ECE won Silver Medal in Men's Single Fairway Competition in All India + Inter-University Woodball Championship 2019-2020 held at Chandigarh University, Chandigarh from + 04-07Jan,2020 +

    +
  8. +
  9. +

    + fusion is going to be deployed on 30.04.2023. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/achievements/ECE.html b/db/Dep/achievements/ECE.html new file mode 100644 index 00000000..0c700e5d --- /dev/null +++ b/db/Dep/achievements/ECE.html @@ -0,0 +1,38 @@ +

Achievements

+
    +
  1. +

    + PDPM IIITDMJ Student Team has won the International Chess + Competition, out of 160 teams participated, organized by Collegiate Chess League 2021 +

    +
  2. +
    +
  3. +

    + Ph.D. student Mr. Ravi Yadav working under the guidance of Dr. Ravi Panwar + awarded with "Swachhta Saarthi Fellowship" under the Waste to Wealth Mission of the Government of India, + 2021 +

    +
  4. +
    +
  5. +

    + Ph.D. student Mr. Varun Chaudhary working + under the guidance of Dr. Ravi Panwar won the MP Young Scientist Award with the First Position and was + rewarded with a cash prize of Rs. 25,000 /-, 2021 +

    +
  6. +
    +
  7. +

    + Abhishek Patel student of M.Tech ECE won Silver Medal in Men's Single Fairway Competition in All India + Inter-University Woodball Championship 2019-2020 held at Chandigarh University, Chandigarh from + 04-07Jan,2020 +

    +
  8. +
  9. +

    + fusion is going to be deployed on 30.04.2023. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/achievements/ME.html b/db/Dep/achievements/ME.html new file mode 100644 index 00000000..0c700e5d --- /dev/null +++ b/db/Dep/achievements/ME.html @@ -0,0 +1,38 @@ +

Achievements

+
    +
  1. +

    + PDPM IIITDMJ Student Team has won the International Chess + Competition, out of 160 teams participated, organized by Collegiate Chess League 2021 +

    +
  2. +
    +
  3. +

    + Ph.D. student Mr. Ravi Yadav working under the guidance of Dr. Ravi Panwar + awarded with "Swachhta Saarthi Fellowship" under the Waste to Wealth Mission of the Government of India, + 2021 +

    +
  4. +
    +
  5. +

    + Ph.D. student Mr. Varun Chaudhary working + under the guidance of Dr. Ravi Panwar won the MP Young Scientist Award with the First Position and was + rewarded with a cash prize of Rs. 25,000 /-, 2021 +

    +
  6. +
    +
  7. +

    + Abhishek Patel student of M.Tech ECE won Silver Medal in Men's Single Fairway Competition in All India + Inter-University Woodball Championship 2019-2020 held at Chandigarh University, Chandigarh from + 04-07Jan,2020 +

    +
  8. +
  9. +

    + fusion is going to be deployed on 30.04.2023. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/achievements/SM.html b/db/Dep/achievements/SM.html new file mode 100644 index 00000000..0c700e5d --- /dev/null +++ b/db/Dep/achievements/SM.html @@ -0,0 +1,38 @@ +

Achievements

+
    +
  1. +

    + PDPM IIITDMJ Student Team has won the International Chess + Competition, out of 160 teams participated, organized by Collegiate Chess League 2021 +

    +
  2. +
    +
  3. +

    + Ph.D. student Mr. Ravi Yadav working under the guidance of Dr. Ravi Panwar + awarded with "Swachhta Saarthi Fellowship" under the Waste to Wealth Mission of the Government of India, + 2021 +

    +
  4. +
    +
  5. +

    + Ph.D. student Mr. Varun Chaudhary working + under the guidance of Dr. Ravi Panwar won the MP Young Scientist Award with the First Position and was + rewarded with a cash prize of Rs. 25,000 /-, 2021 +

    +
  6. +
    +
  7. +

    + Abhishek Patel student of M.Tech ECE won Silver Medal in Men's Single Fairway Competition in All India + Inter-University Woodball Championship 2019-2020 held at Chandigarh University, Chandigarh from + 04-07Jan,2020 +

    +
  8. +
  9. +

    + fusion is going to be deployed on 30.04.2023. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/facilities/CSE.html b/db/Dep/facilities/CSE.html new file mode 100644 index 00000000..a1d5466a --- /dev/null +++ b/db/Dep/facilities/CSE.html @@ -0,0 +1,58 @@ +

+ Central Library: +

+

+ Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The + Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, + Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. + Total number of books in the Institute library by the year 2009-10 are approximately 6742. +

+

+ High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 + Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz + Processor and WiFi Campus etc. +

+

+ Lab Infrastructure : +

+
    +
  1. +

    + Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC + Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical + Machining System, Injection Moulding Machine etc. +

    +
  2. +
    +
  3. +

    + Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 + p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. +

    +
  4. +
    +
  5. +

    + Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter + SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, + Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online + Processing etc. +

    +
  6. +
    +
  7. +

    + Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT + Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse + Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. +

    +
  8. +
    +
  9. +

    + Materials Research Laboratory : This Laboratory contains three important instruments for material + characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force + Microscope (AFM) including SPM, MFM etc. +

    +
  10. +
diff --git a/db/Dep/facilities/DESIGN.html b/db/Dep/facilities/DESIGN.html new file mode 100644 index 00000000..a1d5466a --- /dev/null +++ b/db/Dep/facilities/DESIGN.html @@ -0,0 +1,58 @@ +

+ Central Library: +

+

+ Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The + Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, + Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. + Total number of books in the Institute library by the year 2009-10 are approximately 6742. +

+

+ High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 + Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz + Processor and WiFi Campus etc. +

+

+ Lab Infrastructure : +

+
    +
  1. +

    + Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC + Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical + Machining System, Injection Moulding Machine etc. +

    +
  2. +
    +
  3. +

    + Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 + p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. +

    +
  4. +
    +
  5. +

    + Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter + SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, + Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online + Processing etc. +

    +
  6. +
    +
  7. +

    + Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT + Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse + Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. +

    +
  8. +
    +
  9. +

    + Materials Research Laboratory : This Laboratory contains three important instruments for material + characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force + Microscope (AFM) including SPM, MFM etc. +

    +
  10. +
diff --git a/db/Dep/facilities/ECE.html b/db/Dep/facilities/ECE.html new file mode 100644 index 00000000..a1d5466a --- /dev/null +++ b/db/Dep/facilities/ECE.html @@ -0,0 +1,58 @@ +

+ Central Library: +

+

+ Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The + Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, + Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. + Total number of books in the Institute library by the year 2009-10 are approximately 6742. +

+

+ High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 + Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz + Processor and WiFi Campus etc. +

+

+ Lab Infrastructure : +

+
    +
  1. +

    + Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC + Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical + Machining System, Injection Moulding Machine etc. +

    +
  2. +
    +
  3. +

    + Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 + p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. +

    +
  4. +
    +
  5. +

    + Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter + SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, + Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online + Processing etc. +

    +
  6. +
    +
  7. +

    + Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT + Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse + Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. +

    +
  8. +
    +
  9. +

    + Materials Research Laboratory : This Laboratory contains three important instruments for material + characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force + Microscope (AFM) including SPM, MFM etc. +

    +
  10. +
diff --git a/db/Dep/facilities/ME.html b/db/Dep/facilities/ME.html new file mode 100644 index 00000000..6dc9a860 --- /dev/null +++ b/db/Dep/facilities/ME.html @@ -0,0 +1,58 @@ +

+ Central Library: +

+

+ Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The + Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, + Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. + Total number of books in the Institute library by the year 2009-10 are approximately 6742. +

+

+ High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 + Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz + Processor and WiFi Campus etc. +

+

+ Lab Infrastructure : +

+
    +
  1. +

    + Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC + Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical + Machining System, Injection Moulding Machine etc. +

    +
  2. +
    +
  3. +

    + Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 + p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. +

    +
  4. +
    +
  5. +

    + Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter + SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, + Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online + Processing etc. +

    +
  6. +
    +
  7. +

    + Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT + Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse + Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. +

    +
  8. +
    +
  9. +

    + Materials Research Laboratory : This Laboratory contains three important instruments for material + characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force + Microscope (AFM) including SPM, MFM etc. +

    +
  10. +
\ No newline at end of file diff --git a/db/Dep/facilities/SM.html b/db/Dep/facilities/SM.html new file mode 100644 index 00000000..a1d5466a --- /dev/null +++ b/db/Dep/facilities/SM.html @@ -0,0 +1,58 @@ +

+ Central Library: +

+

+ Institute library has e-resources through INDEST, Science Direct, IEEE, ACM, Springger Link, Nature and ASME. The + Institute also has access to various online research journals & articles like following resources SIAm, AMS, ACS, + Kluwer, APS, Palgrave, INFORMS, Rev.of Scientific Instruments, Appl.Physics Letters and the search engine Scopus. + Total number of books in the Institute library by the year 2009-10 are approximately 6742. +

+

+ High Performance Computing Labortory : Specification of Parallel Cluster (for Central Computing Facility)- JS22 + Blade No.3, 16GB(2*8GB) DDR2 533 Mhz DiMMs, IBM 146GB SAS 10K SFF HDD, IBM blade center JS22 4-core 4.0 Ghz + Processor and WiFi Campus etc. +

+

+ Lab Infrastructure : +

+
    +
  1. +

    + Advanced Manufacturing Laboratory : This Laboratory contains Rapid Prototyping Machine, CNC + Controlled Abrasive Waterjet Machine, CNC Milling Center, CNC Turning Center, Dynamometer, Electro Chemical + Machining System, Injection Moulding Machine etc. +

    +
  2. +
    +
  3. +

    + Biometric Laboratory : This Laboratory contains S Series, H Series, W Series cameras and p6 + p520(Tower Model), p6 p520:8203 Model servers Made by IBM etc. +

    +
  4. +
    +
  5. +

    + Digital Signal Processing and Image Processing Laboratory : This Laboratory contains DSP Starter + SPARTAN-3 kit (DSK), TMS 320C6713 DSK with CCS (Code Composer Studio), Image Daughter Kit with CCD Cameras, + Bloom with DSP, Matrox Imaging Library, Matrox Morphis, Frame Graber Card, Color CCD Camera for online + Processing etc. +

    +
  6. +
    +
  7. +

    + Infrared Imaging Laboratory : This Laboratory contains Radiometeric calibration, Extender rings, NDT + Base Module, Central computing unit with TFT display, Software Modules for Lockin, Transient-and Pulse + Measurement, Module Pulse- and Transient- Thermography, Source for Vibro- Thermography etc. +

    +
  8. +
    +
  9. +

    + Materials Research Laboratory : This Laboratory contains three important instruments for material + characterization which are X-Ray Diffractometer (XRD), Scanning Electron Microscope (SEM) and Atomic Force + Microscope (AFM) including SPM, MFM etc. +

    +
  10. +
diff --git a/db/Department_AboutUs_cse.csv b/db/Department_AboutUs_cse.csv new file mode 100644 index 00000000..598da1ab --- /dev/null +++ b/db/Department_AboutUs_cse.csv @@ -0,0 +1,2 @@ +"Our Mission :","The mission of the Computer Engineering Department is to provide education programs that would encourage students to read critically, reason analytically. cormmunicate persuasively. apply professionally and prepare them to excel in the field of computing" +"Our Vision :","The vision of the computer Engineering Department is to recognize is to itself as renowned department in the field of technical education in Computer Engineering and strives to carry out the superior level Of research based on the quality. innovation and excellence; with the help or its stakeholder vil. the students, research scholars. Facuty members, the staff and the Alumni." \ No newline at end of file diff --git a/db/Department_AboutUs_ece.csv b/db/Department_AboutUs_ece.csv new file mode 100644 index 00000000..c4daa6ed --- /dev/null +++ b/db/Department_AboutUs_ece.csv @@ -0,0 +1,2 @@ +"Our Mission :","The discipline of Electronics and Communication Engineering (ECE) has a perfect combination of teaching and research activities pertaining to field of Electronics and Communication. Since its inception the main objective of discipline is to impart quality education, hands-on training and research in the frontier areas of Electronics & Communication Engineering with broad focus on IT enabled design and manufacturing." +"Our Vision :","The vision of ECE department is to become pioneer in higher learning and research and to produce creative solution to societal needs. To provide excellence in education, research and public service. To provide quality education and to make the students entrepreneur and employable." \ No newline at end of file diff --git a/db/Department_AboutUs_me.csv b/db/Department_AboutUs_me.csv new file mode 100644 index 00000000..b05c18bc --- /dev/null +++ b/db/Department_AboutUs_me.csv @@ -0,0 +1,2 @@ +"Our Mission :","The primary focus of our pedagogy is to impart technical know-how to students, promote their problem solving and innovation skills and make them abreast with new technologies. The department offers a wide spectrum of optional courses to the students to pursue their interest. The course contents are periodically updated to keep them inline with the global developments. Undergraduate students are encouraged for hands-on-training, in the form of course projects and participate in various sponsored research projects." +"Our Vision :","The vision of the mechanical Engineering Department is to recognize itself as renowned department in the field of Research and technical education in Mechanical Engineering and strives to carry out the superior level of research based on the quality, innovation and excellence; with the help of its stakeholders viz. the students, research scholars, faculty members, the support staff and the alumni." \ No newline at end of file diff --git a/db/Department_AboutUs_sm.csv b/db/Department_AboutUs_sm.csv new file mode 100644 index 00000000..1805556f --- /dev/null +++ b/db/Department_AboutUs_sm.csv @@ -0,0 +1,2 @@ +"Our Mission :","The programme is designed to provide various tools and techniques associated with IoT, IIoT, Information and Computing Technology (ICT) and System Engineering, with special focus on additive manufacturing (AM) or 3D printing and near net shape manufacturing processes." +"Our Vision :","This programme focuses on some of the disruptive innovations that the last decade has been witnessed to, namely, Internet of Things (IoT), Robotics, Additive Manufacturing (3D Printing), Industrial Automation, Artificial Intelligence, Machine Learning, etc. These technologies have a huge potential to shape the future of mankind. Smart manufacturing, being an important aspect of the Industrial Internet of Things (IIoT) is the next industrial revolution. Smart manufacturing integrates data and information from multiple open and vendor applications and products to form new solutions. It can be applied to a single machine line, an entire factory or across a network of manufacturers, suppliers and customers. This new area of innovation will optimize the entire manufacturing industry to create higher quality products at lower prices, improve productivity, increase energy efficiency, and sustain safer plants." \ No newline at end of file diff --git a/lib/Components/appBar.dart b/lib/Components/appBar.dart index 9f4cb686..bdf75464 100644 --- a/lib/Components/appBar.dart +++ b/lib/Components/appBar.dart @@ -8,7 +8,8 @@ class DefaultAppBar { backgroundColor: kPrimaryColor, title: Text( "Dashboard", - style: TextStyle(color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), + style: TextStyle( + color: Colors.white, fontSize: 18, fontWeight: FontWeight.bold), ), actions: [ Padding( diff --git a/lib/Components/faculty_card.dart b/lib/Components/faculty_card.dart new file mode 100644 index 00000000..d541d8ce --- /dev/null +++ b/lib/Components/faculty_card.dart @@ -0,0 +1,62 @@ +import 'package:flutter/material.dart'; + +class FacultyCard extends StatelessWidget { + final String name; + final String email; + final String department; + final String researchInterest; + + const FacultyCard({ + Key? key, + required this.name, + required this.email, + required this.department, + required this.researchInterest, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Flexible( + child: SizedBox( + height: 300, + child: Card( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + margin: EdgeInsets.all(10.0), + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + CircleAvatar( + radius: 40.0, + backgroundImage: AssetImage('assets/unknown.jpg'), + ), + const SizedBox(height: 8), + Text( + name, + style: Theme.of(context).textTheme.headline6, + ), + const SizedBox(height: 8), + Text( + email, + style: Theme.of(context).textTheme.subtitle1, + ), + const SizedBox(height: 8), + Text( + department, + style: Theme.of(context).textTheme.subtitle1, + ), + const SizedBox(height: 8), + Text( + researchInterest, + style: Theme.of(context).textTheme.subtitle1, + ), + ], + ), + ), + ), + )); + } +} diff --git a/lib/Components/side_drawer.dart b/lib/Components/side_drawer.dart index be08db0e..f0e6a1b2 100644 --- a/lib/Components/side_drawer.dart +++ b/lib/Components/side_drawer.dart @@ -121,6 +121,11 @@ class _SideDrawerState extends State { pageMover: '/programme_curriculum_home', isActive: true, ), + ModulesPadding( + line: 'Department', + pageMover: '/department_homepage', + isActive: true, + ), ModulesPadding( line: 'Gymkhana Module', pageMover: '/gymkhana_homepage'), diff --git a/lib/api.dart b/lib/api.dart index 802bee2d..fd7dacf5 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -29,6 +29,10 @@ const kGymkhanaMemberRecords = '/api/gymkhana/members_record'; //HealthCentre String kHealthCentreStudent = "/healthcenter/api/student"; +//Department +String kFetchAnnouncement = "/dep/fetchAnnouncements/"; +String kAddNewAnnouncement = "/dep/addNewAnnouncement/"; + //------------Screens------------ //screens/Academic/Current_Semester diff --git a/lib/main.dart b/lib/main.dart index 9ca81ff8..83374e45 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,6 +4,7 @@ import 'package:fusion/screens/Academic/Add_Drop_Courses/add_drop_courses.dart'; import 'package:fusion/screens/Complaint/ComplaintHistory/complain_history.dart'; import 'package:fusion/screens/Complaint/Feedback/feedback.dart'; import 'package:fusion/screens/Complaint/LodgeComplaint/lodge_complaint.dart'; +import 'package:fusion/screens/Department/Announcements.dart'; import 'package:fusion/screens/Establishment/establishment_home_page.dart'; import 'package:fusion/screens/Library/Book_Search.dart'; import 'package:fusion/screens/Library/dues.dart'; @@ -42,6 +43,15 @@ import 'package:fusion/screens/Healthcenter/viewschedule.dart'; import 'package:fusion/screens/Healthcenter/history.dart'; import 'package:fusion/screens/Healthcenter/HealthCenter.dart'; import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/screens/Department/DepartmentHomepage.dart'; +import 'package:fusion/screens/Department/AboutUs.dart'; +import 'package:fusion/screens/Department/Announcements.dart'; +import 'package:fusion/screens/Department/Achievements.dart'; +import 'package:fusion/screens/Department/Students.dart'; +import 'package:fusion/screens/Department/Faculty.dart'; +import 'package:fusion/screens/Department/Alumni.dart'; +import 'package:fusion/screens/Department/Facilities.dart'; +import 'package:fusion/screens/Department/PostAnnouncement.dart'; void main() { WidgetsFlutterBinding.ensureInitialized(); @@ -59,76 +69,73 @@ void main() { class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - MediaQueryData windowData = - MediaQueryData.fromWindow(WidgetsBinding.instance.window); - windowData = windowData.copyWith( - textScaleFactor: 1, - ); - return MediaQuery( - data: windowData, - child: MaterialApp( - useInheritedMediaQuery: true, - title: 'Fusion', - debugShowCheckedModeBanner: false, - theme: ThemeData( - // primarySwatch: Colors.blueGrey, - // colorSchemeSeed: Color(0xFF2085D0), - colorSchemeSeed: Color(0xFFF36C35), - fontFamily: 'Nunito', - useMaterial3: true, - ), - initialRoute: '/landing', - routes: { - '/landing': (context) => LandingPage(), - '/login_page': (context) => LoginPage(), - '/dashboard': (context) => Dashboard(), - '/academic_home_page': (context) => AcademicHomePage( - ModalRoute.of(context)!.settings.arguments.toString()), - '/academic_home_page/current_semester_home_page': (context) => - CurrentSemesterHomePage(), - '/academic_home_page/registration_home_page': (context) => - RegistrationHomePage(), - '/academic_home_page/bonafide': (context) => Bonafide(), - '/academic_home_page/branch_change': (context) => BranchChange(), - '/academic_home_page/attendance': (context) => Attendance(), - '/academic_home_page/dues': (context) => Dues(), - '/academic_home_page/thesis': (context) => ThesisHomePage(), - '/academic_home_page/performance': (context) => Performance(), - '/academic_home_page/add_drop_courses': (context) => AddDropCourses(), - '/programme_curriculum_home': (context) => ProgrammeCurriculumHome(), - '/programme_curriculum_home/programme': (context) => Programme(), - '/programme_curriculum_home/batches': (context) => Batches(), - '/programme_curriculum_home/discipline': (context) => Discipline(), - '/programme_curriculum_home/curriculum': (context) => Curriculum(), - '/programme_curriculum_home/programme_info': (context) => - ProgrammeInfo(), - '/programme_curriculum_home/courses': (context) => Courses(), - '/programme_curriculum_home/courses_info': (context) => CoursesInfo(), - '/establishment': (context) => Establishment(), - '/gymkhana_homepage': (context) => GymkhanaHomepage(), - '/gymkhana_homepage/apply': (context) => Apply(), - '/gymkhana_homepage/polls': (context) => Polls(), - '/gymkhana_homepage/clubs': (context) => Club(), - '/gymkhana_homepage/member_records': (context) => Records(), - '/library_homepage': (context) => LibraryHomeScreen(), - '/library_homepage/book_search': (context) => BookSearch(), - '/library_homepage/issued_items': (context) => IssuedItems(), - '/library_homepage/dues': (context) => LibraryDues(), - '/complaint': (context) => - Complaint(ModalRoute.of(context)!.settings.arguments.toString()), - '/complaint/lodge_complaint': (context) => LodgeComplaint( - ModalRoute.of(context)!.settings.arguments.toString()), - '/complaint/complaint_history': (context) => ComplainHistory(), - '/complaint/feedback': (context) => ComplaintFeedBack(), - '/profile': (context) => Profile(), - '/health_center': (context) => HealthCenterMod( - ModalRoute.of(context)!.settings.arguments.toString()), - '/health_center/healthcenter': (context) => HealthCenter(), - '/health_center/feedback': (context) => FeedBack(), - '/health_center/viewschedule': (context) => ViewSchedule(), - '/health_center/history': (context) => History(), - }, - ), + + return MaterialApp( + title: 'Fusion', + debugShowCheckedModeBanner: false, + theme: ThemeData(primarySwatch: Colors.blueGrey, fontFamily: 'Nunito'), + initialRoute: '/landing', + routes: { + '/landing': (context) => LandingPage(), + '/login_page': (context) => LoginPage(), + '/dashboard': (context) => Dashboard(), + '/academic_home_page': (context) => AcademicHomePage( + ModalRoute.of(context)!.settings.arguments.toString()), + '/academic_home_page/current_semester_home_page': (context) => + CurrentSemesterHomePage(), + '/academic_home_page/registration_home_page': (context) => + RegistrationHomePage(), + '/academic_home_page/bonafide': (context) => Bonafide(), + '/academic_home_page/branch_change': (context) => BranchChange(), + '/academic_home_page/attendance': (context) => Attendance(), + '/academic_home_page/dues': (context) => Dues(), + '/academic_home_page/thesis': (context) => ThesisHomePage(), + '/academic_home_page/performance': (context) => Performance(), + '/academic_home_page/add_drop_courses': (context) => AddDropCourses(), + '/programme_curriculum_home': (context) => ProgrammeCurriculumHome(), + '/programme_curriculum_home/programme': (context) => Programme(), + '/programme_curriculum_home/batches': (context) => Batches(), + '/programme_curriculum_home/discipline': (context) => Discipline(), + '/programme_curriculum_home/curriculum': (context) => Curriculum(), + '/programme_curriculum_home/programme_info': (context) => + ProgrammeInfo(), + '/programme_curriculum_home/courses': (context) => Courses(), + '/programme_curriculum_home/courses_info': (context) => CoursesInfo(), + '/establishment': (context) => Establishment(), + '/gymkhana_homepage': (context) => GymkhanaHomepage(), + '/gymkhana_homepage/apply': (context) => Apply(), + '/gymkhana_homepage/polls': (context) => Polls(), + '/gymkhana_homepage/clubs': (context) => Club(), + '/gymkhana_homepage/member_records': (context) => Records(), + '/library_homepage': (context) => LibraryHomeScreen(), + '/library_homepage/book_search': (context) => BookSearch(), + '/library_homepage/issued_items': (context) => IssuedItems(), + '/library_homepage/dues': (context) => LibraryDues(), + '/complaint': (context) => + Complaint(ModalRoute.of(context)!.settings.arguments.toString()), + '/complaint/lodge_complaint': (context) => LodgeComplaint( + ModalRoute.of(context)!.settings.arguments.toString()), + '/complaint/complaint_history': (context) => ComplainHistory(), + '/complaint/feedback': (context) => ComplaintFeedBack(), + '/profile': (context) => Profile(), + '/health_center': (context) => HealthCenterMod( + ModalRoute.of(context)!.settings.arguments.toString()), + '/health_center/healthcenter': (context) => HealthCenter(), + '/health_center/feedback': (context) => FeedBack(), + '/health_center/viewschedule': (context) => ViewSchedule(), + '/health_center/history': (context) => History(), + '/department_homepage': (context) => DepartmentHomepage(), + '/department_homepage/aboutus': (context) => AboutUs(), + '/department_homepage/announcements': (context) => AnnouncementTable(), + '/department_homepage/faculty': (context) => Faculty(), + '/department_homepage/achievements': (context) => Achievements(), + '/department_homepage/students': (context) => Students(), + '/department_homepage/facilities': (context) => Facilities(), + '/department_homepage/alumni': (context) => Alumni(), + '/department_homepage/postannouncement': (context) => + PostAnnouncement(), + }, + ); } } diff --git a/lib/models/department.dart b/lib/models/department.dart new file mode 100644 index 00000000..d2d5bb16 --- /dev/null +++ b/lib/models/department.dart @@ -0,0 +1,45 @@ +class Announcements { + final String makerId; + final DateTime annDate; + final String message; + final String batch; + final String department; + final String programme; + final String? uploadAnnouncement; + final String id; + + Announcements({ + required this.makerId, + required this.annDate, + required this.message, + required this.batch, + required this.department, + required this.programme, + this.uploadAnnouncement, + required this.id, + }); + + factory Announcements.fromJson(Map json) { + return Announcements( + makerId: json['maker_id'], + annDate: DateTime.parse(json['ann_date']), + message: json['message'], + batch: json['batch'], + department: json['department'], + programme: json['programme'], + uploadAnnouncement: json['upload_announcement'], + id: json['id'].toString(), + ); + } + + Map toJson() => { + 'maker_id': makerId, + 'ann_date': annDate.toIso8601String(), + 'message': message, + 'batch': batch, + 'department': department, + 'programme': programme, + 'upload_announcement': uploadAnnouncement, + 'id': id, + }; +} diff --git a/lib/models/department_announcement.dart b/lib/models/department_announcement.dart new file mode 100644 index 00000000..62d0c079 --- /dev/null +++ b/lib/models/department_announcement.dart @@ -0,0 +1,37 @@ +class DepartmentAnnouncements { + String? maker_id; + DateTime? ann_date; + String? message; + String? batch; + String? department; + String? programme; + + DepartmentAnnouncements({ + this.maker_id, //id of announcement maker + this.ann_date, //announcement date and time + this.message, //message in the announcement + this.batch, + this.department, + this.programme, + }); + factory DepartmentAnnouncements.fromJson(json) { + return DepartmentAnnouncements( + maker_id: json["maker_id"], + ann_date: DateTime.parse(json["timestamp"]), + message: json["message"], + batch: json["batch"], + department: json["department"], + programme: json["programme"], + ); + } + Map toJson() { + return { + "maker_id": this.maker_id, + "ann_date": this.ann_date, + "message": this.message, + "batch": this.batch, + "department": this.department, + "programme": this.programme, + }; + } +} diff --git a/lib/screens/Department/AboutUs.dart b/lib/screens/Department/AboutUs.dart new file mode 100644 index 00000000..5ddc8275 --- /dev/null +++ b/lib/screens/Department/AboutUs.dart @@ -0,0 +1,264 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; +import 'package:csv/csv.dart'; +import 'package:flutter/foundation.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class AboutUs extends StatefulWidget { + @override + _AboutUsState createState() => _AboutUsState(); +} + +class _AboutUsState extends State { + String depart = 'CSE'; + String tab = 'about'; + String htmlData = ''; + String fieldData = ''; + bool edit = false; + late String path = ''; + List Departments = ["CSE", "ME", "SM", "ECE", "DESIGN"]; + @override + void initState() { + super.initState(); + } + + void changeData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + prefs.setString(tab + depart, fieldData); + htmlData = fieldData; + // print(fieldData); + // print(htmlData); + } catch (e) { + print(e); + } + } + + Future getData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + if (prefs.containsKey(tab + depart)) { + final Data = prefs.getString(tab + depart); + htmlData = Data!; + fieldData = htmlData; + } else { + final Data = await rootBundle + .loadString('db/Dep/' + tab + '/' + depart + '.html'); + prefs.setString(tab + depart, Data); + // print(depart); + htmlData = Data; + fieldData = htmlData; + } + } catch (e) { + print(e); + } + } + + @override + Widget build(BuildContext context) { + double kHeight = MediaQuery.of(context).size.height; + double kWidth = MediaQuery.of(context).size.width; + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: !edit + ? FutureBuilder( + future: getData(), + builder: (BuildContext context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error loading data')); + } else { + return Column( + children: [ + Row( + children: [ + for (int i = 0; i < Departments.length; i++) ...[ + Column( + children: [ + Container( + height: kHeight * 0.05, + width: kWidth * 0.18, + margin: EdgeInsets.all(kWidth * 0.01), + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.black)), + child: Text( + Departments[i], + style: TextStyle( + color: Colors.white, + fontSize: kWidth * 0.025), + ), + onPressed: () => { + // print(Departments[i]), + setState(() { + depart = Departments[i]; + edit = false; + getData(); + }) + }, + ), + ) + ], + ) + ] + ], + ), + if (!edit) ...[ + Flexible( + flex: 1, + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + child: Flexible( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(kWidth * 0.05), + child: HtmlWidget( + "

" + + depart + + " Department

" + + htmlData, + textStyle: TextStyle(fontSize: 20)), + ), + Container( + margin: EdgeInsets.all(kHeight * 0.05), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + // print(htmlData), + // updateHtmlFile(htmlData), + setState(() { + print("edit mode on"); + edit = true; + }) + }), + child: Text( + "Edit", + style: TextStyle(fontSize: 50), + )), + ), + ) + ], + )), + ))) + ] else ...[ + SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + fieldData = value; + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: + TextStyle(fontSize: 50))), + ), + ) + ], + )), + )) + ] + ], + ); + } + }) + : SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + setState(() { + fieldData = value; + }); + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: TextStyle(fontSize: 50))), + ), + ) + ], + )), + )), + ); + } +} diff --git a/lib/screens/Department/Achievements.dart b/lib/screens/Department/Achievements.dart new file mode 100644 index 00000000..142eefaa --- /dev/null +++ b/lib/screens/Department/Achievements.dart @@ -0,0 +1,266 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; +import 'package:flutter/services.dart' show rootBundle; +import 'package:path_provider/path_provider.dart'; +import 'package:shared_preferences/shared_preferences.dart'; + +class Achievements extends StatefulWidget { + @override + _AchievementsState createState() => _AchievementsState(); +} + +class _AchievementsState extends State { + String depart = 'CSE'; + String tab = 'achievements'; + String htmlData = ''; + String fieldData = ''; + late String user_type = ""; + bool edit = false; + late String path = ''; + List Departments = ["CSE", "ME", "SM", "ECE", "DESIGN"]; + @override + void initState() { + super.initState(); + } + + void changeData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + prefs.setString(tab + depart, fieldData); + htmlData = fieldData; + // print(fieldData); + // print(htmlData); + } catch (e) { + print(e); + } + } + + Future getData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + if (prefs.containsKey(tab + depart)) { + final Data = prefs.getString(tab + depart); + htmlData = Data!; + fieldData = htmlData; + } else { + final Data = await rootBundle + .loadString('db/Dep/' + tab + '/' + depart + '.html'); + prefs.setString(tab + depart, Data); + // print(depart); + htmlData = Data; + fieldData = htmlData; + } + } catch (e) { + print(e); + } + } + + @override + Widget build(BuildContext context) { + double kHeight = MediaQuery.of(context).size.height; + double kWidth = MediaQuery.of(context).size.width; + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: !edit + ? FutureBuilder( + future: getData(), + builder: (BuildContext context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error loading data')); + } else { + return Column( + children: [ + Row( + children: [ + for (int i = 0; i < Departments.length; i++) ...[ + Column( + children: [ + Container( + height: kHeight * 0.05, + width: kWidth * 0.18, + margin: EdgeInsets.all(kWidth * 0.01), + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.black)), + child: Text( + Departments[i], + style: TextStyle( + color: Colors.white, + fontSize: kWidth * 0.025), + ), + onPressed: () => { + // print(Departments[i]), + setState(() { + depart = Departments[i]; + edit = false; + getData(); + }) + }, + ), + ) + ], + ) + ] + ], + ), + if (!edit) ...[ + Flexible( + flex: 1, + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + child: Flexible( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(kWidth * 0.05), + child: HtmlWidget( + "

" + + depart + + " Department

" + + htmlData, + textStyle: TextStyle(fontSize: 20)), + ), + Container( + margin: EdgeInsets.all(kHeight * 0.05), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + // print(htmlData), + // updateHtmlFile(htmlData), + setState(() { + print("edit mode on"); + edit = true; + }) + }), + child: Text( + "Edit", + style: TextStyle(fontSize: 50), + )), + ), + ) + ], + )), + ))) + ] else ...[ + SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + fieldData = value; + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: + TextStyle(fontSize: 50))), + ), + ) + ], + )), + )) + ] + ], + ); + } + }) + : SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + setState(() { + fieldData = value; + }); + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: TextStyle(fontSize: 50))), + ), + ) + ], + )), + )), + ); + } +} diff --git a/lib/screens/Department/Alumni.dart b/lib/screens/Department/Alumni.dart new file mode 100644 index 00000000..00115157 --- /dev/null +++ b/lib/screens/Department/Alumni.dart @@ -0,0 +1,33 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; + +class Alumni extends StatefulWidget { + @override + _AlumniState createState() => _AlumniState(); +} + +class _AlumniState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: Text( + "Welcome to Alumni", + style: TextStyle( + fontSize: 35, + ), + textAlign: TextAlign.center, + ), + ); + } +} diff --git a/lib/screens/Department/Announcements.dart b/lib/screens/Department/Announcements.dart new file mode 100644 index 00000000..ebc3764c --- /dev/null +++ b/lib/screens/Department/Announcements.dart @@ -0,0 +1,349 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'package:flutter/services.dart'; + +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; + +import 'package:csv/csv.dart'; +import 'package:flutter/foundation.dart'; +import 'package:fusion/models/department.dart'; +import 'package:fusion/services/announcement_service.dart'; +import 'package:fusion/Components/pdf_view.dart'; + +class AnnouncementTable extends StatefulWidget { + @override + _AnnouncementTableState createState() => _AnnouncementTableState(); +} + +class _AnnouncementTableState extends State { + late Future> _announcementsFuture; + bool _loading = true; + late ProfileService profileService; + late String user_type = ""; + late ProfileData data2; + late AnnouncementService announcementService; + // late Announcements announcementsData; + @override + void initState() { + super.initState(); + profileService = + ProfileService(); // calling profile service to get user's data + announcementService = AnnouncementService(); + getData(); + print(user_type); + _announcementsFuture = _fetchAnnouncements(); + } + + getData() async { + try { + Response response2 = await profileService.getProfile(); + setState(() { + data2 = ProfileData.fromJson(jsonDecode(response2.body)); + _loading = false; + }); + + user_type = data2.profile!['user_type']; + } catch (e) { + print(e); + } + } + + Future> _fetchAnnouncements() async { + // fetch the announcements from the server + // replace this with your actual API call + print("___trying to fetch data"); + late Future> data = + announcementService.fetchAnnouncements(); + print(data); + await Future.delayed(Duration(seconds: 2)); // simulate network delay + if (data != null) + return data; + else + return [ + Announcements( + makerId: "Atul Gupta", + annDate: DateTime.parse('2023-04-01T12:00:00Z'), + message: "Lorem ipsum dolor sit amet.", + batch: "2021", + department: "Computer Science", + programme: "B.Tech", + uploadAnnouncement: "https://example.com/announcement1.pdf", + id: '1', + ), + Announcements( + makerId: "Irshad Ahmad Ansari", + annDate: DateTime.parse('2023-04-02T12:00:00Z'), + message: "Consectetur adipiscing elit.", + batch: "2022", + department: "Information Technology", + programme: "M.Tech", + uploadAnnouncement: null, + id: '1', + ), + Announcements( + makerId: "V.K Jain", + annDate: DateTime.parse('2023-04-03T12:00:00Z'), + message: + "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", + batch: "2023", + department: "Data Science", + programme: "Ph.D", + uploadAnnouncement: "https://example.com/announcement3.pdf", + id: '1', + ), + ]; + } + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + resizeToAvoidBottomInset: false, + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: Center( + child: Column(children: [ + if (user_type == 'faculty' || user_type == 'Admin') ...[ + TextButton( + style: ButtonStyle( + backgroundColor: MaterialStateProperty.all( + Color.fromARGB(255, 102, 243, 106)), + foregroundColor: MaterialStateProperty.all( + Color.fromARGB(255, 251, 253, 254)), + ), + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/postannouncement"); + }, + child: Text( + "Post Announcement", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + )) + ], + Expanded( + child: FutureBuilder>( + future: _announcementsFuture, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + // show a loading indicator while fetching the announcements + return CircularProgressIndicator(); + } else if (snapshot.hasError) { + // show an error message if there was an error fetching the announcements + return Text("Error: ${snapshot.error}"); + } else { + // show the table of announcements + final announcements = snapshot.data!; + return SingleChildScrollView( + scrollDirection: Axis.vertical, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Flexible( + fit: FlexFit.loose, + child: DataTable( + columns: [ + DataColumn( + label: Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + "Announcement Date", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + numeric: true, + ), + DataColumn( + label: Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + "Announcement By", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + numeric: true, + ), + DataColumn( + label: Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + "Programme", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + numeric: true, + ), + DataColumn( + label: Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + "Batch", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + numeric: true, + ), + DataColumn( + label: Flexible( + child: SizedBox( + width: 200, // set the desired width + child: Text( + "Message", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataColumn( + label: Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + "File", + style: TextStyle( + fontWeight: FontWeight.bold, + ), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + numeric: true, + ), + ], + rows: announcements.map((announcement) { + return DataRow(cells: [ + DataCell( + Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + announcement.annDate.toString(), + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataCell( + Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + announcement.makerId, + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataCell( + Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + announcement.programme, + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataCell( + Flexible( + child: SizedBox( + width: 100, // set the desired width + child: Text( + announcement.batch, + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataCell( + Flexible( + child: SizedBox( + width: 200, // set the desired width + child: Text( + announcement.message, + overflow: TextOverflow.visible, + softWrap: true, + ), + ), + ), + ), + DataCell(Flexible( + child: SizedBox( + width: 100, // set the desired width + child: announcement.uploadAnnouncement != null + ? ElevatedButton( + onPressed: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => + PDFViewerFromUrl( + url: announcement + .uploadAnnouncement ?? + "", + label: announcement.message, + ), + ), + ); + }, + child: Text('view'), + ) + : Text("N/A"), + ), + )), + ]); + }).toList(), + )), + ), + ); + } + }, + )) + ]), + ), + )); + } +} diff --git a/lib/screens/Department/DepartmentHomepage.dart b/lib/screens/Department/DepartmentHomepage.dart new file mode 100644 index 00000000..1e5d0aa0 --- /dev/null +++ b/lib/screens/Department/DepartmentHomepage.dart @@ -0,0 +1,317 @@ +import 'dart:async'; +import 'package:fusion/constants.dart'; +import 'dart:convert'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:http/http.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +class DepartmentHomepage extends StatefulWidget { + @override + _DepartmentHomepageState createState() => _DepartmentHomepageState(); +} + +Color textColor = Colors.black; + +class _DepartmentHomepageState extends State { + late String name = ""; + late String studentType = ""; + late ProfileData data2; + late String user_type = ""; + bool _loading = true; + late ProfileService profileService; + @override + void initState() { + super.initState(); + + profileService = + ProfileService(); // calling profile service to get user's data + + getData(); // storing user's data in their respective variables + } + + getData() async { + try { + Response response2 = await profileService.getProfile(); + setState(() { + data2 = ProfileData.fromJson(jsonDecode(response2.body)); + _loading = false; + }); + name = data2.user!['first_name'] + ' ' + data2.user!['last_name']; + studentType = data2.profile!['department']!['name'] + + ' ' + + data2.profile!['user_type']; + user_type = data2.profile!['user_type']; + } catch (e) { + print(e); + } + } + + @override + Widget build(BuildContext context) { + double kHeight = MediaQuery.of(context).size.height; + double kWidth = MediaQuery.of(context).size.width; + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: ListView( + children: [ + Card( + elevation: 2.0, + margin: EdgeInsets.symmetric(horizontal: 50.0, vertical: 20.0), + shadowColor: Colors.black, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 20.0), + width: 170.0, + height: 170.0, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/unknown.jpg'), + fit: BoxFit.cover, + ), + ), + ), + SizedBox( + height: 10.0, + ), + Text( + //NAME OF USER + name, + style: TextStyle(fontSize: 20.0, color: Colors.black), + ), + SizedBox( + height: 10.0, + ), + Text( + // users brnch and role(faculty/ student /admin) + studentType, + ), + SizedBox( + height: 10.0, + ), + ], + ), + ), + Container( + height: 0.5 * kHeight, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/aboutus"); + }, + child: Column( + children: [ + Icon( + Icons.info, + color: kPrimaryColor, + size: 45.0, + ), + Text('About Us', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/facilities"); + }, + child: Column( + children: [ + Icon( + Icons.article_rounded, + color: kPrimaryColor, + size: 45.0, + ), + Text('Facilities', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/faculty"); + }, + child: Column( + children: [ + Icon( + Icons.attribution_outlined, + color: kPrimaryColor, + size: 45.0, + ), + Text('Faculty', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed(context, + "/department_homepage/achievements"); + }, + child: Column( + children: [ + Icon( + Icons.emoji_events, + color: kPrimaryColor, + size: 45.0, + ), + Text('Achievements', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + ], + ), + Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/students"); + }, + child: Column( + children: [ + Icon( + Icons.group, + color: kPrimaryColor, + size: 45.0, + ), + Text('Students', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed(context, + "/department_homepage/announcements"); + }, + child: Column( + children: [ + Icon( + Icons.volume_down_outlined, + color: kPrimaryColor, + size: 45.0, + ), + Text('Announcements', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () { + Navigator.pushNamed( + context, "/department_homepage/alumni"); + }, + child: Column( + children: [ + Icon( + FontAwesomeIcons.graduationCap, + color: kPrimaryColor, + size: 45.0, + ), + Text('Alumni', + style: TextStyle(color: textColor)), + ], + ), + ), + ], + ), + ), + SizedBox( + height: 80.0, + width: 150.0, + child: Column( + children: [ + TextButton( + onPressed: () {}, + child: Column( + children: [ + // Icon( + // Icons.app_registration, + // size: 45.0, + // ), + Text(''), + ], + ), + ), + ], + ), + ), + ], + ), + ], + ), + ), + ], + )); + } +} diff --git a/lib/screens/Department/Facilities.dart b/lib/screens/Department/Facilities.dart new file mode 100644 index 00000000..35e05ea5 --- /dev/null +++ b/lib/screens/Department/Facilities.dart @@ -0,0 +1,264 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; +import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +// import 'package:my_app/html_view.dart'; + +class Facilities extends StatefulWidget { + @override + _FacilitiesState createState() => _FacilitiesState(); +} + +class _FacilitiesState extends State { + String depart = 'CSE'; + String tab = 'facilities'; + String htmlData = ''; + String fieldData = ''; + late String user_type = ""; + bool edit = false; + late String path = ''; + List Departments = ["CSE", "ME", "SM", "ECE", "DESIGN"]; + @override + void initState() { + super.initState(); + } + + void changeData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + prefs.setString(tab + depart, fieldData); + htmlData = fieldData; + // print(fieldData); + // print(htmlData); + } catch (e) { + print(e); + } + } + + Future getData() async { + try { + SharedPreferences prefs = await SharedPreferences.getInstance(); + if (prefs.containsKey(tab + depart)) { + final Data = prefs.getString(tab + depart); + htmlData = Data!; + fieldData = htmlData; + } else { + final Data = await rootBundle + .loadString('db/Dep/' + tab + '/' + depart + '.html'); + prefs.setString(tab + depart, Data); + // print(depart); + htmlData = Data; + fieldData = htmlData; + } + } catch (e) { + print(e); + } + } + + @override + Widget build(BuildContext context) { + double kHeight = MediaQuery.of(context).size.height; + double kWidth = MediaQuery.of(context).size.width; + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: !edit + ? FutureBuilder( + future: getData(), + builder: (BuildContext context, AsyncSnapshot snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError) { + return Center(child: Text('Error loading data')); + } else { + return Column( + children: [ + Row( + children: [ + for (int i = 0; i < Departments.length; i++) ...[ + Column( + children: [ + Container( + height: kHeight * 0.05, + width: kWidth * 0.18, + margin: EdgeInsets.all(kWidth * 0.01), + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.black)), + child: Text( + Departments[i], + style: TextStyle( + color: Colors.white, + fontSize: kWidth * 0.025), + ), + onPressed: () => { + // print(Departments[i]), + setState(() { + depart = Departments[i]; + edit = false; + getData(); + }) + }, + ), + ) + ], + ) + ] + ], + ), + if (!edit) ...[ + Flexible( + flex: 1, + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + child: Flexible( + child: Column( + children: [ + Container( + margin: EdgeInsets.all(kWidth * 0.05), + child: HtmlWidget( + "

" + + depart + + " Department

" + + htmlData, + textStyle: TextStyle(fontSize: 20)), + ), + Container( + margin: EdgeInsets.all(kHeight * 0.05), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + // print(htmlData), + // updateHtmlFile(htmlData), + setState(() { + print("edit mode on"); + edit = true; + }) + }), + child: Text( + "Edit", + style: TextStyle(fontSize: 50), + )), + ), + ) + ], + )), + ))) + ] else ...[ + SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + fieldData = value; + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all< + Color>(Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: + TextStyle(fontSize: 50))), + ), + ) + ], + )), + )) + ] + ], + ); + } + }) + : SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Container( + margin: EdgeInsets.all(kWidth * 0.035), + child: Flexible( + fit: FlexFit.loose, + child: Column( + children: [ + Container( + child: TextFormField( + maxLines: 20, + style: TextStyle(fontSize: 20), + initialValue: htmlData, + onChanged: (value) { + print("value changed"); + setState(() { + fieldData = value; + }); + }), + ), + Container( + margin: EdgeInsets.all(kWidth * 0.030), + child: SizedBox( + height: kHeight * 0.1, + width: kWidth * 0.4, + child: ElevatedButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all( + Colors.green), + ), + onPressed: (() => { + print("pressed done"), + changeData(), + setState(() { + edit = false; + }) + }), + child: Text("Done", + style: TextStyle(fontSize: 50))), + ), + ) + ], + )), + )), + ); + } +} diff --git a/lib/screens/Department/Faculty.dart b/lib/screens/Department/Faculty.dart new file mode 100644 index 00000000..4c68e577 --- /dev/null +++ b/lib/screens/Department/Faculty.dart @@ -0,0 +1,77 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; +import 'package:fusion/Components/faculty_card.dart'; + +class Faculty extends StatefulWidget { + @override + _FacultyState createState() => _FacultyState(); +} + +class _FacultyState extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: Container( + child: SingleChildScrollView( + scrollDirection: Axis.vertical, + child: Column( + children: [ + Row( + children: [ + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + ], + ), + Row( + children: [ + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + ], + ), + Row( + children: [ + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + FacultyCard( + name: 'John Smith', + email: 'john.smith@university.edu', + department: 'Computer Science', + researchInterest: 'Artificial Intelligence'), + ], + ) + ], + ), + )))); + } +} diff --git a/lib/screens/Department/PostAnnouncement.dart b/lib/screens/Department/PostAnnouncement.dart new file mode 100644 index 00000000..c3f22ad5 --- /dev/null +++ b/lib/screens/Department/PostAnnouncement.dart @@ -0,0 +1,153 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:file_picker/file_picker.dart'; +import 'package:fusion/services/announcement_service.dart'; + +class PostAnnouncement extends StatefulWidget { + @override + _PostAnnouncementState createState() => _PostAnnouncementState(); +} + +class _PostAnnouncementState extends State { + List _programmeTypes = [ + 'B.Tech', + "B.Des", + 'M.Tech', + 'M.Des', + 'PhD', + ]; + late String _selectedProgrammeType = _programmeTypes[0]; + + List _batches = ["2018", "2019", "2020", "2021", "2022"]; + late String _selectedBatch = _batches[0]; + + List _departments = ["CSE", "ME", "ECE", "SM", "DS"]; + late String _selectedDepartment = _departments[0]; + late AnnouncementService announcementService; + String _announcementDetails = ''; + String? _uploadedFileUrl; + @override + void initState() { + super.initState(); + // calling profile service to get user's data + announcementService = AnnouncementService(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + resizeToAvoidBottomInset: false, + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: SingleChildScrollView( + + child: Padding( + padding: EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Programme Type:'), + DropdownButton( + value: _selectedProgrammeType, + onChanged: (String? newValue) { + setState(() { + _selectedProgrammeType = newValue!; + }); + }, + items: _programmeTypes.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + SizedBox(height: 16.0), + Text('Batch:'), + DropdownButton( + value: _selectedBatch, + onChanged: (String? newValue) { + setState(() { + _selectedBatch = newValue!; + }); + }, + items: _batches.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + SizedBox(height: 16.0), + Text('Department:'), + DropdownButton( + value: _selectedDepartment, + onChanged: (String? newValue) { + setState(() { + _selectedDepartment = newValue!; + }); + }, + items: _departments.map((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList(), + ), + SizedBox(height: 16.0), + Text('Announcement Details:'), + TextFormField( + onChanged: (value) { + _announcementDetails = value; + }, + maxLines: 5, + decoration: InputDecoration( + hintText: 'Enter announcement details', + ), + ), + SizedBox(height: 16.0), + Text('Upload File:'), + ElevatedButton( + onPressed: () async { + final result = await FilePicker.platform.pickFiles(); + if (result != null) { + setState(() { + _uploadedFileUrl = result.files.single.path; + }); + } else { + print("file not picked"); + } + }, + child: Text('Choose File'), + ), + SizedBox(height: 16.0), + _uploadedFileUrl != null + ? Text('File uploaded successfully!') + : Container(), + SizedBox(height: 32.0), + ElevatedButton( + onPressed: () { + _publishAnnouncement(); + }, + child: Text('Publish'), + ), + ], + ), + ), + ), + ); + } + + void _publishAnnouncement() { + announcementService.addNewAnnouncement( + _selectedBatch, + _selectedProgrammeType, + _selectedDepartment, + _announcementDetails, + _uploadedFileUrl); + // print("tried"); + } +} diff --git a/lib/screens/Department/Students.dart b/lib/screens/Department/Students.dart new file mode 100644 index 00000000..91d0210f --- /dev/null +++ b/lib/screens/Department/Students.dart @@ -0,0 +1,33 @@ +import 'dart:async'; +import 'dart:convert'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:fusion/Components/appBar.dart'; +import 'package:fusion/Components/side_drawer.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:fusion/services/profile_service.dart'; +import 'package:fusion/models/profile.dart'; +import 'package:http/http.dart'; + +class Students extends StatefulWidget { + @override + _StudentsState createState() => _StudentsState(); +} + +class _StudentsState extends State { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: DefaultAppBar().buildAppBar(), + drawer: SideDrawer(), + body: Text( + "Welcome to Students", + style: TextStyle( + fontSize: 35, + ), + textAlign: TextAlign.center, + ), + ); + } +} diff --git a/lib/screens/Healthcenter/Appointment.dart b/lib/screens/Healthcenter/Appointment.dart index 8188e9d5..b8cd0e33 100644 --- a/lib/screens/Healthcenter/Appointment.dart +++ b/lib/screens/Healthcenter/Appointment.dart @@ -10,7 +10,6 @@ class Appointment extends StatefulWidget { class _AppointmentState extends State { int _value = 1; - @override Widget build(BuildContext context) { return Container( @@ -134,7 +133,9 @@ class _AppointmentState extends State { 'Submit', style: TextStyle(fontSize: 15.0), ), + // color: Colors.deepOrangeAccent, + onPressed: () {}, ), ), diff --git a/lib/screens/Healthcenter/feedback.dart b/lib/screens/Healthcenter/feedback.dart index 86fe408c..ac470eef 100644 --- a/lib/screens/Healthcenter/feedback.dart +++ b/lib/screens/Healthcenter/feedback.dart @@ -30,7 +30,6 @@ class _FeedBackState extends State { 'Submit', style: TextStyle(fontSize: 15.0), ), - // color: Colors.deepOrangeAccent, onPressed: () {}, ), ), diff --git a/lib/services/announcement_service.dart b/lib/services/announcement_service.dart new file mode 100644 index 00000000..f466c633 --- /dev/null +++ b/lib/services/announcement_service.dart @@ -0,0 +1,78 @@ +import 'dart:io'; +import 'dart:typed_data'; +import 'package:http/http.dart' as http; +import 'package:fusion/models/department.dart'; +import 'dart:convert'; +import 'package:fusion/api.dart'; +import 'package:fusion/services/service_locator.dart'; +import 'package:fusion/services/storage_service.dart'; +import 'package:path/path.dart'; + +class AnnouncementService { + final String baseUrl = "http://172.27.16.214"; + // ignore: non_constant_identifier_names + var token = "134712e89ec9dce6dc7b6c2313a7c0b7d5a82128"; + var storage_service = locator(); + + Future> fetchAnnouncements() async { + //storage_service.userInDB?.token ; + // var token = + // storage_service.userInDB?.token; //this is the line for actual token + final response = await http.get(Uri.parse(baseUrl + kFetchAnnouncement), + headers: {'Authorization': 'Token ' + (token ?? "")}); + // print(response.body); + + if (response.statusCode == 200) { + List body = jsonDecode(response.body)['payload']; + List announcements = + body.map((dynamic item) => Announcements.fromJson(item)).toList(); + return announcements; + } else { + throw Exception('Failed to load announcements'); + } + } + + Future addNewAnnouncement( + String batch, + String programme, + String department, + String message, + String? upload_announcement, + ) async { + // var token = storage_service.userInDB?.token; //this is the line for actual token + var request = + http.MultipartRequest('POST', Uri.parse(baseUrl + kAddNewAnnouncement)); + request.headers.addAll({ + 'Authorization': 'Token ${token ?? ""}', + }); + request.fields['batch'] = batch; + request.fields['programme'] = programme; + request.fields['department'] = department; + request.fields['message'] = message; + + if (upload_announcement != null) { + var file = new File(upload_announcement); + var fileStream = http.ByteStream(file.openRead()); + var fileLength = await file.length(); + var fileName = file.path.split('/').last; + var multipartFile = http.MultipartFile( + 'upload_announcement', + fileStream, + fileLength, + filename: fileName, + ); + request.files.add(multipartFile); + } else { + request.fields['upload_announcement'] = ""; + } + + final response = await request.send(); + final responseStr = await response.stream.bytesToString(); + if (response.statusCode == 200) { + // print("done"); + return "Announcement added successfully"; + } else { + throw Exception('Failed to add announcement: $responseStr'); + } + } +} diff --git a/lib/services/profile_service.dart b/lib/services/profile_service.dart index 7214af5a..89ee7fe7 100644 --- a/lib/services/profile_service.dart +++ b/lib/services/profile_service.dart @@ -16,6 +16,7 @@ class ProfileService { Map headers = { 'Authorization': 'Token ' + (storage_service.userInDB?.token ?? "") }; + print(headers); print("fetching profile"); var client = http.Client(); http.Response response = await client.get( diff --git a/pubspec.yaml b/pubspec.yaml index 49030f0b..ec756143 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,10 @@ dependencies: path_provider: ^2.0.8 open_file: ^3.2.1 flutter_html: ^2.2.1 + font_awesome_flutter: ^10.4.0 + flutter_widget_from_html: ^0.9.1 + my_app: ^1.0.0 + file_picker: ^4.6.1 @@ -69,6 +73,9 @@ flutter: - assets/unknown.jpg - assets/profile_pic.png - db/ + - db/Dep/achievements/ + - db/Dep/about/ + - db/Dep/facilities/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware.