I have the code below and it works, but not exactly the way I want.
\documentclass{report}
\usepackage[titles]{tocloft}
\usepackage{titlesec}
\renewcommand{\contentsname}{Table of contents}
\renewcommand{\cftchappresnum}{CHAPTER }
\renewcommand{\cftchapnumwidth}{0pt}
\renewcommand{\cftchapaftersnumb}{\vspace{3mm}\\}
\renewcommand{\cftchapfont}{\normalfont}
\renewcommand{\cftchappagefont}{\normalfont}
\renewcommand{\cftdotsep}{1}
\renewcommand{\cftchapleader}{\cftdotfill{\cftsecdotsep}}
\addtocontents{toc}{~\hfill Page\par}
\titleformat{name=\chapter, numberless}[block]{\bfseries\large\filleft} {}{0em}{\MakeUppercase}[{\titlerule[1pt]}]
\titleformat{name=\chapter}[display]{\bfseries\huge\filleft} {\chaptername~\thechapter}{3ex}{\MakeUppercase}[{\titlerule[1pt]}]
\begin{document}
\tableofcontents
\chapter{FIRST CHAPTER}
\section{First Section}
\chapter{SECOND CHAPTER}
\chapter{THIRD CHAPTER}
\appendix
\chapter{ERASMUS POLICY}
\chapter{ERASMUS COUNTRY CODES}
\end{document}
Here is the output
What I need help with is
The appendix starts with the word "CHAPTER", whereas I want it to be "APPENDIX-A", "APPENDIX-B" and so on


