How to remove indent between chapter and section in table of contents. I am using document class report. I have made a table of contents as shown in 1st Figure.

The following is code used in package file to create entire formating
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{mypackage}
[2011/01/11 v0.01 LaTeX package for my own purpose]
\RequirePackage[dvips]{graphicx}
\RequirePackage[cmex10]{amsmath}
\RequirePackage{setspace}
\RequirePackage{float}
\usepackage{showframe}
\RequirePackage[margin=1in]{geometry}
\usepackage{subcaption}
\RequirePackage{cite}
\RequirePackage{caption}
\RequirePackage{etoolbox}
\RequirePackage{tabularx}
\RequirePackage[toc,page]{appendix}
\usepackage{tocloft}
\RequirePackage{titletoc}
\RequirePackage[compact]{titlesec}
\captionsetup{labelsep=period}
\setcounter{secnumdepth}{3}
\makeatletter
\patchcmd{\@makechapterhead}{50\p@}{0pt}{}{}
\patchcmd{\@makeschapterhead}{50\p@}{0pt}{}{}
\makeatother
\cleardoublepage %\cleardoublepage %for openright
\renewcommand{\chaptername}{CHAPTER}
\renewcommand{\thechapter}{\Roman{chapter}}%chapter number in roman
%For displaying chapter title and heading in centre with required font
\titleformat{\chapter}[display]
{\normalfont\large\bfseries\centering}{\chaptertitlename\ \thechapter} {0pc}{\large}%changing font size,and centering of chapter heading
\titleformat{\section}
{\normalfont}{\thesection}{1em}{\MakeUppercase}
However,I want the table of contents to look as in 2nd Figure . Also how to add page number header above the page numbers. Thanks.

etoc,tocloft,tocbasic,titletoc… – Schweinebacke Aug 10 '17 at 07:19