Chapter I-CV
Chapter I-CV
Chapter 1
1.1 Introduction
Every day, small and large businesses deal with many types of records and manual
information dissemination. These records and information might be used for historical,
organization's future operations and choices. The Philippine government is a strong supporter
of social welfare. Every day, the Municipal Social Welfare and Development (MSWD)
Jasaan, like any other agency, generates a large amount of documents. These large printed
papers are stacked and kept at the records office and relevant departments for safekeeping
and future reference. The Municipality of Social Welfare and Development (MSWD) Jasaan
their record system is outdated, making it difficult to retrieve and track records. Furthermore,
it is difficult for them to tell each member of the organization's latest information or
Social Welfare and Development (MSWD) in Jasaan wants to improve social service
delivery to the poor and strengthen the department's capabilities in social protection. MSWD
has urged for the quick extension and enhancement of basic social protection programs,
specifically for people with disabilities, single parents, older citizens, children in need of
social protection, teenagers in need of special protection, women in very tough situations,
With this, MSWD Jasaan embarked into record's digitization for its management to
ensure the preservation of permanent and valuable papers, secured and accessible for future
2
reference as required by the organization's different offices based on existing rules and
regulations in record management. A mobile application for users that will update the
announcements of the MSWD Jasaan, with the help of this system and mobile application,
records safekeeping and retrieval bring comfort for the records officer and a hassle-free
A Municipal Social Welfare and Development System with SMS Notifier is a software
program used to administer a local government unit's social welfare and development
services. The purpose of this system is to automate and streamline the procedures involved in
providing social welfare and development services to the inhabitants of a certain municipality
or city. The system includes an SMS notifier, which delivers automated notifications to
recipients of social welfare and development programs. The SMS notifier can be used to
notify recipients of impending activities, appointments, or events associated with the services
they are receiving. This functionality may also be used to remind recipients of upcoming
appointments, submission deadlines, and other key dates relating to the services they are
receiving. The Municipal Social Welfare and Development System with SMS Notifier may
also be used to track and manage social welfare and development service recipients. It can
maintain track of the services received by each recipient, as well as the status of their
applications and the status of their cases. This system may also create information on the
number of beneficiaries served, the types of services delivered, and the service success rate.
In conclusion, the Municipal Social Welfare and Development System with SMS Notifier is
an effective instrument for assisting local government units in providing improved social
welfare and development services to its residents. This system can assist in automating and
streamlining the procedures involved in providing social welfare and development services,
3
as well as providing beneficiaries with timely information about significant events and
deadlines.
The researchers used the IPO (Input, Output, Process) model for their conceptual
framework. The IPO model represents a system in three stages: input, processing, and output.
Inputs are modeled as consumables and efforts that are introduced to a system at the beginning
stage of its lifecycle. Outputs are modeled as the results produced by the system.
Identification Developing a
of the mechanism,
process flow and MSWD Jasaan
development
other
tools that will Management System
documentation
be involved in related on how the with SMS Notifier
the project system will work
( visual studio)
Development
Hardware Coding/
Requirements Programming
Testing
Android
Test the web
Mobile
application and
Application
mobile application
PC/Laptop
Implementation
Initializing and
testing for errors
4
The input-process-output model is used in the conceptual framework to depict the stages
of project development. This provides as a guide for carrying out the research. The researchers
utilized the project's development tools (Visual Studio) to create the MSWD Jasaan Management
System with SMS Notifier for further information and announcements.
Input
Knowledge Requirements - this is the process of learning about the MSWD Jasaan
Software Requirements - It is a list of the development tools that will be used in the project.
Hardware Requirements - For system access, Android mobile apps and desktop or laptop PCs
are required.
Process
Planning - is used to define the criteria and processes that will ensure and verify that data meet
System Analysis - System analysis is conducted for the purpose of studying a system or its parts
System Design - Developing a mechanism, process flow and other documentation related on
Development – Coding/programming testing, testing of the web application, and testing of the
mobile application are the development tools utilized to achieve the system.
Implementation – The system must be initialized and tested for problems before being put into
use.
Output – Municipal Social Welfare and Development Jasaan Management System with SMS
Notifier.
The Jasaan Municipal Social Welfare and Development (MSWD) office still uses
a manual method to retain records of its members, which causes issues such as
misplacing documents and taking longer to discover data for nearly a hundred members.
Traditional record retrieval and tracking took place in a huge physical location.
The main goal of this project is to ensure the preservation of permanent and
valuable papers, secured and accessible for future reference of Municipal Social
To create a MSWD mobile application that can notify the clients via SMS.
This part of the study explained the importance of developing the system to the
following:
The admin of MSWD Jasaan. The study will make it easier for MSWD administrators
to organize the preservation and indexing of permanent records, archive and track records more
Citizens. The study is primarily designed for the end users to have a simple and quick
access for sending application criteria. Since the mobile application already meets all of their
requirement, the client will just visit the office for the interview.
Office Staff/Social Worker. Social workers or staff can do their task more efficiently
and effectively.
7
Proponents. The study may help the researchers learn more about the clients' current
circumstances. The proposed study will contribute to the completion of the requirements for
The Future Researchers. The proposed study will serve as a reference for the other of
Municipal Social Welfare and Development with SMS Notifier, a web-based system, will
be deployed in the municipality of Jasaan. Citizens of the municipality can seek help from the
MSWD office online and receive a notice through SMS. The online application was designed
and developed to work with any web browser or other web-based graphical user interfaces. It
would relate to the command functions. SMS is an abbreviation for Short Message Service,
which is a communications protocol for sending and receiving text messages that may be
MSWD (Municipal of Social Welfare and Development). A welfare that will care, protect and
develop the disadvantaged sectors to become self-reliant and productive citizens in the
SMS (Short Message Service). Commonly known as texting. It's a way to send text-only
LGU (Local Government Unit). LGUs play a major role in a community's development, provide
the links between the people and government, address its community's problems and concerns,
Social Welfare - Organized public or private social services for the assistance of disadvantaged
groups specifically, which guides the government programs that assist people in need and builds
on the idea that a government has a responsibility to protect its citizens from harm.
maintenance, use and disposal of records. In this context, a record is content that documents a
business transaction. Documentation may exist in contracts, memos, paper files, electronic files,
Valuable Papers- Valuable papers and records are a type of property-casualty insurance that
covers the cost to restore or reproduce documents that have been lost or damaged by fire or
another peril.
Application - a computer software package that performs a specific function directly for an end
Financial Assistance - is any type of monetary help or aid that a person , organizations , or
government receives.
10
Chapter II
Messaging Service, which is a communication protocol that allows for the transmission of short
text messages from one mobile phone device to another. SMS, or text messaging, has essentially
taken over as today's mode of communication, with 74% of all mobile phone users sending and
receiving text messages. SMS technology has opened the path for the fast expansion and
advancement of text messaging, allowing users to broadcast SMS text messages not only from
mobile phones but also from computers using SMS software and public SMS gateways. The
connection between text messaging and SMS technology currently includes the use of the name
11
"SMS" to refer to the act of texting or sending text messages even when using a different
communications protocol. The "Face Recognition Attendance with SMS Notification" project is
designed to verify and track attendance using face recognition. The date and time of the recorded
attendance will be included in the SMS. The system will also provide SMS notifications to
absentees. The Construction Safety and Health Monitoring (CSHM) system is described in this
article as a web-based system for monitoring and analyzing construction safety and health
performance. Method: The design and development of CSHM involves the integration of internet
and database technologies in order to produce a fully automated safety and health management
solution. For the management of safety and health in construction, a set of performance metrics
for safety and health was developed. The following four key components of CSHM are presented
in a conceptual framework: (a) Web-based interfaces (templates); (b) knowledge bases; (c)
output data; and (d) benchmark groups. Results: The combined effect of these components
results in a system that enables rapid performance assessment of safety and health activities on
construction sites. Important management choices and remedial measures may potentially be
done using the CSHM's built-in functionalities before prospective dangers evolve into fatal or
injurious workplace incidents. As a result, the CSHM system will speed up the monitoring and
systems, such as record production, storage, filling, and retrieval of data. People presently live in
the so-called digital world as a result of the advancement of information and communication
technologies. Even schools and colleges are becoming more involved in the digital society.
Portals are becoming increasingly popular as a method of gathering, organizing, and displaying
material in a very consistent, customizable, and customized manner. Parents will be alerted of
12
their children's grades by SMS for the revised grades. The grades will be immediately delivered
to the parents as soon as the instructors change them. In this context, the researchers are tasked
with conducting a study on the construction of an online reservation system dubbed "Online
Reservation System with SMS Notification for Josephine Abello, DMD Dental Clinic." This
allows potential guests to reserve a room whenever they want and increases sales because
personnel are not restricted to working hours. In reality, studies suggest that a 24-hour online
reservation system boosts the amount of bookings significantly. Because tricycle operations are
typically a source of income for many residents, the BTFRB is trying their best to accommodate
all transactions in their department, but despite their efforts, there are still certain things that may
logbook. All granted franchises were submitted on the Franchising Logbook for renewal, while
all approved petitions to drop the franchise were documented on the Dropping Logbook. The
franchisor has trouble tracking the status of all registered tricycle franchisees, such as expired,
renewed, canceled, and transferred franchises, using this type of data keeping. All citations
issued on that day will be logged in the violation logbook, including payment monitoring, for the
uses to ensure that it can achieve its objectives in an efficient and effective manner. Management
systems are designed to help organizations manage their resources, processes, and people to
achieve their goals and objectives. There are many different types of management systems,
including quality management systems, environmental management systems, health and safety
13
management systems, and information security management systems, to name just a few. Each
of these systems has its own set of rules, principles, and best practices that businesses may use to
several fundamental parts, such as: Planning: The company establishes its goals, objectives, and
methods for accomplishing them. Implementation is the process through which an organization
puts its plans into action, employing processes and procedures to attain its goals. Monitoring:
The organization keeps track of its progress to ensure that it is on track to meet its goals.
Evaluation: The organization assesses its performance in relation to its goals, identifies areas for
always working to enhance its management system in order to keep it effective and efficient.
Organizations may improve their operations, decrease risks, and improve their reputation with
customers, workers, and other stakeholders by developing an effective management system. Don
"Every day, small and large businesses deal with a variety of documents, according to
Jaymer, J.M., Moyon, E.S., and Morales, E.M.O. (2021). These data could be used for historical,
measuring future activities and decisions. The Caraga Department of Social Worker and
(TAPIS) research." Social welfare is one of the Philippine government's top priorities today,
14
given that the nation has a poverty rate of 26.3%, according to the Family Income and
Expenditure Survey performed in July 2015. (Philippine Statistics Authority, 2016). The DSWD
is the federal agency in charge of dealing with such concerns in the country. Various offices,
bureaus, services, and units (OBSU) within DSWD work together to carry out the department's
tasks. This research focuses specifically on the DSWD Technical Assistance Unit (TAU), which
is in charge of administering financing for DSWD programs. These initiatives largely contribute
to the enhancement of the DSWD's programs. TAU's major purpose is to offer social protection
services efficiently and effectively through coordinated, harmonized, and timely technical
"According to Santos and Juan (2018), an organization runs information, and it has a
particular way of gathering, storing, and having quick fill-up forms. Information for collecting
and storing reports is compiled with pen and paper; nevertheless, management systems have
completely revolutionized the process of applying forms in each program. The developed
system’s concern is to help the Department of Social Welfare and Development resolve some
problems regarding their daily transactions. This department at the Municipality of Balete,
Batangas, provides forms for the Department of Social Welfare and Development. It has a
program for the Provision of Social Case Study Report, Provision of Disaster Relief Assistant,
Childhood Care and Development Program, and Provision of Senior Citizen Identification Card
(https://shorturl.ae/cpC3l).
Universities in Nigeria
information; filing The major purpose of this study was to assess the record management systems
at the Federal University of Technology, Minna, Nigeria, and Ibrahim Badamasi Babangida
University, Lapai, Nigeria. In carrying out this study, four (4) research questions were posed.
The study sample population comprised 88 staff members (46 from the establishment division of
the Federal University of Technology, Minna, and 42 from the establishment division of the
Ibrahim Badamasi Babangida University, Lapai). The instrument used for data collection was a
questionnaire. The research questions were answered using frequency and percentages. The
incompetent personnel, inadequate infrastructural facilities, and constant power failure. Based on
these findings, the following recommendations were made: efforts should be made to provide a
standby generator as an alternative to power supply, train staff to handle the universities’ records,
Chapter III
METHODOLOGY
This chapter discusses methods used in the research .This provides the flow how the
study is done.
The research was carried out in the Municipality of Jasaan, Jasaan Misamis Oriental, and
15 barangays to make the work one of the critical steps for the study's success.
This study was made by means of developmental research, which refers to the study and
analysis of the economic, social, and political factors that influence the growth and progress of a
scientists, and other experts who specialize in the field of development studies. Developmental
research can be conducted at different levels, including local, national, and international levels.
The research can focus on a wide range of topics, including poverty reduction, economic growth,
social welfare, environmental sustainability, and political stability. The ultimate goal of
development research is to identify the factors that contribute to the development of a region or
community and to develop effective policies and programs to support that development.
18
qualitative and quantitative research methods. Development research findings are used to guide
policy choices and program implementation. Similarly, a development research study may assess
improve its efficacy. In conclusion, development research is an essential discipline that seeks to
comprehend and address the economic, social, and political elements that impact the growth and
success of a certain region or community. The findings of the research are used to guide policies
and initiatives that can support sustainable development and improve the quality of life for
Figure 3
SDLC stands for Software Development Life Cycle, which is a framework for
Planning: In this phase, the development team identifies the software requirements and
objectives, assesses the feasibility of the project, and creates a project plan. The development
team collects requirements from several stakeholders such as customers, internal and external
Requirements Gathering: In this phase, the development team works with the stakeholders to
identify and document the software requirements. It involves gathering information about the
users needs and goals for the project which will guide the development team in creating a
Design: In this phase, the development team creates a high-level design for the software
application, including the architecture, user interface, and database design. System Design helps
in specifying hardware and system requirements and also helps in defining overall system
architecture. The system design specifications serve as input for the next phase of the model.
Development: In this phase, the development team writes the code for the software application,
following the design specifications. The development team writes code, performs unit testing,
and integrates components to create a functional software solution. The development phase also
involves regular communication and collaboration to ensure that the software meets their needs
and expectations.
20
Testing: In this phase, the development team tests the software application to identify and fix
bugs and ensure that it meets the requirements. It includes various types of testing such as unit
Following the SDLC process helps ensure that software applications are developed in a
structured and controlled manner, reducing risks and increasing the likelihood of success.
In order to gather the requirements for developing a prototype of the Municipal Social
Welfare and Development Management System with SMS Notifier, the researchers interviewed
MSWD beneficiaries as well as the administrator to learn about their concerns and suggestions
for the application and system. The researcher created the MSWD Jasaan Management System
with SMS Notifier for further information and announcements using development technologies
that would be employed in the project (PHP, CSS, MYSQL, and so on).
The term "unit analysis" refers to "the level of aggregation of the data collected during
the following data analysis stage." The Municipal Social Welfare Development Jasaan
Management System with SMS Notifier is the focus of this study's unit analysis. This study
focuses on assisting MSWD Jasaan social protection programs, specifically PWDs, single
parents, senior citizens, children in need of social protection, youth in need of special protection,
women in especially difficult circumstances, family heads, and other needy adults, by developing
an application that program participants can easily access. Rather of the traditional method, the
21
researcher will develop a web-based system that will save all of the documents in a database that
will maintain track of both previous and present data. The tactics of developers will help the
Data is information that contains facts that may be used to discuss and decide how to
reply to survey questions. The study's data source is a subject who can collect data for many
objectives. The Google Forms platform is used by researchers to conduct a survey for MSWD
Jasaan members. Individual interviews with the administrator of MSWD Jasaan The data in this
study is based on a qualitative approach and frequently depends on data gathering methods. The
researchers compared their function and features to those of other investigations that had
The respondents will be recruited from the Municipality of Jasaan's 15 barangays, with
referrals to the MSWD headquarters. The researchers will guarantee that the responders are
Jasaan residents. An interview with the director of the MSWD department has been scheduled as
part of the study, and respondents will be questioned using an online platform using Google
Forms. As a result, the following participants or interviewees comprise the sample population for
this study: MSWD Head, PWD, Senior Citizen, and Solo Parent; Children in Need of Social
Participants in this study are chosen using targeted sampling procedures. This sampling
approach allows the user to choose samples solely from subpopulations where the likelihood of
receiving the intended beneficiaries is higher. This is performed by selecting citizens from a
subset who exhibit a characteristic that indicates a higher possibility of the benefits being
present. Targeted sampling refers to samples that are deliberately selected based on your research
goals. This strategy may be used by researchers to collect relevant and important data and to
This research primarily proposes an efficient and effective technique for administering
the MSWD Jasaan Management System using SMS Notifier for requirement collection. The
head or staff continues to rely on traditional retrieval and tracking of records housed in a massive
physical location. This system takes a long time, and data or files are sometimes lost as a result.
management system in which users such as solo parents, PWDs, and senior citizens, children in
need of social protection, youth in need of special protection, women in particularly difficult
circumstances, family heads, and other needy adults from Jasaan municipalities will download
the app from the app store and sign-in or sign-up for user authentication. This data will be
CHAPTER IV
This chapter presents the data analysis, the study findings, and the nominal scale
questionnaire result. The findings are related to the study's research topics. In MWSD Jasaan,
data were processed to identify, explain, and elaborate the interaction between users and the
system itself.
a) User Definition
The user admin needs pc or laptop to access the web-based application through the
browser.
The application integrated web-page must allow the admin to manage reports.
The user needs a mobile phone in order to download and install the mobile
application.
View Documents.
This module provides the functionality for clients to ask assistance and add necessary
details. Users of the system namely MSWD Jasaan Management System with SMS
□ Create an account
□ Verify user
This module exclusively serves the administrator needs. It will not be accessible to any
other system user such as MSWD staff and other non-authorized personnel.
□ Manage Clients
□Add/Update
□ View Documents
□ Approved/Disapproved
□ Release Assistance
The diagram depicts the system's context. The context diagram depicts the system under
examination as a single high-level process, followed by the system's connection with various
external entities, such as users. The system administrator will be in charge of managing the
complete system; essentially, the system administrator's task will be to handle all of the reports
that are included, such as receiving requirements, arranging appointments, approving clients,
publishing announcements, and sending updates. Users can transmit personal information, obtain
MSWD SYSTEM
MANAGEMENT
USER ADMIN
NAME
REQUIREMENTS APPOINTMENT BARANGGAY
VERIFICATION ANNOUNCEMENTS
NTS
CODE
CONTACT# ANNOUNCEMENTS
UPDATES PERSONAL S
DATA
SIGN UP
ASSISTANCE
The functional breakdown of the municipal social welfare and development program in
Jasaan is illustrated. The user interface allows users to fill out any required forms or criteria. A
login form is displayed to the user for system access. After registering, the system will generate a
verification code for the user. The admin interface also has a login. The administrator can
monitor the accounts of registered users. The administrator can also see who completed the
User
Admin
The system flowchart is shown in Figures 6 and 7. The user will log in, and if they do
not already have an account, they will sign up. The system will ask for their phone number upon
registration and will provide a verification code. The system will take the user to their profile
when they have validated their account. When they provide the required documents, such as
barangay indigence, birth certificates, and so on, the admin or staff will receive and review them.
31
If all of the prerequisites are completed, the administrator will authorize the user and schedule an
appointment.
A use case diagram is a method of summarizing the details of a system and its users. The
newly created system's use case is depicted in Figure 8. The primary players are MSWD's system
ality,
potentia
l for
malware
injectio
n
Medium
Poor user Insufficie The Unautho Low Use appropriate user
authentication nt user mobile rized authentication procedures,
name and applicat access such as user name and
password ion to the password or multi-factor
authentic itself as mobile authentication, to safeguard
High ation well as applicati access to the mobile
methods the on and application.
for the informa data
mobile tion it stored
applicatio contains on it
n
High Medium
Low
34
Admin User
MOBILE APPLICATION
40
✓ Click Sign Up
✓Clients need to fill up the identifying Information to proceed for the assessment
44
✓User Profile
✓Sign out
46
✓Home Page
✓Announcements
✓User History
47
A graphical depiction of the entities, properties, and connections that comprise a system
or organization is known as an entity relationship diagram (ERD). ERDs are frequently used in
database design to illustrate a database's structure and the interactions between its many
components.
between entities are represented by lines linking the entities in an ERD. A relationship's
48
cardinality (how many instances of one thing are associated to how many instances of another
beneficiary_family_composition TEXT
interview_schedule_date DATETIME
release_schedule_date DATETIME
approve_by VARCHAR
interviewed_by VARCHAR
released_by VARCHAR
created_at DATETIME Not null
updated_at DATETIME Not null
user_id BIGINT Not null
Assessment TEXT
client_identifying_information TEXT
reference_no VARCHAR
application_status VARCHAR
Attachment TEXT
Assistance VARCHAR
Remarks VARCHAR
Cash DECIMAL Not null
Proof VARCHAR
Firstname VARCHAR
Middlename VARCHAR
Lastname VARCHAR
Extension VARCHAR
Sex VARCHAR
Date_or_birth DATETIME
Region VARCHAR
Province VARCHAR
City_or_municipality VARCHAR
District VARCHAR
Barangay VARCHAR
No_street_or_purok VARCHAR
Place_of_birth VARCHAR
Civil_status VARCHAR
Religion VARCHAR
Nationality VARCHAR
Highest_educational_attainment VARCHAR
Skills_or_occupation VARCHAR
Created_at DATETIME Not null
User_id BIGINT
Updated_at DATETIME Not null
Table 6 Beneficiary
51
Table 7 Announcement
52
With an SMS notifier, this diagram depicts the system architecture of the Municipal
Social Welfare and Development Management System. Users can access the program only if
they have an internet connection. Following registration, the system will provide the user with an
authentication verification code. Each user's data will be returned to the database, and the admin
will get the data provided by the applicants or clients. The admin will send them an SMS update
to let them know if their application was granted or denied and if they are ready for the
interview.
4.7 Development
developers design, debug, and deploy programs more easily features that
applications.
Functional requirements.
Non-functional requirements.
functioning.
The system prompts the user when excess input of mobile numbers is
inputted.
Password is hidden.
The graphic user interface design used is very simple and responsive.
54
The researchers ensure that the application will fulfill the user and client standards by
analyzing the system and the user's requirements. Researchers will be more resourceful in
developing the application if they have access to an open interaction environment.
Front End
To build this front end, the supporters will utilize Visual Studio as the scripting
language, which is used to produce web pages, and CSS codes, which may store
design information.
Notification
A SMS API is well-defined software interface which enables code to send short
messages via a SMS Gateaway SMS APIs are used to allow web applications to
easily send and receive text message through logic written for standard web
frameworks.
55
Figure 26 shows the deployment process of the application and web server. Each
component of the mobile application has a distinct role in the overall application behavior and
can be activated independently. The mobile application is made up of many components that
depend on the activities, services, or any other operations of a system. The admin goes through
the web to access the system and with its database and perform the required task.
The suggested system will be tested and ideas for future system enhancements will be
made. "Municipal Social Welfare and Development Jasaan Management System with SMS
Notifier" The proposed system aims to fulfill the deadlines for developing the system and its
features, as well as installing or implementing the system. And, before installing the system, we
evaluate and test the whole system to ensure that it satisfies all of the system's requirements. The
results of the system assessments and testing should be adequately recorded in order to verify
4.8.1 Testing
The subset software will be bug and error tested. Following the development of the
program, the team will prepare a dry run for the system to be tested in order to determine if the
system is working efficiently and effectively on the intended platform, as well as if it meets the
needs or desires of the users or clients in terms of the system's requirements or features.
Unit testing is a software testing approach that isolates specific units or components of a
software program from the rest of the application. This type of testing is done in social protection
programs for people with disabilities, single parents, senior citizens, children in need of social
family heads, and other needy adults to ensure that each component works as intended. Unit
testing is a software development approach in which individual program units or components are
evaluated in isolation to verify they function as intended. This approach assists developers in
identifying and correcting errors early in the development process, resulting in higher-quality
Developers use unit testing to build simple, automated tests that check the behavior of
each unit of code. These tests are often run whenever the code is altered or updated to ensure that
The system has been tested to ensure that it is operationally sound. The primary
purpose of this testing was to confirm that the system met all of the specifications. System
testing is a sort of software testing in which the complete system or application is evaluated as a
whole rather than individual components or parts. It is carried out to ensure that the system or
application satisfies its specifications and performs as expected in its intended environment.
During system testing, testers examine the behavior of the program in a variety of scenarios,
including conventional use cases and edge cases. They may also do performance testing, security
testing, and compatibility testing to verify that the application works properly in a variety of
contexts and scenarios. One of the primary advantages of system testing is that it helps uncover
and fix flaws that may not be obvious until the complete system has been integrated and tested.
The proponents ensured that this procedure would reliably measure the relevant
9%
10%
23% 59%
Figure 27 Illustrates users that they like the system cover all specified task and user objectives.
59
28%
72%
Figure 28 shows that the users did not find that the system provide un-correct results.
11%
25%
64%
Figure 29 shows that the user may believe that the system quickly respond.
60
28%
72%
Figure 30 illustrates that the users can easily operate and control the mobile application.
28%
72%
Figure 31 shows that the user learn to use the system easily.
61
1.4
3.2
8.2
Figure 32 shows that the user interface enable pleasing and satisfying for the user.
28%
72%
Figure 33 shows that the user shared data is accessible only by authorized person.
62
28%
72%
11%
25%
64%
Figure 35 refers to the user who was really satisfied to operate and control the mobile
application.
63
11%
25%
64%
CHAPTER V
In this study, it was made to aid the records officer and the department in the storage and
retrieval of records. MSWD mobile application include the following features; Beneficiaries are
instantly informed via SMS, Accept and assess a online and Management system. The study
specifically aimed to; help beneficiaries for easy, fast access and sending requirements through
the application; help the staffs for easy, fast access and sending requirements through
application. The newly developed system will be deployed first to the beneficiaries of MSWD
and it is beneficial also for the administrator to ensure the preservation of permanent and
valuable papers, which are secured and accessible for future reference.
5.2 Conclusion
This study helps both beneficiaries and staffs of the MSWD to make their work easier
and faster. The newly developed system helped the admins to monitor the accounts of the users
and their forms easily unlike the traditional one they need to process the forms one by one.
5.3 Recommendation
With the newly developed system, the researchers suggest the following:
1. The newly developed system to be implemented in MSWD should have a free SMS to be
used.
3. Conduct future researches in order to improve the quality of the system specifically on
the:
References
[1]Jaymer, J.M., Moyon, E.S. & Morales, E.M.O (2021). OCR based Document Archiving and
Indexing using PyTesseract: A Record Management System for DSWD Caraga, Philippines
(College of Computing and Information Sciences Caraga State University Ampayon, Butuan
City, Philippes).
[6] MSWD Online Assistance Request and Monitoring System With SMS Notification
https://www.scribd.com/document/529718437/MSWD#
[7] McHugh, Jason, et al. "Lore: A database management system for semistructured data." ACM
Sigmod Record 26.3 (1997): 54-66. https://dl.acm.org/doi/abs/10.1145/262762.262770
66
[9] Abdulgani, Montadzah, et al. "Event Management System With SMS Notification for
Mindanao People’s Care Foundation, Inc." Psychology and Education: A Multidisciplinary
Journal 3.7 (2022): 600-609. https://scimatic.org/show_manuscript/481
67
Appendices
68
A. Survey Questioner
resources efficiently?
easily?
69
easily?
70
Admin Guide
Urls.py
AuthVerificationView,
AuthSendVerificationView,
UserLoginAPIView,
UserRegisterAPIView,
UserProfileAPIView,
UserAssistanceApplicantFormAPIView,
UserAssistanceApplicantListAPIView,
UserCheckApplicationStatusAPIView,
UserAnnouncementListAPIView,
UserAnnouncementFormAPIView,
AdminLoginAPIView,
AdminDashboardDataAPIView,
AdminAppointmentsListAPIView,
AdminAssistanceApplicantListAllAPIView,
71
AdminAssistanceApplicantFormAllAPIView,
AdminAssistanceApplicantListAPIView,
AdminAssistanceApplicantFormAPIView,
AdminBeneficiaryListAPIView,
AdminBeneficiaryFormAPIView,
AdminAnnouncementListAPIView,
AdminAnnouncementFormAPIView,
AdminChartReportAPIView,
LogoutAPIView,
urlpatterns = [
path("verify/", AuthVerificationView.as_view()),
path("send-verification/", AuthSendVerificationView.as_view()),
path("login/", UserLoginAPIView.as_view()),
path("logout/", LogoutAPIView.as_view()),
path("register/", UserRegisterAPIView.as_view()),
path("profile/", UserProfileAPIView.as_view()),
path("profile/<int:pk>/", UserProfileAPIView.as_view()),
path("apply-assistance/", UserAssistanceApplicantFormAPIView.as_view()),
path("applications/", UserAssistanceApplicantListAPIView.as_view()),
path("applications/<int:pk>/", UserAssistanceApplicantFormAPIView.as_view()),
path("check-applications/", UserCheckApplicationStatusAPIView.as_view()),
path("announcements/", UserAnnouncementListAPIView.as_view()),
path("announcement/<int:pk>/", UserAnnouncementFormAPIView.as_view()),
path("admin-login/", AdminLoginAPIView.as_view()),
path("admin-dashboard-data/", AdminDashboardDataAPIView.as_view()),
72
path("admin-appoinments/", AdminAppointmentsListAPIView.as_view()),
path("admin-applications/", AdminAssistanceApplicantListAllAPIView.as_view()),
path("admin-applications/form/<int:pk>/",
AdminAssistanceApplicantFormAllAPIView.as_view()),
path("admin-applications/<str:slug>/",
AdminAssistanceApplicantListAPIView.as_view()),
path("admin-applications/<str:slug>/form/<int:pk>/",
AdminAssistanceApplicantFormAPIView.as_view()),
path("admin-beneficiaries/", AdminBeneficiaryListAPIView.as_view()),
path("admin-beneficiaries/<str:slug>/", AdminBeneficiaryFormAPIView.as_view()),
path("admin-announcements/", AdminAnnouncementListAPIView.as_view()),
path("admin-announcement/", AdminAnnouncementFormAPIView.as_view()),
path("admin-announcement/<int:pk>/", AdminAnnouncementFormAPIView.as_view()),
path("admin-chart-report/", AdminChartReportAPIView.as_view()),
Views.py
import json
import random
import datetime
import requests
User,
BeneficiaryProfile,
AssistanceApplicantForm,
Announcements,
UserSerializer,
BeneficiaryProfileSerializer,
AssistanceApplicantFormSerializer,
AnnouncementsSerializer,
STRONG_PASSWORD_POLICY_UTILITY = StrongPasswordPolicyUtils()
class Mixins:
""""""
74
filename = file.name.split(".")
name = filename[0]
extension = filename[-1]
custom_file_name = f"{replace_char_name}.{timestamp}.{extension}"
upload_file_url = file_system_storage.url(url_file_name)
""""""
if not settings.ALLOW_SMS:
return {}
response = requests.post("https://api.sms.fortres.net/v1/messages",
auth=("8715ed2f-4b38-4445-8086-b4146f04f556",
"7d7gburv38itwZCAh2DhcfupqO8SjW15NcivIwPK"), data={
"recipient": recipient,
"message": message
})
if response.status_code == 200:
return True
else:
return {}
""""""
if not settings.ALLOW_SMS:
return {}
75
response = requests.post("https://api.sms.fortres.net/v1/messages",
auth=("8715ed2f-4b38-4445-8086-b4146f04f556",
"7d7gburv38itwZCAh2DhcfupqO8SjW15NcivIwPK"), data={
"recipient": recipient,
"message": message
})
if response.status_code == 200:
return True
else:
return {}
""""""
if not settings.ALLOW_SMS:
return {}
response = requests.post("https://api.sms.fortres.net/v1/messages",
auth=("8715ed2f-4b38-4445-8086-b4146f04f556",
"7d7gburv38itwZCAh2DhcfupqO8SjW15NcivIwPK"), data={
"recipient": recipient,
"message": "Your One-Time PIN is {otp}. Please do not share this with
anyone. Ref# ABC-000000"
})
if response.status_code == 200:
return response.json()
else:
return {}
try:
payload = request.data
account_exist = True
message = ""
try:
user_account = User.objects.get(
Q(mobile_number=self.filter_mobile_number(payload["mobile_number"]))
or Q(email=payload["email"])
except User.DoesNotExist:
account_exist = False
response = {
"message": message,
"data": {
"used": account_exist,
},
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
result =
self.send_otp_sms(self.filter_mobile_number(payload["mobile_number"]))
77
if result:
code = result["data"][0]["otp"]
response = {
"data": {
"code": code,
},
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
try:
user_account = User.objects.get(
Q(mobile_number=self.filter_mobile_number(payload["mobile_number"]))
or Q(email=payload["email"])
except User.DoesNotExist:
user = authenticate(
system_id=user_account.system_id, password=payload["password"]
if user != None:
login(request, user)
try:
beneficiary_profile = BeneficiaryProfile.objects.get(
user=request.user
serializer = BeneficiaryProfileSerializer(beneficiary_profile)
profile = serializer.data
except BeneficiaryProfile.DoesNotExist:
profile = {}
applications = AssistanceApplicantForm.objects.filter(
user=request.user, application_status__icontains="Cancelled"
response = {
"data": {
"token": str(token),
"profile": profile,
"has_processing_application": applications.exists(),
},
return self.success_response(response)
else:
return self.server_error_response(exc)
class LogoutAPIView(API):
permission_classes = [IsAuthenticated]
try:
user_has_token = Token.objects.filter(user=request.user).count()
if user_has_token:
request.user.auth_token.delete()
logout(request)
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
try:
beneficiary_profile =
BeneficiaryProfile.objects.get(user=request.user)
serializer = BeneficiaryProfileSerializer(beneficiary_profile)
profile = serializer.data
except BeneficiaryProfile.DoesNotExist:
profile = {}
response = {
return self.success_response(response)
return self.server_error_response(exc)
is_strong_password,
password_requirements,
) = STRONG_PASSWORD_POLICY_UTILITY.is_strong_password(
password=payload["password"]
if not is_strong_password:
user_count = User.objects.exclude(system_id="MSWDADMIN-001").count()
system_id = f"MSWDUSER-{user_id}"
try:
user = User.objects.create(
system_id=system_id,
mobile_number=self.filter_mobile_number(payload["mobile_number"]),
user.set_password(payload["password"])
user.save()
user_login = authenticate(
system_id=user.system_id, password=payload["password"]
login(request, user_login)
return str(token)
81
permission_classes = [IsAuthenticated]
try:
return BeneficiaryProfile.objects.get(pk=pk)
except BeneficiaryProfile.DoesNotExist:
raise Http404
try:
beneciary = self.get_object(pk)
serializer = BeneficiaryProfileSerializer(beneciary)
data = serializer.data
data["avatar"] = beneciary.user.avatar
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
payload["user"] = request.user.id
serializer = BeneficiaryProfileSerializer(data=payload)
if serializer.is_valid():
serializer.save()
response = {
82
return self.success_response(response)
else:
return self.server_error_response(exc)
try:
payload = request.data
beneciary = self.get_object(pk)
if request.FILES.get("avatar", None):
timestamp = int(datetime.datetime.today().timestamp())
uploaded_file = request.FILES["avatar"]
location = f"{settings.MEDIA_ROOT}/announcements"
base_url = "announcements"
if serializer.is_valid():
serializer.save()
if request.FILES.get("avatar", None):
user = User.objects.get(id=beneciary.user.id)
user.avatar = upload_file_url
user.save()
83
response = {
"data": serializer.data,
return self.success_response(response)
else:
self.raise_error(
return self.server_error_response(exc)
class UserCheckApplicationStatusAPIView(API):
permission_classes = [IsAuthenticated]
try:
has_progress_application = False
applications = AssistanceApplicantForm.objects.filter(
user=request.user
if applications:
has_progress_application = True
response = {
"has_progress_application": has_progress_application,
}
84
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
query_params = request.query_params
filters = Q(user=request.user)
if query_params.get("search", None):
filters &= Q(
reference_no__icontains=query_params.get("search", None))
applications = AssistanceApplicantForm.objects.filter(filters)
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
return AssistanceApplicantForm.objects.get(pk=pk)
except AssistanceApplicantForm.DoesNotExist:
raise Http404
try:
application = self.get_object(pk)
serializer = AssistanceApplicantFormSerializer(application)
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
payload["user"] = request.user.id
application_form_length = AssistanceApplicantForm.objects.all().count()
payload[
"reference_no"
] = f"{datetime.datetime.now().strftime('%m%d%y')}
{str(application_form_length + 1).zfill(7)}"
self.raise_error(
title="Error",
errors=serializer.errors,
self.raise_error(
title="Error",
errors=serializer.errors,
timestamp = int(datetime.datetime.today().timestamp())
uploaded_file = request.FILES["certificate_of_indigency"]
uploaded_file2 = request.FILES["valid_id"]
location = f"{settings.MEDIA_ROOT}/attachments"
base_url = "attachments"
payload["attachment"] = json.dumps({
"certificate_of_indigency": upload_file_url,
"valid_id": upload_file_url2,
})
serializer = AssistanceApplicantFormSerializer(data=payload)
if serializer.is_valid():
serializer.save()
response = {
return self.success_response(response)
else:
self.raise_error(
87
return self.server_error_response(exc)
try:
payload = request.data
payload["user"] = request.user.id
application = self.get_object(pk)
if serializer.is_valid():
serializer.save()
response = {
return self.success_response(response)
else:
self.raise_error(
return self.server_error_response(exc)
try:
application = self.get_object(pk)
application.set_application_cancelled()
if application.application_status == "Cancelled":
88
return self.success_response(response)
else:
return self.server_error_response(exc)
class UserAnnouncementListAPIView(API):
permission_classes = [IsAuthenticated]
try:
announcements = Announcements.objects.all()
return self.success_response(response)
return self.server_error_response(exc)
class UserAnnouncementFormAPIView(API):
permission_classes = [IsAuthenticated]
try:
return Announcements.objects.get(pk=pk)
except Announcements.DoesNotExist:
raise Http404
89
try:
announcement = self.get_object(pk)
announcement.add_viewers()
serializer = AnnouncementsSerializer(announcement)
return self.success_response(response)
return self.server_error_response(exc)
try:
payload = request.data
try:
user_account = User.objects.get(Q(email=payload["email"]))
except User.DoesNotExist:
user = authenticate(
system_id=user_account.system_id, password=payload["password"]
if user != None:
login(request, user)
response = {
return self.success_response(response)
else:
90
return self.server_error_response(exc)
class AdminDashboardDataAPIView(API):
permission_classes = [IsAuthenticated]
try:
announcements = Announcements.objects.all()
applications_status = {
"Financial Assistance": 0,
"Senior Citizen": 0,
"Abuse": 0,
appointments = []
not_review_applications = AssistanceApplicantForm.objects.filter(
application_status=None
if (
not application.application_status
in application.assessment["client_category"]
):
applications_status["Financial Assistance"] += 1
91
if (
not application.application_status
in application.assessment["client_category"]
):
if (
not application.application_status
):
applications_status["Senior Citizen"] += 1
if (
not application.application_status
in application.assessment["client_category"]
):
if (
not application.application_status
and "Abuse"
in application.assessment["client_category"]
):
applications_status["Abuse"] += 1
date_today = datetime.datetime.now().date()
todays_appointment = AssistanceApplicantForm.objects.filter(
if (
92
):
appointments.append(
application.get_interview_appoinment_data_dict()
response = {
"recent_announcements": serializer.data,
"not_review_applicants": applications_status,
return self.success_response(response)
return self.server_error_response(exc)
class AdminAppointmentsListAPIView(API):
permission_classes = [IsAuthenticated]
try:
appointments = []
todays_appointment = AssistanceApplicantForm.objects.filter(
appointments.append(
application.get_interview_appoinment_data_dict()
)
93
response = {
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
query_params = request.query_params
filters = Q(application_status__icontains="Assisted")
if query_params.get("search", None):
filters &=
Q(assessment__client_category__icontains=query_params.get("case", None).replace("-", "
"))
filters &=
Q(assessment__sub_client_category__icontains=query_params.get("assistance", None))
applications = AssistanceApplicantForm.objects.select_related(
"user"
).filter(filters)
return self.success_response(response)
return self.server_error_response(exc)
try:
return AssistanceApplicantForm.objects.get(reference_no__icontains=pk)
except AssistanceApplicantForm.DoesNotExist:
raise Http404
try:
application = self.get_object(pk)
if not application.application_status:
application.set_application_viewed()
data = application.get_form_data_dict()
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
query_params = request.query_params
filters = Q(assessment__client_category__icontains=filtered_slug)
if query_params.get("search", None):
filters &= Q(
reference_no__icontains=query_params.get("search", None)
) | Q(user__system_id__icontains=query_params.get("search", None))
filters &=
Q(assessment__sub_client_category__icontains=query_params.get("assistance", None))
applications = AssistanceApplicantForm.objects.select_related(
"user"
).filter(filters)
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
return AssistanceApplicantForm.objects.get(reference_no__icontains=pk)
except AssistanceApplicantForm.DoesNotExist:
raise Http404
def get(self, request, slug: str, pk: int, format=None) -> dict:
try:
application = self.get_object(pk)
if not application.application_status:
application.set_application_viewed()
97
data = application.get_form_data_dict()
return self.success_response(response)
return self.server_error_response(exc)
def patch(self, request, slug: str, pk: int, format=None) -> dict:
try:
payload = request.data
try:
application = AssistanceApplicantForm.objects.get(id=pk)
except AssistanceApplicantForm.DoesNotExist:
raise Http404
application.set_application_disapproved()
if not payload["interview_schedule_date"]:
schedule_date = payload["interview_schedule_date_text"]
self.send_schedule_sms(self.filter_mobile_number(application.user.mobile_number),
f"Your request application is approved. You are now schedule for an interview this
{schedule_date}. Please visit the nearest MSWD office")
application.set_application_for_interview(request)
application.set_application_interviewed(request)
self.send_schedule_sms(self.filter_mobile_number(application.user.mobile_number),
98
"Your request assistance is approved. Please visit the nearest MSWD office to claim
your cash assistance.")
application.set_application_approved(request)
self.raise_error(
title="Error",
timestamp = int(datetime.datetime.today().timestamp())
uploaded_file = request.FILES["proof"]
location = f"{settings.MEDIA_ROOT}/proofs"
base_url = "proofs"
print(upload_file_url)
payload["proof"] = upload_file_url
if not payload["assistance"]:
if not payload["remarks"]:
application.assistance = payload["assistance"]
application.cash = payload["cash"]
application.remarks = payload["remarks"]
application.proof = payload["proof"]
application.save()
application.set_application_claimed(request)
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
query_params = request.query_params
if query_params.get("search", None):
filters &= (
Q(firstname__icontains=query_params.get("search", None))
| Q(middlename__icontains=query_params.get("search", None))
| Q(lastname__icontains=query_params.get("search", None))
| Q(extension__icontains=query_params.get("search", None))
| Q(user__mobile_number__icontains=query_params.get("search",
None))
| Q(user__system_id__icontains=query_params.get("search", None))
users = BeneficiaryProfile.objects.filter(filters)
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
return BeneficiaryProfile.objects.get(user__system_id=slug)
except BeneficiaryProfile.DoesNotExist:
raise Http404
try:
beneficiarys = self.get_object(slug)
data = beneficiarys.get_form_data_dict()
return self.success_response(response)
return self.server_error_response(exc)
class AdminAnnouncementListAPIView(API):
permission_classes = [IsAuthenticated]
try:
query_params = request.query_params
filters = Q()
101
if query_params.get("search", None):
announcements = Announcements.objects.filter(filters)
return self.success_response(response)
return self.server_error_response(exc)
permission_classes = [IsAuthenticated]
try:
return Announcements.objects.get(pk=pk)
except Announcements.DoesNotExist:
raise Http404
try:
announcement = self.get_object(pk)
serializer = AnnouncementsSerializer(announcement)
return self.success_response(response)
return self.server_error_response(exc)
102
try:
payload = request.data
self.raise_error(
timestamp = int(datetime.datetime.today().timestamp())
uploaded_file = request.FILES["banner"]
location = f"{settings.MEDIA_ROOT}/announcements"
base_url = "announcements"
payload["banner"] = upload_file_url
users = User.objects.all()
serializer = AnnouncementsSerializer(data=payload)
if serializer.is_valid():
serializer.save()
response = {
return self.success_response(response)
else:
self.raise_error(title="Error", message=serializer.errors)
return self.server_error_response(exc)
try:
payload = request.data
announcement = self.get_object(pk)
if request.FILES.get("banner", None):
timestamp = int(datetime.datetime.today().timestamp())
uploaded_file = request.FILES["banner"]
location = f"{settings.MEDIA_ROOT}/announcements"
base_url = "announcements"
payload["banner"] = upload_file_url
if serializer.is_valid():
serializer.save()
response = {
return self.success_response(response)
else:
self.raise_error(
return self.server_error_response(exc)
try:
announcement = self.get_object(pk)
announcement.delete()
response = {
return self.success_response(response)
return self.server_error_response(exc)
class AdminChartReportAPIView(API):
permission_classes = [IsAuthenticated]
try:
applications_status = {
"Financial Assistance": 0,
"Senior Citizen": 0,
"Abuse": 0,
assisted_applications = AssistanceApplicantForm.objects.filter(
application_status__icontains="Assisted"
if (
application.application_status == "Assisted"
in application.assessment["client_category"]
):
applications_status["Financial Assistance"] += 1
if (
application.application_status == "Assisted"
in application.assessment["client_category"]
):
if (
application.application_status == "Assisted"
):
applications_status["Senior Citizen"] += 1
if (
application.application_status == "Assisted"
in application.assessment["client_category"]
):
if (
application.application_status == "Assisted"
and "Abuse"
in application.assessment["client_category"]
):
applications_status["Abuse"] += 1
106
response = {
"assisted_applicants": applications_status,
return self.success_response(response)
return self.server_error_response(exc)
Announcement
<template>
<div>
<input
type="text"
class="form-control"
placeholder="Search title"
v-model="filters.search"
@keyup.enter="getAnnouncements()"
/>
<button
class="btn btn-outline-secondary"
type="button"
@click="clearSearch()"
>
Clear
</button>
<button
class="btn btn-outline-secondary"
type="button"
id="button-addon2"
@click="getAnnouncements()"
>
107
Search
</button>
</div>
<button
class="btn btn-primary"
@click="toggleCreateEditAnnouncementModal('create')"
>
Create
</button>
</div>
<div>
<div
class="row ibox"
v-for="announcement in announcements"
v-bind:key="announcement.id"
@click.prevent="showAnnouncementsModal(announcement.id)"
>
<div
:style="`background: url(${announcement.banner})`"
></div>
<h2>
</h2>
>
<span class="text-muted"
{{ new Date(announcement.created_at).toLocaleString("en-US") }}
</span>
108
</div>
<div class="description">
{{ hyperlink(announcement.description, announcement.id) }}
<div :id="`desc${announcement.id}`"></div>
<div class="fade-away"></div>
</div>
<div class="row">
<div class="col-md-6"></div>
<div class="col-md-6">
<div class="text-right">
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="modal fade"
id="announcementModal"
data-bs-backdrop="static"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-content">
<div class="modal-header">
<span aria-hidden="true">×</span
><span class="sr-only">Close</span>
109
</button>
</div>
<div class="modal-body">
<div>
<div class="banner-upload">
<div class="banner-edit">
<input
type="file"
id="banner"
accept="image/*"
@change="readURL($event)"
/>
<label for="banner">
</div>
</label>
</div>
<div class="banner-preview">
<div id="bannerPreview"></div>
</div>
</div>
</div>
<div>
<div class="form-group">
<label for="author">Author</label>
<input
type="text"
class="form-control"
id="author"
v-model="selectedForm.author"
/>
</div>
110
<div class="form-group">
<label for="title">Title</label>
<input
type="text"
class="form-control"
id="title"
v-model="selectedForm.title"
/>
</div>
<div class="form-group">
<label for="description">Description</label>
<textarea
class="form-control"
rows="8"
id="description"
v-model="selectedForm.description"
/>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-success"
@click="createAnnouncements()"
v-if="!selectedForm.id"
>
Save
</button>
<button
type="button"
class="btn btn-danger"
@click="deleteAnnouncement()"
111
v-if="selectedForm.id"
>
Delete
</button>
<button
type="button"
class="btn btn-success"
@click="updateAnnouncement()"
v-if="selectedForm.id"
>
Save
</button>
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
return { toast };
},
data() {
return {
announcements: [],
selectedForm: {
banner: "",
author: "",
title: "",
description: "",
},
filters: {
search: "",
},
};
},
created() {
this.getAnnouncements();
},
methods: {
readURL(event) {
reader.readAsDataURL(event.target.files[0]);
image.src = input.target.result;
image.onload = () => {
this.selectedForm.banner = document.getElementById("banner").files[0];
113
document.getElementById("bannerPreview").style.backgroundImage =
};
};
},
async getAnnouncements() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-announcements/?search=${this.filters.search}`,
headers
);
this.announcements = response.data.data;
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async createAnnouncements() {
try {
data.append("banner", this.selectedForm.banner);
data.append("author", this.selectedForm.author);
data.append("title", this.selectedForm.title);
data.append("description", this.selectedForm.description);
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-announcement/`,
data,
headers
);
this.toast.success(response.data.message);
this.getAnnouncements();
this.toggleCreateEditAnnouncementModal();
} catch (error) {
console.error(error);
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async showAnnouncementsModal(id) {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-announcement/${id}`,
headers
);
this.selectedForm = response.data.data;
116
if (this.selectedForm.banner) {
document.getElementById("bannerPreview").style.backgroundImage =
this.toggleCreateEditAnnouncementModal();
} catch (error) {
console.error(error);
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async updateAnnouncement() {
try {
data.append("banner", this.selectedForm.banner);
data.append("author", this.selectedForm.author);
data.append("title", this.selectedForm.title);
data.append("description", this.selectedForm.description);
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-announcement/${this.selectedForm.id}/`,
data,
headers
);
this.toast.success(response.data.message);
this.getAnnouncements();
this.toggleCreateEditAnnouncementModal();
} catch (error) {
console.error(error);
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
118
} else {
} else {
this.toast.error(message);
},
async deleteAnnouncement() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-announcement/${this.selectedForm.id}/`,
headers
);
this.toast.success(response.data.message);
this.getAnnouncements();
this.toggleCreateEditAnnouncementModal();
} catch (error) {
console.error(error);
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
119
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
clearSearch() {
this.filters.search = "";
this.getBeneficiaries();
},
toggleCreateEditAnnouncementModal(type) {
this.selectedForm = {};
document.getElementById("bannerPreview").style.backgroundImage = "";
$("#announcementModal").modal("toggle");
},
capitalize(text) {
},
hyperlink(textContent, id) {
/(https?:\/\/[^\s]+)/g,
(href) =>
120
);
`<span>${newTextContent}</span>`,
"text/xml"
);
newDiv.innerHTML = doc.firstChild.innerHTML;
setTimeout(() => {
if (!divDesc.hasChildNodes()) {
divDesc.appendChild(newDiv);
} else {
while (divDesc.firstChild) {
divDesc.removeChild(divDesc.firstChild);
divDesc.appendChild(newDiv);
}, 100);
},
},
};
</script>
<style scoped>
.banner-upload {
position: relative;
margin: 0 0 10px 0;
.banner-upload .banner-edit {
position: absolute;
right: 12px;
z-index: 1;
121
top: 10px;
display: inline-block;
width: 34px;
height: 34px;
margin-bottom: 0;
border-radius: 2px;
background: #ffffff;
cursor: pointer;
font-weight: normal;
background: #f1f1f1;
border-color: #d6d6d6;
.banner-upload .banner-preview {
width: 100%;
height: 450px;
position: relative;
border-radius: 2px;
background: black;
width: 100%;
122
height: 100%;
border-radius: 2px;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
.description {
position: relative;
overflow: hidden;
height: 135px;
white-space: break-spaces;
display: flex;
.fade-away {
height: 100px;
position: absolute;
bottom: 0;
width: 100%;
.announcement-banner {
</style>
Appointment
<template>
<main>
<div class="w-50">
123
</div>
</main>
</template>
<script>
import "@fullcalendar/core/vdom";
export default {
components: {
FullCalendar,
},
setup() {
return { toast };
},
data() {
124
return {
appoinments: [],
calendarOptions: {
selectable:true,
initialView: "dayGridMonth",
eventClick: this.handleSelect,
events: [],
},
};
},
created() {
this.getAppoinments();
},
methods: {
async getAppoinments() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-appoinments/`,
headers
);
this.appoinments = response.data.appoinments;
125
this.appoinments.forEach(element => {
this.calendarOptions.events.push({
reference_no: element.reference_no,
})
});
} catch (error) {
console.log(error)
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
126
this.toast.error(message);
},
handleSelect(arg) {
this.gotoToApplication(arg.event._def.extendedProps.reference_no);
},
gotoToApplication(reference_no) {
},
},
};
</script>
<style scoped></style>
Assistance View
<template>
<div>
<input
type="text"
class="form-control"
placeholder="Ref ID only"
127
v-model="filters.search"
@keyup.enter="getAssistanceApplications()"
/>
<button
class="btn btn-outline-secondary"
type="button"
@click="clearSearch()"
>
Clear
</button>
<button
class="btn btn-outline-secondary"
type="button"
id="button-addon2"
@click="getAssistanceApplications()"
>
Search
</button>
</div>
<label for="inputSelect">Status</label>
<select
id="inputSelect"
class="form-control"
v-model="filters.type"
@change="getAssistanceApplications()"
128
>
<option value="cancelled">Cancelled</option>
<option value="disapproved">Disapproved</option>
<option value="reviewing">Reviewed</option>
<option value="interviewed">Interviewed</option>
<option value="assisted">Assisted</option>
</select>
</div>
<label for="inputSelect">Assistance</label>
<select
id="inputSelect"
class="form-control"
v-model="filters.assistance"
@change="getAssistanceApplications()"
>
<option
:value="subClient"
v-bind:key="index"
>
{{ subClient }}
129
</option>
</select>
</div>
</div>
<thead>
<tr>
<th>#</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody v-if="applications.length">
<tr
v-bind:key="application.id"
@click.prevent="showApplicationModalForm(application.reference_no)"
>
<td>
{{ application.assessment.client_category }}
130
</td>
<td>
{{ application.assessment.sub_client_category }}
</td>
<td>
{{ application.user }}
<button
@click.stop="gotoToUser(application.user)"
>
Redirect
</button>
</td>
<td>
<span v-if="application.application_status">
{{ application.application_status }}
</span>
</td>
<!-- <td>
{{ new Date(application.created_at).toLocaleString("en-US") }}
</td>
<td>
{{ new Date(application.updated_at).toLocaleString("en-US") }}
</td> -->
</tr>
131
</tbody>
<tbody v-if="!applications.length">
<tr>
</tr>
</tbody>
</table>
<div
class="modal fade"
id="exampleModal"
data-bs-backdrop="static"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-header">
{{ selectedForm.assessment.client_category }} -
{{ selectedForm.reference_no }}
</h3>
<span aria-hidden="true">×</span
><span class="sr-only">Close</span>
</button>
132
</div>
<div class="modal-body">
<h3>Application Details</h3>
</div>
<div class="col-3">
<img
:src="`${selectedForm.avatar}`"
width="200"
alt="avatar"
/>
</div>
</div>
<div class="col-9">
>Name</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.name)"
readonly
133
/>
</div>
>Sex</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.sex)"
readonly
/>
</div>
>Age</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.age)"
readonly
/>
</div>
>Mobile Number</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(selectedForm.mobile_number)
"
readonly
/>
</div>
<span v-if="selectedForm.application_status">
{{ selectedForm.application_status }}
</span>
<span v-if="!selectedForm.application_status">
</span>
</div>
</div>
</div>
>Inverview Schedule</label
>
135
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(selectedForm.interview_schedule_date) !==
'N/A'
? new Date(
selectedForm.interview_schedule_date
).toLocaleString('en-US')
: 'N/A'
"
readonly
/>
</div>
>Release Schedule</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(selectedForm.release_schedule_date) !==
'N/A'
? new Date(
136
selectedForm.release_schedule_date
).toLocaleString('en-US')
: 'N/A'
"
readonly
/>
</div>
>Interviewed By:</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.interviewed_by)"
readonly
/>
</div>
>Approved By:</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
137
v-bind:value="checkIfDataIsNone(selectedForm.approved_by)"
readonly
/>
</div>
>Released By:</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.released_by)"
readonly
/>
</div>
</div>
</div>
>Lastname</label
>
<input
type="text"
138
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.lastname
"
readonly
/>
</div>
>Firstname</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.firstname
"
readonly
/>
</div>
>Middlename</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.middlename
"
readonly
/>
</div>
>Ext(Jr, Sr)</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.extension
)
140
"
readonly
/>
</div>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.sex
"
readonly
/>
</div>
>Date of Birth</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
141
checkIfDataIsNone(
selectedForm.client_identifying_information.date_of_birth
"
readonly
/>
</div>
>Place of Birth</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.place_of_birth
"
readonly
/>
</div>
>Relationship to Beneficiary</label
>
142
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.relationship_to_beneficiary
"
readonly
/>
</div>
>Civil Status</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.civil_status
"
readonly
143
/>
</div>
>Religion</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.religion
"
readonly
/>
</div>
>Nationality</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
144
checkIfDataIsNone(
selectedForm.client_identifying_information.nationality
"
readonly
/>
</div>
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.highest_educational_attainment
"
readonly
/>
</div>
>Skills/Occupation</label
145
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.skills_or_occupation
"
readonly
/>
</div>
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.estimated_monthly_income
)
146
"
readonly
/>
</div>
<div class="col-6"></div>
>Region</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.region
"
readonly
/>
</div>
>Province</label
>
<input
type="text"
147
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.province
"
readonly
/>
</div>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.city_or_municipality
"
readonly
/>
>City/Municipality</label
>
</div>
148
>District</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.district
"
readonly
/>
</div>
>Barangay</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information.barangay
149
"
readonly
/>
</div>
>Street/Purok</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.no_street_or_purok
"
readonly
/>
</div>
</div>
</div>
<div class="row">
150
<table class="table">
<thead>
<tr>
<th>Lastname</th>
<th>Firstname</th>
<th>Middlename</th>
<th>Sex</th>
<th>Birthdate</th>
<th>Civil Status</th>
<th>Relationship</th>
<th>Skills/Occupation</th>
</tr>
</thead>
<tbody>
<tr
v-for="(
member, index
) in selectedForm.beneficiarys_family_composition"
v-bind:key="index"
>
</tr>
</tbody>
</table>
</div>
<h3>Assesment</h3>
</div>
<textarea
class="form-control"
id="floatingTextarea2"
style="height: 100px"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.problems_presented
"
readonly
152
></textarea>
</div>
<label for="floatingTextarea2"
>
<textarea
class="form-control"
id="floatingTextarea2"
style="height: 100px"
v-bind:value="
checkIfDataIsNone(
selectedForm.client_identifying_information
.social_workers_assessment
"
readonly
></textarea>
</div>
>Client Category</label
>
<input
type="text"
class="form-control"
153
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(selectedForm.assessment.client_category)
"
readonly
/>
</div>
>Client Sub-Category</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
selectedForm.assessment.sub_client_category
"
readonly
/>
</div>
</div>
<h3>Attachments</h3>
</div>
154
<div v-if="selectedForm.attachment">
<div class="d-flex">
<div class="mr-2">
</div>
<div>
<a
class="download-attachment"
:href="selectedForm.attachment.certificate_of_indigency"
target="_blank"
rel="noopener noreferrer"
>View</a
>
</div>
</div>
<div class="d-flex">
<div>
<a
class="download-attachment"
:href="selectedForm.attachment.valid_id"
target="_blank"
rel="noopener noreferrer"
>View</a
>
</div>
</div>
155
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-danger"
@click="changeApplicationProcessStatus('disapprove')"
>
Disapproved Application
</button>
<button
v-if="
!this.selectedForm.application_status ||
"
type="button"
class="btn btn-primary"
@click="toggleSchedulingModal('interview')"
>
</button>
<button
type="button"
class="btn btn-primary"
@click="changeApplicationProcessStatus('interviewed')"
156
>
Approve interview
</button>
<button
type="button"
class="btn btn-primary"
@click="changeApplicationProcessStatus('approve')"
>
Approve Assistance
</button>
<button
type="button"
class="btn btn-primary"
@click="toggleReleasedModal()"
>
Set as Assisted
</button>
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
157
</div>
</div>
</div>
</div>
<div
class="modal fade"
id="inputScheduleModal"
tabindex="-2"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-content">
<div class="modal-body">
<h2 v-if="isInterview">
</h2>
<h2 v-if="!isInterview">
</h2>
<v-date-picker
mode="dateTime"
:minute-increment="5"
:min-date="new Date()"
158
:attributes="attributes"
v-model="selectedScheduleDate"
is-expanded
/>
</div>
<div class="modal-footer">
<button
v-if="isInterview"
type="button"
class="btn btn-warning"
@click="changeApplicationProcessStatus('interview')"
>
Submit
</button>
<button
v-if="!isInterview"
type="button"
class="btn btn-warning"
@click="changeApplicationProcessStatus('approve')"
>
Submit
</button>
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
159
>
Close
</button>
</div>
</div>
</div>
</div>
<div
class="modal fade"
id="inputReleasedModal"
tabindex="-2"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-content">
<div class="modal-body">
<div>
<div class="banner-upload">
<div class="banner-edit">
<input
type="file"
id="banner"
accept="image/*"
160
@change="readURL($event)"
/>
<label for="banner">
</div>
</label>
</div>
<div class="banner-preview">
<div id="bannerPreview"></div>
</div>
</div>
</div>
<div class="form-group">
<div class="i-checks">
<label>
<input
type="radio"
v-model="selectedAssistance"
value="cash"
name="assist_release"
/>
Cash
</label>
</div>
<div class="i-checks">
<label>
161
<input
type="radio"
v-model="selectedAssistance"
value="others"
name="assist_release"
/>
Others
</label>
</div>
</div>
<label for="floatingTextarea2">Cash</label>
<input
class="form-control"
id="floatingTextarea2"
v-model="cash"
placeholder="0"
/>
</div>
<div class="form-group">
<label for="floatingTextarea2">Remarks</label>
<textarea
class="form-control"
id="floatingTextarea2"
style="height: 100px"
v-model="remarks"
></textarea>
162
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-warning"
@click="changeApplicationProcessStatus('release')"
>
Submit
</button>
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
return { toast };
},
data() {
return {
Url: serverSideUrl,
slug: this.$route.params.slug,
subClientCategoryOptions: {
financial: [
"Educational Assistance",
"Death Assistance",
"Medical Assistance",
],
abuse: [
"Children",
"Rape",
"Abandonment",
164
"Neglect",
"VAW-C",
"Physical Abuse",
],
},
applications: [],
selectedForm: {},
attributes: [],
dates: [],
selectedScheduleDate: "",
proof: "",
selectedAssistance: "",
cash: "",
remarks: "",
isInterview: false,
filters: {
search: "",
type: "all",
assistance: "all",
},
};
},
created() {
if (Object.keys(this.$route.query).length) {
this.filters.search = this.$route.query.id;
setTimeout(() => {
this.showApplicationModalForm(this.$route.query.id);
165
}, 1000);
this.getAssistanceApplications();
},
methods: {
readURL(event) {
reader.readAsDataURL(event.target.files[0]);
image.src = input.target.result;
image.onload = () => {
this.proof = document.getElementById("banner").files[0];
document.getElementById("bannerPreview").style.backgroundImage =
};
};
},
async getAssistanceApplications() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-applications/${this.slug}?search=$
{this.filters.search}&type=${this.filters.type}&assistance=$
{this.filters.assistance}`,
headers
);
this.applications = response.data.data;
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
}
167
},
async showApplicationModalForm(id) {
try {
this.selectedForm = {};
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-applications/${this.slug}/form/${id}`,
headers
);
this.selectedForm = response.data.data;
setTimeout(() => {
this.toggleApplicationModal();
(data) =>
);
if (application) {
this.applications.find(
).application_status = "Reviewed";
}, 500);
} catch (error) {
168
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async changeApplicationProcessStatus(actionType) {
try {
let data = {
action_type: actionType,
};
169
data["interview_schedule_date"] = this.selectedScheduleDate
? new Date(this.selectedScheduleDate)
: "";
data["interview_schedule_date_text"] = this.selectedScheduleDate
? new Date(this.selectedScheduleDate).toLocaleString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
hour: "numeric",
minute: "numeric",
hour12: true,
})
: "";
data.append("action_type", actionType);
data.append("proof", this.proof);
data.append("assistance", this.selectedAssistance);
data.append("remarks", this.remarks);
let headers = {
headers: {
},
170
};
`${serverSideUrlApi}/admin-applications/${this.slug}/form/$
{this.selectedForm.id}/`,
data,
headers
);
this.toast.success("Update Successfully!");
this.selectedForm = response.data.data;
this.getAssistanceApplications();
this.toggleSchedulingModal();
this.toggleReleasedModal();
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
171
}, 500);
} else {
} else {
this.toast.error(message);
},
checkIfDataIsNone(data) {
if (!data) {
return "N/A";
return data;
},
clearSearch() {
this.filters.search = "";
this.getAssistanceApplications();
},
toggleSchedulingModal(actionType) {
this.isInterview = true;
document.getElementById("exampleModal").style.overflow = "scroll";
172
$("#inputScheduleModal").modal("toggle");
},
toggleApplicationModal() {
$("#exampleModal").modal("toggle");
},
toggleReleasedModal() {
document.getElementById("exampleModal").style.overflow = "scroll";
$("#inputReleasedModal").modal("toggle");
},
gotoToUser(id) {
},
},
watch: {
selectedAssistance(val) {
this.selectedAssistance = val;
},
},
computed: {
selectedSubClientCategoryList() {
return this.subClientCategoryOptions["financial"];
return this.subClientCategoryOptions["disaster_calamity"];
return this.subClientCategoryOptions["abuse"];
return [];
},
},
};
</script>
<style scoped>
.banner-upload {
position: relative;
margin: 0 0 10px 0;
.banner-upload .banner-edit {
position: absolute;
right: 12px;
z-index: 1;
top: 10px;
display: inline-block;
width: 34px;
height: 34px;
174
margin-bottom: 0;
border-radius: 2px;
background: #ffffff;
cursor: pointer;
font-weight: normal;
background: #f1f1f1;
border-color: #d6d6d6;
.banner-upload .banner-preview {
width: 100%;
height: 450px;
position: relative;
border-radius: 2px;
background: black;
width: 100%;
height: 100%;
border-radius: 2px;
background-size: contain;
175
background-repeat: no-repeat;
background-position: center;
.download-attachment {
padding: 5px;
border-radius: 5px;
color: white;
background: gray;
.application-status {
text-align: center;
font-size: 6vh;
white-space: break-spaces;
font-weight: 700;
</style>
BeneficiaryView
<template>
<div>
<input
type="text"
class="form-control"
v-model="filters.search"
@keyup.enter="getBeneficiaries()"
176
/>
<button
class="btn btn-outline-secondary"
type="button"
@click="clearSearch()"
>
Clear
</button>
<button
class="btn btn-outline-secondary"
type="button"
id="button-addon2"
@click="getBeneficiaries()"
>
Search
</button>
</div>
<thead>
<tr>
<th>#</th>
<th scope="col">Name</th>
</tr>
177
</thead>
<tbody v-if="beneficiaries.length">
<tr
v-bind:key="beneficiary.id"
@click="showProfileModal(beneficiary.system_id)"
>
<td>
{{ new Date(beneficiary.created_at).toLocaleString("en-US") }}
</td>
<td>{{ `${beneficiary.recent_applied.client_category} $
{beneficiary.recent_applied.sub_client_category ? '/' : ''} $
{beneficiary.recent_applied.sub_client_category ?
beneficiary.recent_applied.sub_client_category : ''}` }}</td>
</tr>
</tbody>
<tbody v-if="!beneficiaries.length">
<tr>
</tr>
</tbody>
</table>
<div
178
class="modal fade"
id="exampleModal"
data-bs-backdrop="static"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-header">
<button
type="button"
class="close"
data-dismiss="modal"
>
<span aria-hidden="true">×</span
><span class="sr-only">Close</span>
</button>
</div>
<div class="modal-body">
<div class="col-12">
<img
:src="selectedForm.avatar"
width="200"
179
alt="avatar"
/>
</div>
</div>
<div class="col-12">
>System ID</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.system_id)"
readonly
/>
</div>
>Name</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.name)"
180
readonly
/>
</div>
>Sex</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.sex)"
readonly
/>
</div>
>Age</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.age)"
readonly
/>
</div>
181
>Date of Birth</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(
new Date(
selectedForm.date_of_birth
).toLocaleDateString('en-US')
"
readonly
/>
</div>
>Mobile Number</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
182
checkIfDataIsNone(selectedForm.mobile_number)
"
readonly
/>
</div>
>Civil Status</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="
checkIfDataIsNone(selectedForm.civil_status)
"
readonly
/>
</div>
>Religion</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
183
v-bind:value="checkIfDataIsNone(selectedForm.religion)"
readonly
/>
</div>
>Nationality</label
>
<input
type="text"
class="form-control"
id="validationDefault01"
v-bind:value="checkIfDataIsNone(selectedForm.nationality)"
readonly
/>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
184
</button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
setup() {
return { toast };
},
data() {
return {
beneficiaries: [],
selectedForm: {},
filters: {
185
search: "",
type: "all",
},
};
},
created() {
if (Object.keys(this.$route.query).length) {
this.filters.search = this.$route.query.id;
setTimeout(() => {
this.showProfileModal(this.$route.query.id);
}, 1000);
this.getBeneficiaries();
},
methods: {
async getBeneficiaries() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-beneficiaries/?search=${this.filters.search}`,
headers
);
this.beneficiaries = response.data.data;
186
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async showProfileModal(slug) {
try {
this.selectedForm = {};
let headers = {
187
headers: {
},
};
`${serverSideUrlApi}/admin-beneficiaries/${slug}`,
headers
);
this.selectedForm = response.data.data;
setTimeout(() => {
this.toggleProfileModal();
}, 100);
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
188
} else {
this.toast.error(message);
},
checkIfDataIsNone(data) {
if (!data) {
return "N/A";
return data;
},
clearSearch() {
this.filters.search = "";
this.getBeneficiaries();
},
toggleProfileModal() {
$("#exampleModal").modal("toggle");
},
},
};
</script>
<style scoped></style>
189
<template>
<div>
</div>
</div>
</template>
<script>
import {
Chart as ChartJS,
Title,
Tooltip,
Legend,
BarElement,
CategoryScale,
LinearScale,
} from "chart.js";
ChartJS.register(
Title,
Tooltip,
Legend,
BarElement,
190
CategoryScale,
LinearScale
);
export default {
name: "BarChart",
components: { Bar },
setup() {
return { toast };
},
created() {
this.getReport();
},
data() {
return {
chartReport: {},
};
},
191
methods: {
async getReport() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-chart-report`,
headers
);
this.chartReport = response.data.assisted_applicants;
this.newData = [
this.chartReport["Financial Assistance"],
this.chartReport["Senior Citizen"],
this.chartReport["Abuse"],
];
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
192
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
printChart() {
win.document.write(
canvasEle.toDataURL() +
);
setTimeout(function () {
win.document.close();
win.focus();
193
win.print();
setTimeout(() => {
win.close();
}, 500);
}, 200);
},
getRandomColor() {
return color;
},
},
computed: {
chartData() {
return {
labels: [
"Financial Assistance",
"Senior Citizen",
"Abuse",
],
datasets: [
{
194
data: this.newData,
backgroundColor: [
],
},
],
};
},
chartOptions() {
return {
responsive: true,
plugins: {
title: {
display: true,
position: "top",
},
legend: {
display: false,
},
},
};
},
195
},
};
</script>
<style scoped></style>
Home view
<template>
<main>
<div>
<div class="ibox">
<div class="ibox-title">
<h2>Recent Announcement</h2>
<div class="ibox-tools">
</a>
</div>
</div>
<div class="ibox-content">
<div class="feed-activity-list">
<div
class="row feed-element"
v-bind:key="announcement.id"
>
<div
:style="`background: url(${announcement.banner})`"
></div>
<div class="col-9">
>
<small class="text-muted">{{
new Date(announcement.created_at).toLocaleString("en-US")
}}</small>
<div class="description">
{{ hyperlink(announcement.description) }}
<div id="desc"></div>
<div class="fade-away"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<h2></h2>
<div>
<div class="ibox">
<div class="ibox-title">
</div>
197
<div class="ibox-content">
<div class="row">
<div class="col-lg-4">
<div class="ibox">
<div class="ibox-title">
<h5>Financial Assistance</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">
{{ notReviewApplications["Financial Assistance"] }}
</h1>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="ibox">
<div class="ibox-title">
</div>
<div class="ibox-content">
<h1 class="no-margins">
{{
notReviewApplications[
}}
</h1>
198
</div>
</div>
</div>
<div class="col-lg-4">
<div class="ibox">
<div class="ibox-title">
<h5>Senior Citizen</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">
{{ notReviewApplications["Senior Citizen"] }}
</h1>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="ibox">
<div class="ibox-title">
</div>
<div class="ibox-content">
<h1 class="no-margins">
{{
notReviewApplications[
}}
199
</h1>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="ibox">
<div class="ibox-title">
<h5>Abuse</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">
{{ notReviewApplications["Abuse"] }}
</h1>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div class="ibox">
<div class="ibox-title">
<h2>Today's Appointments</h2>
</div>
200
<div
class="row"
v-for="appointment in todaysAppointment"
v-bind:key="appointment.id"
>
{{
new Date(appointment.date).toLocaleTimeString("en-US", {
hour: "2-digit",
minute: "2-digit",
hour12: true,
})
}}
</div>
<h4 class="m-b-xs">
<strong>
{{
: "For interview"
}}
</strong>
</h4>
201
<p class="m-b-xs">
<strong>
{{ appointment.assessment.client_category }}
</strong>
</p>
{{
}}
</p>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</template>
202
<script>
export default {
setup() {
return { toast };
},
data() {
return {
recentAnnouncement: [],
notReviewApplications: {},
todaysAppointment: [],
};
},
created() {
this.getDashboardDatas();
},
methods: {
async getDashboardDatas() {
try {
let headers = {
203
headers: {
},
};
`${serverSideUrlApi}/admin-dashboard-data/`,
headers
);
this.recentAnnouncement = response.data.recent_announcements;
this.notReviewApplications = response.data.not_review_applicants;
this.todaysAppointment = response.data.todays_appoinments;
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
capitalize(text) {
},
hyperlink(textContent) {
/(https?:\/\/[^\s]+)/g,
);
`<span>${newTextContent}</span>`,
"text/xml"
);
newDiv.innerHTML = doc.firstChild.innerHTML;
setTimeout(() => {
divDesc.appendChild(newDiv);
}, 100);
},
},
205
};
</script>
<style scoped>
.description {
position: relative;
overflow: hidden;
height: 170px;
white-space: break-spaces;
display: flex;
.fade-away {
height: 100px;
position: absolute;
bottom: 0;
width: 100%;
.announcement-banner {
</style>
Log in View
<template>
206
<main>
<div>
<form @submit.prevent="signIn()">
</div>
<div class="text-center">
</div>
<div class="form-group">
<input
type="email"
class="form-control"
id="floatingInput"
v-model="email"
/>
</div>
<div class="form-group">
<label for="floatingPassword">Password</label>
<input
type="password"
class="form-control"
id="floatingPassword"
v-model="password"
207
/>
</div>
Sign in
</button>
</form>
<div class="text-center">
</div>
</div>
</div>
</main>
</template>
<script>
export default {
setup() {
return { toast };
},
208
data() {
return {
email: "",
password: "",
};
},
methods: {
async signIn() {
if (!this.email || !this.password) {
return;
if (!this.isEmail(this.email)) {
return;
try {
let data = {
email: this.email,
password: this.password,
};
`${serverSideUrlApi}/admin-login/`,
data
);
this.toast.success(response.data.message);
localStorage.isLogin = true;
209
localStorage.token = response.data.data.token;
setTimeout(() => {
location.reload();
}, 500);
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
210
isEmail(email) {
return /[\w\d\.-]+@[\w\d\.-]+\.[\w\d\.-]+/.test(email);
},
},
};
</script>
<style scoped></style>
Look up View
<template>
<div>
<input
type="text"
class="form-control"
placeholder="Ref ID only"
v-model="filters.search"
@keyup.enter="getAssistanceApplications()"
/>
<button
class="btn btn-outline-secondary"
type="button"
@click="clearSearch()"
>
Clear
</button>
<button
211
class="btn btn-outline-secondary"
type="button"
id="button-addon2"
@click="getAssistanceApplications()"
>
Search
</button>
<button
class="btn btn-outline-secondary"
type="button"
@click="printReport()"
>
</button>
</div>
<label for="inputSelect">Case</label>
<select
id="inputSelect"
class="form-control"
v-model="filters.case"
@change="getAssistanceApplications()"
>
<option value="disaster-and-calamity-assistance">
212
</option>
<option value="children-conflict-with-the-law-and-child-at-risk">
</option>
<option value="abuse">Abuse</option>
</select>
</div>
<label for="inputSelect">Assistance</label>
<select
id="inputSelect"
class="form-control"
v-model="filters.assistance"
@change="getAssistanceApplications()"
>
<option
:value="subClient"
v-bind:key="index"
>
{{ subClient }}
</option>
</select>
</div>
213
<label for="inputSelect">Beneficiary</label>
<select
id="inputSelect"
class="form-control"
v-model="filters.beneficiary"
@change="getAssistanceApplications()"
>
<option
:value="beneficiary.system_id"
v-bind:key="index"
>
{{ beneficiary.name }}
</option>
</select>
</div>
</div>
<thead>
<tr>
<th>#</th>
<th scope="col">Beneficiary</th>
214
</tr>
</thead>
<tbody v-if="applications.length">
<tr
v-bind:key="application.id"
@click.prevent="showApplicationModalForm(application.reference_no)"
>
<td>
{{ application.reference_no }}
<button
@click.stop="gotoToApplication(application)"
>
Redirect
</button>
</td>
<td>
{{ application.assessment.client_category }}
</td>
<td>
{{ application.assessment.sub_client_category }}
</td>
215
<td>
{{ application.user }}
<button
@click.stop="gotoToUser(application.user)"
>
Redirect
</button>
</td>
<td>
{{ application.assistance }}
</td>
<td>
{{ new Date(application.updated_at).toLocaleString("en-US") }}
</td>
<td>
{{ priceFormat(application.cash) }}
</td>
</tr>
<tr>
<td colspan="8"><strong>TOTAL</strong></td>
<td>
</td>
</tr>
</tbody>
216
<tbody v-if="!applications.length">
<tr>
</tr>
<tr>
<td colspan="8"><strong>TOTAL</strong></td>
<td>
</td>
</tr>
</tbody>
</table>
<div
class="modal fade"
id="exampleModal"
data-bs-backdrop="static"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-header">
<span aria-hidden="true">×</span
217
><span class="sr-only">Close</span>
</button>
</div>
<div class="modal-body">
<div class="col-6">
<div class="form-group">
<div class="i-checks">
<label>
<input
type="radio"
v-model="selectedForm.assistance"
value="cash"
name="assist_release"
readonly
/>
Cash
</label>
</div>
<div class="i-checks">
<label>
<input
type="radio"
v-model="selectedForm.assistance"
value="others"
name="assist_release"
readonly
218
/>
Others
</label>
</div>
</div>
<div class="form-group">
<label for="floatingTextarea2">Cash</label>
<input
class="form-control"
id="floatingTextarea2"
v-model="selectedForm.cash"
placeholder="0"
readonly
/>
</div>
<div class="form-group">
<label for="floatingTextarea2">Remarks</label>
<textarea
class="form-control"
id="floatingTextarea2"
style="height: 100px"
v-model="selectedForm.remarks"
readonly
></textarea>
</div>
</div>
<div class="col-6">
219
<div class="mb-5">
<div>
<img
style="max-width: 500px"
:src="selectedForm.proof"
alt="avatar"
/>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
<thead>
<tr>
<th>#</th>
<th scope="col">Beneficiary</th>
</tr>
</thead>
<tbody v-if="applications.length">
<tr
v-bind:key="application.id"
@click.prevent="showApplicationModalForm(application.reference_no)"
>
<td>
{{ application.reference_no }}
</td>
<td>
{{ application.assessment.client_category }}
</td>
<td>
221
{{ application.assessment.sub_client_category }}
</td>
<td>
{{ application.assistance }}
</td>
<td>
{{ new Date(application.updated_at).toLocaleString("en-US") }}
</td>
<td>
{{ priceFormat(application.cash) }}
</td>
</tr>
<tr>
<td colspan="7"><strong>TOTAL</strong></td>
<td>
</td>
</tr>
</tbody>
<tbody v-if="!applications.length">
<tr>
</tr>
<tr>
<td colspan="7"><strong>TOTAL</strong></td>
<td>
222
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
export default {
setup() {
return { toast };
},
data() {
return {
Url: serverSideUrl,
223
applications: [],
selectedForm: {},
attributes: [],
dates: [],
subClientCategoryOptions: {
financial: [
"Educational Assistance",
"Death Assistance",
"Medical Assistance",
],
abuse: [
"Children",
"Rape",
"Abandonment",
"Neglect",
"VAW-C",
"Physical Abuse",
],
},
isInterview: false,
filters: {
search: "",
case: "all",
assistance: "all",
beneficiary: "all",
},
224
beneficiaries: [],
applicationsAmount: 0,
};
},
created() {
this.getAssistanceApplications();
this.getBeneficiaries();
},
methods: {
async getBeneficiaries() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-beneficiaries/`,
headers
);
this.beneficiaries = response.data.data;
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async getAssistanceApplications() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-applications/?search=$
{this.filters.search}&case=${this.filters.case}&assistance=$
{this.filters.assistance}&beneficiary=${this.filters.beneficiary}`,
226
headers
);
this.applications = response.data.data;
let applicationsAmount = 0;
this.applications.map((element) => {
applicationsAmount += element.cash;
});
this.applicationsAmount = applicationsAmount;
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
async showApplicationModalForm(id) {
try {
this.selectedForm = {};
let headers = {
headers: {
},
};
`${serverSideUrlApi}/admin-applications/form/${id}`,
headers
);
this.selectedForm = response.data.data;
setTimeout(() => {
this.toggleProofModal();
}, 500);
} catch (error) {
if (Object.keys(error).length) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
228
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
setTimeout(() => {
}, 500);
} else {
} else {
this.toast.error(message);
},
checkIfDataIsNone(data) {
if (!data) {
return "N/A";
return data;
},
clearSearch() {
this.filters.search = "";
this.getAssistanceApplications();
},
toggleSchedulingModal(actionType) {
229
this.isInterview = true;
$("#inputScheduleModal").modal("toggle");
},
toggleApplicationModal() {
$("#exampleModal").modal("toggle");
},
gotoToUser(id) {
},
gotoToApplication(application) {
this.$router.push({
path: `/assistances/${path}`,
});
},
priceFormat(value) {
},
toggleProofModal() {
$("#exampleModal").modal("toggle");
},
printReport() {
mywindow.document.write('<body>');
mywindow.document.write(document.getElementById("report").innerHTML);
mywindow.document.write("</body></html>");
mywindow.document.close();
setTimeout(() => {
mywindow.focus();
mywindow.print();
}, 500);
setTimeout(() => {
mywindow.close();
}, 500);
return;
},
computed: {
selectedSubClientCategoryList() {
return this.subClientCategoryOptions["financial"];
return this.subClientCategoryOptions["disaster_calamity"];
return this.subClientCategoryOptions["abuse"];
}
231
return [];
},
},
};
</script>
<style scoped></style>
Mobile
Account Page
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-title>Settings</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div>
<ion-label>Profile</ion-label>
</ion-item>
<ion-label>Sign Out</ion-label>
</ion-item>
232
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonItem,
IonIcon,
IonLabel,
IonToolbar,
IonHeader,
IonTitle,
toastController,
alertController,
} from "@ionic/vue";
name: "AccountPage",
233
setup() {
return {
person,
logOutOutline,
};
},
components: {
IonPage,
IonContent,
IonItem,
IonIcon,
IonLabel,
IonToolbar,
IonHeader,
IonTitle,
},
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async signOut() {
try {
let headers = {
headers: {
},
};
this.openToastMessage(response.data.message);
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
localStorage.hasProcessingApplication = "";
localStorage.removeItem("otp_status");
localStorage.removeItem("otp_timer");
setTimeout(() => {
}, 500);
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
gotoProfile() {
},
},
});
</script>
<style scoped>
ion-item {
236
ion-icon {
color: black;
</style>
Announcement Page
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button color="primary"></ion-back-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<div>
<ion-card
v-for="announcement in announcements"
v-bind:key="announcement.id"
>
<img
alt="..."
:src="`${locationURL}${announcement.banner}`"
v-if="announcement.banner"
237
height="250"
/>
</div>
<ion-card-header>
<ion-card-subtitle
{{
new Date(announcement.created_at).toLocaleString("en-US")
}}</ion-card-subtitle
>
</ion-card-header>
<ion-card-content>
<div>
<div class="description">
<div class="fade-away"></div>
</div>
<div class="ion-text-end">
<ion-button
fill="clear"
@click="viewAnnouncement(announcement.id)"
>Read More</ion-button
>
</div>
</div>
</ion-card-content>
238
</ion-card>
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonButton,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
IonCard,
IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
toastController,
alertController,
} from "@ionic/vue";
name: "AnnouncementsPage",
components: {
IonPage,
IonContent,
IonButton,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
IonCard,
IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
},
ionViewWillEnter() {
this.getAnnouncements();
},
data() {
return {
locationURL: serverSideUrl,
announcements: [],
};
},
240
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async getAnnouncements() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/announcements/`,
241
headers
);
this.announcements = response.data.data;
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
viewAnnouncement(id) {
this.$router.push({
name: "ViewAnnouncement",
242
params: {
id: id,
},
});
},
capitalize(text) {
},
},
});
</script>
<style scoped>
.description {
position: relative;
overflow: hidden;
height: 65px;
white-space: break-spaces;
.fade-away {
height: 100px;
position: absolute;
bottom: 0;
width: 100%;
img {
243
vertical-align: middle;
</style>
Form page
<template>
<ion-page>
<ion-header>
<ion-buttons slot="start">
<ion-button @click="closeModal()">
</ion-button>
</ion-buttons>
<ion-buttons slot="end">
Next
</ion-button>
</ion-buttons>
</ion-toolbar>
<ion-buttons slot="start">
Back
</ion-button>
</ion-buttons>
<ion-buttons slot="end">
Next
</ion-button>
</ion-buttons>
</ion-toolbar>
<ion-buttons slot="start">
Back
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content ref="content">
<div>
<swiper
@swiper="onSwiper"
:slides-per-view="1"
:allowTouchMove="false"
:noSwiping="true"
>
<swiper-slide>
<div class="__container-form">
</div>
<div class="form">
<ion-item lines="none">
245
<ion-label position="floating"
><span>Lastname </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.lastname"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Firstname </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
246
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.firstname"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Middlename </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.middlename"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small class="small-warn-label"
247
>(Optional)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.extension"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Sex </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-select v-model="clientIdentifyingInformation.sex">
<ion-select-option value="Male">Male</ion-select-option>
<ion-select-option value="Female">Female</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
248
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
type="date"
placeholder=""
v-model="clientIdentifyingInformation.date_of_birth"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Region </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
249
>(Required)</small
></ion-label
>
<ion-select-option value="10">X</ion-select-option>
</ion-select> -->
<ion-input
v-model="clientIdentifyingInformation.region"
readonly
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Province </span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
>Misamis Oriental</ion-select-option
250
>
</ion-select> -->
<ion-input
v-model="clientIdentifyingInformation.province"
readonly
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>City/Municipality </span
><small
class="small-warn-label"
:style="
errors &&
!clientIdentifyingInformation.city_or_municipality
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<!-- <ion-select
v-model="clientIdentifyingInformation.city_or_municipality"
>
<ion-select-option value="10"
>
251
</ion-select> -->
<ion-input
v-model="clientIdentifyingInformation.city_or_municipality"
readonly
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>District </span
><small class="small-warn-label"
>(Required)</small
></ion-label
>
>
</ion-select> -->
<ion-input
v-model="clientIdentifyingInformation.district"
readonly
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Barangay </span
><small
252
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-select v-model="clientIdentifyingInformation.barangay">
<ion-select-option value="Aplaya">Aplaya</ion-select-option>
<ion-select-option value="Bobuntugan"
>Bobuntugan</ion-select-option
>
<ion-select-option value="Danao">Danao</ion-select-option>
<ion-select-option
value="Ignacio S. Cruz
"
>Ignacio S. Cruz
</ion-select-option>
<ion-select-option value="Jampason"
>Jampason</ion-select-option
>
<ion-select-option value="Kimaya">Kimaya</ion-select-option>
<ion-select-option value="Corrales"
>Corrales</ion-select-option
>
253
<ion-select-option
"
</ion-select-option>
>
<ion-select-option value="Natubo">Natubo</ion-select-option>
<ion-select-option
value="San Antonio
"
>San Antonio
</ion-select-option>
>San Isidro</ion-select-option
>
>
<ion-select-option value="Solana">Solana</ion-select-option>
>
</ion-select>
</ion-item>
<ion-item lines="none">
254
<ion-label position="floating"
><span>No./Street/Purok </span
><small class="small-warn-label"
>(Optional)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.no_street_or_purok"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.place_of_birth"
></ion-input>
</ion-item>
255
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
errors &&
!clientIdentifyingInformation.relationship_to_beneficiary
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-select
v-model="
clientIdentifyingInformation.relationship_to_beneficiary
"
>
<ion-select-option value="Self">Self</ion-select-option>
<ion-select-option value="Father">Father</ion-select-option>
<ion-select-option value="Mother">Mother</ion-select-option>
<ion-select-option value="Brother"
>Brother</ion-select-option
>
<ion-select-option value="Sister">Sister</ion-select-option>
<ion-select-option value="Son">Son</ion-select-option>
256
<ion-select-option value="Daughter"
>Daughter</ion-select-option
>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-select
v-model="clientIdentifyingInformation.civil_status"
>
<ion-select-option value="Single">Single</ion-select-option>
<ion-select-option value="Married"
>Married</ion-select-option
>
<ion-select-option value="Others">Others</ion-select-option>
</ion-select>
257
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Religion </span
><small class="small-warn-label"
>(Optional)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.religion"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Nationality </span
><small class="small-warn-label"
>(Optional)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.nationality"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small class="small-warn-label"
258
>(Optional)</small
></ion-label
>
<ion-select
v-model="
clientIdentifyingInformation.highest_educational_attainment
"
>
<ion-select-option
graduation</ion-select-option
>
<ion-select-option
equivalent</ion-select-option
>
>
<ion-select-option
degree</ion-select-option
>
</ion-select>
259
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Skills/Occupation </span
><small
class="small-warn-label"
:style="
errors &&
!clientIdentifyingInformation.skills_or_occupation
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="clientIdentifyingInformation.skills_or_occupation"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
errors &&
!clientIdentifyingInformation.estimated_monthly_income
260
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="
clientIdentifyingInformation.estimated_monthly_income
"
></ion-input>
</ion-item>
</div>
</div>
</swiper-slide>
<swiper-slide>
<div class="__container-form">
</div>
<div>
<div class="ion-text-center">
<ion-button @click="openFamilyCompositionModal()"
>
</div>
<ion-card
261
v-bind:key="index"
>
<ion-card-header>
<ion-card-title
{{ member.middlename }}</ion-card-title
>
</ion-card-header>
<ion-card-content>
<p>
{{
new Date(member.date_of_birth).toLocaleDateString(
"en-US",
}}
</p>
</ion-card-content>
</ion-card>
</div>
262
</div>
</swiper-slide>
<swiper-slide>
<div class="__container-form">
<h1>Assessment</h1>
</div>
<div class="form">
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
v-model="assessment.problems_presented"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
263
><small class="small-warn-label"
>(Optional)</small
></ion-label
>
<ion-input
v-model="assessment.social_workers_assessment"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-select v-model="assessment.client_category">
>Financial Assistance</ion-select-option
>
>
>Senior Citizen</ion-select-option
>
<ion-select-option
risk</ion-select-option
>
<ion-select-option value="Abuse">Abuse</ion-select-option>
</ion-select>
</ion-item>
<ion-item
lines="none"
v-if="selectedSubClientCategoryList.length"
>
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
265
></ion-label
>
<ion-select v-model="assessment.sub_client_category">
<ion-select-option
v-for="(
subClient, index
) in selectedSubClientCategoryList"
v-bind:key="index"
:value="subClient"
>
</ion-select>
</ion-item>
</div>
<h1>Attachments</h1>
</div>
<div class="form">
<ion-item lines="none">
<ion-label position="floating"
><small
class="small-warn-label"
:style="
: 'color: gray;'
266
"
>(Required)</small
></ion-label
>
<ion-input
type="file"
placeholder=""
@change="readURL"
></ion-input>
</ion-item>
<ion-item lines="none">
<ion-label position="floating"
><span>Valid ID</span
><small
class="small-warn-label"
:style="
: 'color: gray;'
"
>(Required)</small
></ion-label
>
<ion-input
type="file"
placeholder=""
@change="readURL2"
267
></ion-input>
</ion-item>
</div>
<ion-button
mode="ios"
expand="block"
@click="submitApplicantForm()"
>Apply now</ion-button
>
</div>
</div>
</swiper-slide>
</swiper>
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonHeader,
IonToolbar,
IonButtons,
IonButton,
268
IonIcon,
IonContent,
IonItem,
IonLabel,
IonInput,
IonSelect,
IonSelectOption,
IonCard,
IonCardHeader,
IonCardTitle,
IonCardContent,
modalController,
toastController,
alertController,
} from "@ionic/vue";
name: "FormModal",
components: {
269
IonPage,
IonHeader,
IonToolbar,
IonButtons,
IonButton,
IonIcon,
IonContent,
IonItem,
IonLabel,
IonInput,
IonSelect,
IonSelectOption,
IonCard,
IonCardHeader,
IonCardTitle,
IonCardContent,
Swiper,
SwiperSlide,
},
setup() {
return {
close,
content,
};
},
mounted() {
270
if (localStorage.hasProfile) {
setTimeout(() => {
this.clientIdentifyingInformation.lastname = profileDetails.lastname;
this.clientIdentifyingInformation.firstname = profileDetails.firstname;
this.clientIdentifyingInformation.middlename =
profileDetails.middlename;
this.clientIdentifyingInformation.extension = profileDetails.extension;
this.clientIdentifyingInformation.sex = profileDetails.sex;
profileDetails.date_of_birth
).toLocaleDateString("en-CA");
this.clientIdentifyingInformation.civil_status =
profileDetails.civil_status;
this.clientIdentifyingInformation.religion = profileDetails.religion;
this.clientIdentifyingInformation.nationality =
profileDetails.nationality;
}, 100);
},
data() {
return {
subClientCategoryOptions: {
financial: [
"Educational Assistance",
"Death Assistance",
"Medical Assistance",
271
],
abuse: [
"Children",
"Rape",
"Abandonment",
"Neglect",
"VAW-C",
"Physical Abuse",
],
},
clientIdentifyingInformation: {
lastname: "",
firstname: "",
middlename: "",
extension: "",
sex: "",
date_of_birth: "",
city_or_municipality: "Jasaan",
barangay: "",
no_street_or_purok: "",
place_of_birth: "",
relationship_to_beneficiary: "",
civil_status: "",
272
religion: "",
nationality: "",
highest_educational_attainment: "",
skills_or_occupation: "",
estimated_monthly_income: "",
},
beneficiarysFamilyComposition: [],
assessment: {
problems_presented: "",
social_workers_assessment: "",
client_category: "",
sub_client_category: "",
},
attachments: {
certificate_of_indigency: "",
valid_id: "",
},
slideSelected: 1,
swiper: null,
errors: 0,
};
},
methods: {
readURL(input) {
this.attachments.certificate_of_indigency = input.target.files[0];
}
273
},
readURL2(input) {
this.attachments.valid_id = input.target.files[0];
},
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async openFamilyCompositionModal() {
component: FamilyCompositionModal,
cssClass: "my-custom-class",
274
});
await modal.present();
if (data != undefined) {
this.beneficiarysFamilyComposition.push(data.result);
},
async submitApplicantForm() {
try {
console.log(this.attachments);
if (this.FormAssessmentValidation()) return;
data.append(
"client_identifying_information",
JSON.stringify(this.clientIdentifyingInformation)
);
data.append(
"beneficiarys_family_composition",
JSON.stringify(this.beneficiarysFamilyComposition)
);
data.append("assessment", JSON.stringify(this.assessment));
data.append(
"certificate_of_indigency",
this.attachments.certificate_of_indigency
);
data.append("valid_id", this.attachments.valid_id);
275
let headers = {
headers: {
},
};
`${serverSideUrlApi}/apply-assistance/`,
data,
headers
);
this.openToastMessage(response.data.message);
localStorage.hasProcessingApplication = 1;
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
276
} else {
this.openAlertMessage("Error!", message);
},
FormClientIdentifyingInformationValidation() {
let {
lastname,
firstname,
middlename,
sex,
date_of_birth,
region,
province,
city_or_municipality,
barangay,
place_of_birth,
relationship_to_beneficiary,
civil_status,
skills_or_occupation,
estimated_monthly_income,
} = this.clientIdentifyingInformation;
let errors = 0;
if (!lastname) errors = 1;
277
if (!firstname) errors = 1;
if (!middlename) errors = 1;
if (!sex) errors = 1;
if (!date_of_birth) errors = 1;
if (!region) errors = 1;
if (!province) errors = 1;
if (!city_or_municipality) errors = 1;
if (!barangay) errors = 1;
if (!place_of_birth) errors = 1;
if (!relationship_to_beneficiary) errors = 1;
if (!civil_status) errors = 1;
if (!skills_or_occupation) errors = 1;
if (!estimated_monthly_income) errors = 1;
if (errors) {
this.errors = errors;
return this.errors;
},
FormAssessmentValidation() {
let errors = 0;
if (!problems_presented) errors = 1;
if (!client_category) errors = 1;
if (!this.attachments.certificate_of_indigency) errors = 1;
278
if (!this.attachments.valid_id) errors = 1;
if (errors) {
this.errors = errors;
return this.errors;
},
onSwiper(swiper) {
this.swiper = swiper;
},
goNext(index) {
if (index === 2) {
if (this.FormClientIdentifyingInformationValidation()) return;
if (index === 3) {
if (this.beneficiarysFamilyComposition.length < 2) {
return;
this.slideSelected = index;
this.content.$el.scrollToTop(1000);
},
goBack(index) {
this.slideSelected = index;
279
this.content.$el.scrollToTop(1000);
},
closeModal() {
this.$router.back();
},
},
computed: {
selectedSubClientCategoryList() {
return this.subClientCategoryOptions["financial"];
if (
) {
return this.subClientCategoryOptions["disaster_calamity"];
return this.subClientCategoryOptions["abuse"];
return [];
},
},
});
</script>
<style scoped>
280
div.__container-form {
.form {
margin: 0 2.6rem;
.small-warn-label {
color: gray;
ion-item {
border-radius: 10px;
margin: 10px 0;
.title h1 {
</style>
History Page
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-searchbar
281
v-model="search"
show-clear-button="always"
></ion-searchbar>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-card
class="ion-text-start"
button="true"
v-for="application in filteredApplicationsHistory"
v-bind:key="application.id"
@click.prevent="showApplicationFormDetails(application.id)"
>
<ion-card-header>
<ion-card-title>
</ion-card-title>
<ion-card-subtitle
>Case:
{{ application.assessment.client_category }}</ion-card-subtitle
>
<ion-card-subtitle v-if="application.assessment.sub_client_category"
>Assistance:
{{ application.assessment.sub_client_category }}</ion-card-subtitle
>
282
</ion-card-header>
<ion-card-content>
<span v-if="application.application_status">
{{ application.application_status.toUpperCase() }}
</span>
<span v-if="!application.application_status">{{
}}</span>
</ion-card-content>
<div class="ion-text-end">
<ion-button
v-if="
!application.application_status ||
"
fill="clear"
color="danger"
@click.stop="showCancelConfirmation(application.id)"
>Cancel</ion-button
>
</div>
</ion-card>
<h5 v-if="!filteredApplicationsHistory.length">
</h5>
</div>
<div
283
v-if="!applicationsHistory.length"
class="ion-margin ion-text-center"
>
</div>
<ion-fab
slot="fixed"
vertical="bottom"
horizontal="end"
v-if="!pendingApplication.length"
>
<ion-fab-button @click.prevent="applyAssistance()">
<ion-icon :icon="createSharp"></ion-icon>
</ion-fab-button>
</ion-fab>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonCard,
IonCardContent,
IonCardHeader,
284
IonCardTitle,
IonCardSubtitle,
IonButton,
IonIcon,
IonSearchbar,
IonFab,
IonFabButton,
IonToolbar,
IonHeader,
toastController,
alertController,
} from "@ionic/vue";
name: "HistoryPage",
components: {
IonPage,
IonContent,
IonCard,
IonCardContent,
IonCardHeader,
IonCardTitle,
285
IonCardSubtitle,
IonButton,
IonIcon,
IonSearchbar,
IonFab,
IonFabButton,
IonToolbar,
IonHeader,
},
setup() {
return {
createSharp,
};
},
ionViewWillEnter() {
this.getApplicationForms();
},
data() {
return {
search: "",
applicationsHistory: [],
filteredApplicationsHistory: [],
pendingApplication: [],
};
},
methods: {
async openToastMessage(message) {
286
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: [
text: "No",
role: "cancel",
cssClass: "secondary",
},
287
text: "Yes",
handler: () => {
yesHandler(data);
},
},
],
});
await alert.present();
},
async applyAssistance() {
},
async getApplicationForms() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/applications/`,
headers
);
this.applicationsHistory = response.data.data;
this.filteredApplicationsHistory = this.applicationsHistory;
this.pendingApplication = this.applicationsHistory.filter(
288
(element) =>
element.application_status.includes("Reviewed") ||
element.application_status.includes("For Interview") ||
element.application_status.includes("Interviewed") ||
element.application_status.includes("Approved")
);
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
}
289
},
showCancelConfirmation(id) {
let data = {
id: id,
};
this.openConfirmMessage(
"Warning!",
data,
this.cancelApplicationForm
);
},
async cancelApplicationForm(params) {
try {
let id = params.id;
let headers = {
headers: {
},
};
`${serverSideUrlApi}/applications/${id}/`,
data,
headers
);
this.openToastMessage(response.data.message);
290
this.getApplicationForms();
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
showApplicationFormDetails(id) {
this.$router.push({
name: "ViewForm",
params: {
id: id,
},
291
});
},
},
watch: {
search(val) {
if (val) {
this.filteredApplicationsHistory = this.applicationsHistory.filter(
);
} else {
this.filteredApplicationsHistory = this.applicationsHistory;
},
},
});
</script>
<style scoped></style>
Home page
<template>
<ion-page>
<!-- <ion-header>
<ion-toolbar>
</ion-toolbar>
</ion-header> -->
<ion-content>
<div class="application-status">
292
<ion-card>
<ion-card-content>
<ion-button
class="ion-text-wrap ion-margin-top"
expand="block"
@click.prevent="applyAssistance()"
>Apply Now!</ion-button
>
</div>
<ion-button
class="ion-text-wrap ion-margin-top"
expand="block"
@click.prevent="showApplicationFormDetails()"
>
</div>
</ion-card-content>
</ion-card>
</div>
<div>
<ion-accordion-group :value="['first']">
<ion-accordion value="first">
<div class="card-header">
<h4>Recent Announcements</h4>
</div>
</ion-item>
<div>
<ion-card
v-bind:key="announcement.id"
>
<img
alt="..."
:src="`${locationURL}${announcement.banner}`"
v-if="announcement.banner"
height="250"
/>
</div>
<ion-card-header>
<ion-card-subtitle
{{
new Date(announcement.created_at).toLocaleString(
"en-US"
}}</ion-card-subtitle
294
>
</ion-card-header>
<ion-card-content>
<div>
<div class="description">
<div class="fade-away"></div>
</div>
<div class="ion-text-end">
<ion-button
class="read-more-btn"
fill="clear"
@click="viewAnnouncement(announcement.id)"
>Read More</ion-button
>
</div>
</div>
</ion-card-content>
</ion-card>
</div>
<div class="ion-text-center">
>See more</ion-button
>
</div>
</div>
</ion-accordion>
295
</ion-accordion-group>
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonButton,
IonAccordion,
IonAccordionGroup,
IonCard,
IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
toastController,
alertController,
} from "@ionic/vue";
name: "HomePage",
components: {
IonPage,
IonContent,
IonButton,
IonAccordion,
IonAccordionGroup,
IonCard,
IonCardContent,
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
},
ionViewWillEnter() {
this.checkApplications();
this.getAnnouncements();
},
data() {
return {
locationURL: serverSideUrl,
hasProcessingApplication: "",
applicationId: "",
announcements: [],
};
},
methods: {
297
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async applyAssistance() {
},
async checkApplications() {
try {
let headers = {
headers: {
},
};
298
`${serverSideUrlApi}/check-applications/`,
headers
);
this.hasProcessingApplication = response.data.has_progress_application;
this.applicationId = response.data.application_id;
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
299
async getAnnouncements() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/announcements/`,
headers
);
this.announcements = response.data.data;
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
}
300
} else {
this.openAlertMessage("Error!", message);
},
showApplicationFormDetails() {
this.$router.push({
name: "ViewForm",
params: {
id: this.applicationId,
},
});
},
viewAnnouncement(id) {
this.$router.push({
name: "ViewAnnouncement",
params: {
id: id,
},
});
},
seeMoreAnnouncements() {
this.$router.push({
name: "Announcements",
});
},
301
capitalize(text) {
},
},
});
</script>
<style scoped>
.application {
text-align: center;
color: black;
.card-header {
display: flex;
display: flex;
justify-content: space-between;
align-items: end;
margin: 0 10px;
ion-button.see-more-btn::part(native) {
width: 150px;
ion-button.read-more-btn::part(native) {
.description {
position: relative;
302
overflow: hidden;
height: 65px;
.fade-away {
height: 100px;
position: absolute;
bottom: 0;
width: 100%;
.application-status {
position: absolute;
bottom: 0;
width: 100%;
</style>
Login Page
<template>
<ion-page>
<ion-content>
<div class="login-content">
<div class="logo">
</div>
</div>
303
<div>
<ion-item lines="none">
<ion-input
type="text"
inputmode="numeric"
@keyup="checkMobileNumber($event)"
@ionBlur="maskedMobileNumber()"
v-model="mobileNumber"
></ion-input>
</ion-item>
</div>
<div>
<ion-item lines="none">
<ion-label position="floating">Password</ion-label>
<ion-input
:type="EyePass"
clearOnEdit="false"
v-model="password"
></ion-input>
<ion-icon
slot="icon-only"
:icon="EyeIcon"
color="primary"
></ion-icon>
</ion-button>
304
</ion-item>
</div>
>Sign In</ion-button
>
</div>
>Sign Up</ion-button
>
</div>
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonItem,
IonLabel,
IonInput,
IonButton,
IonIcon,
305
modalController,
toastController,
alertController,
} from "@ionic/vue";
name: "LoginPage",
components: {
IonPage,
IonContent,
IonItem,
IonLabel,
IonInput,
IonButton,
IonIcon,
},
setup() {
return {
eye,
eyeOff,
306
};
},
data() {
return {
mobileNumber: "",
password: "",
EyeIcon: this.eyeOff,
EyeStatus: false,
EyePass: "password",
};
},
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
307
await alert.present();
},
async openTwoStepAuthModal() {
component: TwoStepAuthModal,
cssClass: "my-custom-class",
componentProps: {
type: "login",
mobileNumber: this.mobileNumber,
},
});
await modal.present();
if (data != undefined) {
setTimeout(() => {
}, 500);
},
showHidePass() {
if (this.EyeStatus == false) {
this.EyeStatus = true;
this.EyeIcon = this.eye;
this.EyePass = "text";
} else {
this.EyeStatus = false;
this.EyeIcon = this.eyeOff;
308
this.EyePass = "password";
},
formValidation() {
if (!this.mobileNumber || !this.password) {
return;
return;
this.signIn();
},
checkMobileNumber(event) {
let allowChar = ["+", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
if (inputtedValue) {
if (allowChar.includes(inputtedKey)) {
this.mobileNumber = inputtedValue;
} else {
},
maskedMobileNumber() {
309
if (this.mobileNumber) {
this.mobileNumber = `+63${this.mobileNumber}`;
} else {
this.mobileNumber = `+${this.mobileNumber}`;
},
gotoSignUp() {
},
async signIn() {
try {
let data = {
310
mobile_number: this.mobileNumber,
password: this.password,
};
this.openToastMessage(response.data.message);
localStorage.removeItem("otp_status");
localStorage.removeItem("otp_timer");
localStorage.isLogin = true;
localStorage.token = response.data.data.token;
localStorage.hasProfile = Object.keys(response.data.data.profile).length
? JSON.stringify(response.data.data.profile)
: "";
localStorage.hasProcessingApplication = response.data.data
.has_processing_application
? true
: "";
this.openTwoStepAuthModal();
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
311
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
},
});
</script>
<style scoped>
.logo {
display: flex;
justify-content: center;
.logo img {
height: 200px;
.login-content {
width: 80%;
position: absolute;
top: 50%;
left: 50%;
312
.message-header {
margin-bottom: 30px;
.eyebtn {
position: absolute;
right: 20px;
top: 11px;
padding: 0 !important;
--background: transparent;
z-index: 2;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;
--box-shadow: 0;
ion-item {
border-radius: 10px;
margin: 10px 0;
</style>
Profile Page
<template>
313
<ion-page>
<ion-content>
<div class="login-content">
<div class="logo">
</div>
</div>
<div>
<ion-item lines="none">
<ion-input
type="text"
inputmode="numeric"
@keyup="checkMobileNumber($event)"
@ionBlur="maskedMobileNumber()"
v-model="mobileNumber"
></ion-input>
</ion-item>
</div>
<div>
<ion-item lines="none">
<ion-label position="floating">Password</ion-label>
<ion-input
:type="EyePass"
clearOnEdit="false"
314
v-model="password"
></ion-input>
<ion-icon
slot="icon-only"
:icon="EyeIcon"
color="primary"
></ion-icon>
</ion-button>
</ion-item>
</div>
>Sign In</ion-button
>
</div>
>Sign Up</ion-button
>
</div>
</div>
</ion-content>
</ion-page>
</template>
<script>
315
import {
IonPage,
IonContent,
IonItem,
IonLabel,
IonInput,
IonButton,
IonIcon,
modalController,
toastController,
alertController,
} from "@ionic/vue";
name: "LoginPage",
components: {
IonPage,
IonContent,
IonItem,
316
IonLabel,
IonInput,
IonButton,
IonIcon,
},
setup() {
return {
eye,
eyeOff,
};
},
data() {
return {
mobileNumber: "",
password: "",
EyeIcon: this.eyeOff,
EyeStatus: false,
EyePass: "password",
};
},
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
317
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async openTwoStepAuthModal() {
component: TwoStepAuthModal,
cssClass: "my-custom-class",
componentProps: {
type: "login",
mobileNumber: this.mobileNumber,
},
});
await modal.present();
if (data != undefined) {
setTimeout(() => {
}, 500);
}
318
},
showHidePass() {
if (this.EyeStatus == false) {
this.EyeStatus = true;
this.EyeIcon = this.eye;
this.EyePass = "text";
} else {
this.EyeStatus = false;
this.EyeIcon = this.eyeOff;
this.EyePass = "password";
},
formValidation() {
if (!this.mobileNumber || !this.password) {
return;
return;
this.signIn();
},
checkMobileNumber(event) {
let allowChar = ["+", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
319
if (inputtedValue) {
if (allowChar.includes(inputtedKey)) {
this.mobileNumber = inputtedValue;
} else {
},
maskedMobileNumber() {
if (this.mobileNumber) {
this.mobileNumber = `+63${this.mobileNumber}`;
} else {
this.mobileNumber = `+${this.mobileNumber}`;
}
320
},
gotoSignUp() {
},
async signIn() {
try {
let data = {
mobile_number: this.mobileNumber,
password: this.password,
};
this.openToastMessage(response.data.message);
localStorage.removeItem("otp_status");
localStorage.removeItem("otp_timer");
localStorage.isLogin = true;
localStorage.token = response.data.data.token;
localStorage.hasProfile = Object.keys(response.data.data.profile).length
? JSON.stringify(response.data.data.profile)
: "";
localStorage.hasProcessingApplication = response.data.data
.has_processing_application
? true
: "";
this.openTwoStepAuthModal();
} catch (error) {
321
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
},
});
</script>
<style scoped>
.logo {
display: flex;
justify-content: center;
322
.logo img {
height: 200px;
.login-content {
width: 80%;
position: absolute;
top: 50%;
left: 50%;
.message-header {
margin-bottom: 30px;
.eyebtn {
position: absolute;
right: 20px;
top: 11px;
padding: 0 !important;
--background: transparent;
z-index: 2;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;
--box-shadow: 0;
}
323
ion-item {
border-radius: 10px;
margin: 10px 0;
</style>
Register Page
<template>
<ion-page>
<ion-content>
<div class="ion-text-center">
</div>
<div class="ion-margin-top">
<ion-item lines="none">
</ion-item>
</div>
</div>
</div>
</div>
<div class="ion-text-center">
</div>
<div class="ion-margin-top">
<ion-item lines="none">
</ion-button>
</ion-item>
<ion-item lines="none">
</ion-button>
</ion-item>
</div>
325
</div>
</div>
</ion-content>
</ion-page>
</template>
<script>
name: 'RegisterPage',
setup() {
return {
eye,
eyeOff
326
},
data() {
return {
isVerified: false,
mobileNumber: "",
newPassword: "",
confirmPassword: "",
EyeIcon: this.eyeOff,
EyeStatus: false,
EyePass: "password",
},
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom"
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
327
buttons: ["OK"],
});
await alert.present();
},
async openTwoStepAuthModal() {
component: TwoStepAuthModal,
cssClass: "my-custom-class",
componentProps: {
type: "register",
mobileNumber: this.mobileNumber
});
await modal.present();
if (data != undefined) {
this.isVerified = data.verify;
},
showHidePass() {
if (this.EyeStatus == false) {
this.EyeStatus = true;
this.EyeIcon = this.eye;
this.EyePass = "text";
} else {
this.EyeStatus = false;
this.EyeIcon = this.eyeOff;
328
this.EyePass = "password";
},
checkMobileNumber(event) {
let allowChar = ["+", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
if (inputtedValue) {
if (allowChar.includes(inputtedKey)) {
this.mobileNumber = inputtedValue;
} else {
},
maskedMobileNumber() {
if (this.mobileNumber) {
this.mobileNumber = `+63${this.mobileNumber}`;
}
329
} else {
this.mobileNumber = `+${this.mobileNumber}`;
},
checkInputted() {
if (!this.mobileNumber) {
return;
return;
this.openTwoStepAuthModal();
},
goBack() {
this.$router.back();
},
async registerAccount() {
if ((!this.newPassword) || (!this.confirmPassword)) {
return;
return;
try {
let data = {
"mobile_number": this.mobileNumber,
"password": this.newPassword,
this.openToastMessage(response.data.message);
localStorage.isLogin = true;
localStorage.token = response.data.data.token;
localStorage.hasProfile =
Object.keys(response.data.data.profile).length ?
JSON.stringify(response.data.data.profile) : "";
setTimeout(() => {
}, 500);
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
});
</script>
<style scoped>
.eyebtn {
position: absolute;
right: 20px;
top: 11px;
padding: 0 !important;
--background: transparent;
332
z-index: 2;
--padding-start: 0;
--padding-end: 0;
--padding-top: 0;
--padding-bottom: 0;
--box-shadow: 0;
ion-item {
border-radius: 10px;
margin: 10px 0;
</style>
Tabs Page
<template>
<ion-page>
<ion-tabs>
<ion-router-outlet></ion-router-outlet>
<ion-tab-bar slot="bottom">
<ion-label>Home</ion-label>
</ion-tab-button>
<ion-label>History</ion-label>
333
</ion-tab-button>
<ion-label>Account</ion-label>
</ion-tab-button>
</ion-tab-bar>
</ion-tabs>
</ion-page>
</template>
<script>
name: 'TabsPage',
setup() {
return {
home,
newspaper,
personCircle,
});
334
</script>
<template>
<ion-page>
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button color="primary"></ion-back-button>
</ion-buttons>
</ion-toolbar>
</ion-header>
<ion-content>
<div v-if="Object.keys(announcement).length">
<div
v-if="announcement.banner"
class="ion-text-center"
style="background-color: black"
>
<img
alt="..."
:src="`${locationURL}${announcement.banner}`"
v-if="announcement.banner"
/>
</div>
<div class="form">
<h2>
{{ announcement.title }}
335
</h2>
</div>
<div class="form">
><br />
<small>{{
new Date(announcement.created_at).toLocaleString("en-US")
}}</small>
</div>
{{ hyperlink(announcement.description, announcement.id) }}
<div :id="`desc${announcement.id}`"></div>
</div>
</div>
</ion-content>
</ion-page>
</template>
<script>
import {
IonPage,
IonContent,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
336
toastController,
alertController,
} from "@ionic/vue";
name: "ViewAnnouncementPage",
components: {
IonPage,
IonContent,
IonHeader,
IonToolbar,
IonButtons,
IonBackButton,
},
data() {
return {
locationURL: serverSideUrl,
id: this.$route.params.id,
announcement: {},
};
},
created() {
this.getAnnouncement();
337
},
methods: {
async openToastMessage(message) {
message: message,
duration: 2000,
position: "bottom",
});
return toast.present();
},
cssClass: "my-custom-class",
header: type,
message: message,
buttons: ["OK"],
});
await alert.present();
},
async getAnnouncement() {
try {
let headers = {
headers: {
},
};
`${serverSideUrlApi}/announcement/${this.id}`,
headers
);
this.announcement = response.data.data;
} catch (error) {
if (Object.hasOwn(error.response.data, "message")) {
message = error.response.data.message;
message = error.response.data.detail;
if (message.includes("Invalid token.")) {
localStorage.isLogin = "";
localStorage.token = "";
localStorage.hasProfile = "";
setTimeout(() => {
}, 500);
} else {
this.openAlertMessage("Error!", message);
},
capitalize(text) {
},
hyperlink(textContent, id) {
if (!textContent) return;
/(https?:\/\/[^\s]+)/g,
(href) =>
);
`<span>${newTextContent}</span>`,
"text/xml"
);
newDiv.innerHTML = doc.firstChild.innerHTML;
setTimeout(() => {
if (!divDesc.hasChildNodes()) {
divDesc.appendChild(newDiv);
} else {
while (divDesc.firstChild) {
divDesc.removeChild(divDesc.firstChild);
divDesc.appendChild(newDiv);
}, 100);
},
340
},
});
</script>
<style scoped>
.form {
margin: 0 2.6rem;
.form h2 {
font-weight: 700;
.description {
margin-top: 10px;
white-space: break-spaces;
img {
vertical-align: middle;
</style>
341
A. Curriculum Vitae
PERSONAL DATA
Age : 22 years old
Gender : Female
Civil status : Single
Date of Birth : December 30, 2000
Place of Birth : Jasaan, Jasaan Misamis Oriental
Religion :Roman Catholic
Citizenship : Filipino
Height : 5’0
Weight : 42 kls.
EDUCATION
TERTIARY: University of Science and Technology of
Southern Philippines
Lower Jasaan, Jasaan Misamis Oriental
Bachelor of Science and Information
Technology